22 Commits

Author SHA1 Message Date
frank
52610ffcb3 add copyright header to shell scripts 2012-01-11 18:41:53 -08:00
Sheng Yang
f98191be5c Fix domr's file lock
And add more information for domr's file lock
2012-01-10 14:25:43 -08:00
Sheng Yang
7e6bbf9b16 Discard rrouter lock
Then we can make all the actions in sequence
2011-12-30 15:00:59 -08:00
Sheng Yang
14d6c85176 bug 12727: Add arping to update the vSwitch cache
We need to broadcast all our public IP address's ARP, not only the gateway one.

status 12727: resolved fixed
2011-12-22 17:24:57 -08:00
Sheng Yang
3b2e2b079b bug 12704: Fix multiply public nics with redundant router
status 12704: resolved fixed
2011-12-21 16:01:58 -08:00
Sheng Yang
fe838c5528 bug 11233: Update switch's cache using ping
We would ping the gateway after transit to MASTER, this should speed up the
update of switch's cache.
2011-09-14 16:26:54 -07:00
Sheng Yang
ba2fc97865 bug 11351: Add monitor process for keepalived
Then when the process dead, we can know it and prevent two MASTER case happened.
2011-09-14 16:25:17 -07:00
Sheng Yang
d3b0f04877 bug 11351: Add checkrouter.sh.templ
Also modify ipassoc.sh to use checkrouter.sh
2011-09-14 16:25:03 -07:00
Sheng Yang
b007e24e59 bug 11351: Add parameters for binary file/log file 2011-09-14 16:24:50 -07:00
Sheng Yang
4bbfa2513e bug 11307: Add PRIORITY bump up script for redundant virtual routers 2011-09-14 16:18:55 -07:00
Sheng Yang
abc44ac283 bug 11266: Add lock file for every script in the systemVM
To prevent them from racy.

status 11266: resolved fixed
2011-09-09 18:27:33 -07:00
Sheng Yang
29cc88571f Redundant router script fix, also fix CheckRouterTask 2011-08-11 17:57:12 -07:00
Sheng Yang
258a1bc451 Ifdown may not bring interface down if ifup not run
Use ifconfig to bring it down
2011-08-11 15:01:02 -07:00
Sheng Yang
7807e29c30 Use ifup/ifdown for redundant router 2011-08-11 14:30:21 -07:00
Sheng Yang
5cf6feb2e5 Fix "RTNETLINK answers: No such process" when starting redundant router
The issue happened quite rare, but indeed can show.

And when the issue happen, the status of redundant router would be "Status:
FAULT".

It's due to ipassoc.sh wasn't executed before the system bring eth2 up and go to
master mode, then eth2 wasn't configured correctly. Then "ip route add default
xx" can't complete.

This commit should fixes the issue.
2011-08-10 12:06:53 -07:00
Sheng Yang
071a67dcb8 Change router to FAULT state if anything goes wrong on fail-over 2011-08-09 11:09:44 -07:00
Sheng Yang
9985df928b Try to workaround "ip route add" fail in redundant router
It's probably due to the network is not ready, so wait some time for it.
2011-08-05 16:40:57 -07:00
Sheng Yang
dc46ffb0c7 bug 9154: various fix for scripts 2011-06-22 15:30:39 -07:00
Sheng Yang
d71ed00148 bug 9154: Add more log in keepalived.log 2011-06-15 15:39:48 -07:00
Sheng Yang
819e67b189 Add file lock for keepalived scripts
They are not blocked callings.
2011-06-07 14:47:46 -07:00
Sheng Yang
2973ab5ef5 Enable multiply public ips for redundant router
Also solve duplicate mac issue.
2011-06-07 14:47:46 -07:00
Sheng Yang
62ac899091 bug 9154: Initial check in for enabling redundant virtual router
This patch enable redundant virtual routers.

1. To enable this feature, db need to be updated using follow SQL by now(we
would get a UI way later):

UPDATE network_offerings SET redundant_router=1 WHERE guest_type="Virtual" AND
system_only=0;

2. System would try to start up two routers at different hosts. But if there is
only one host in the zone, system would start up two routers on it.

3. The failover part is using keepalived, and connection tracking part is using
conntrackd. There would be one master router and one backup router. The status
of router(master or backup) can be query from the database table domain_router
now. Management server would update the status every 30s by default.

4. The routers for the same zone would use same external NIC(same ip and mac).
The script used for fail-over would ensure only one external NIC present in the
network at any time.

5. Currently management server don't got the ability to stop one of router is
both of them reported as master. The feature is in the todo list.

After two routers start up, disconnect anyone of them, the guest network
shouldn't be affected, and established connection(http, ssh, etc.) should still
works. The fail-over on gateway part should be 3~4 seconds.

Currently the patch works with KVM. Would deal with vmware and XenServer soon.
2011-06-07 14:47:45 -07:00