119 Commits

Author SHA1 Message Date
Sheng Yang
55eb0e4b65 bug 11003: Fix HAproxy with new template
New debian package didn't create directory /var/lib/haproxy, which result in
haproxy fail to work.

status 11003: resolved fixed
2011-08-08 13:36:53 -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
Abhinandan Prateek
dae2f4d958 bug 10748: fixed it when the VM acts as a dhcp server only
status 10748: resolved fixed
2011-08-05 12:07:59 +05:30
Naredula Janardhana Reddy
954d8673c7 bug 10561: Allowing ICMP traffic through static NAT 2011-08-03 18:13:09 +05:30
Abhinandan Prateek
f6303c13fb bug 10812: putting key in ZoneConfig and other nomenclature changes 2011-08-03 14:42:29 +05:30
Abhinandan Prateek
2f804dd799 bug 10748: use external dns, configurable thru global param 2011-08-02 16:21:55 +05:30
Abhinandan Prateek
5cb3882349 bug 10812: adding domain suffixes to zone's router conf 2011-08-02 11:23:33 +05:30
Naredula Janardhana Reddy
2fc7be14de bug 10557: implemented the TODO - opening the stats port using iptable 2011-07-28 17:24:10 +05:30
Naredula Janardhana Reddy
e19c51e68c bug 10800: iptable rable restore upon failure is changed 2011-07-28 13:43:07 +05:30
Kelven Yang
9761661989 bug 10855: fix a typo when merging git conflicts 2011-07-26 10:50:33 -07:00
Kelven Yang
db29f7792c bug 10855: the issue is caused by expanding content that has space inside at sub-shell, use back quote substitution to enforce the correct shell macro expansion 2011-07-26 10:50:10 -07:00
Naredula Janardhana Reddy
67dc2ec915 bug 10800: Load balancer - deleted settings from UI not removed from the Iptables 2011-07-26 15:28:01 +05:30
Edison Su
3a17b37808 fix meta data returning 404 issue on vmware 2011-07-25 21:17:42 -07:00
Abhinandan Prateek
dff712f2a9 bug 10731: sending source cidrs to the required router element, on domR allowing these source cidrs thru iptables
status 10731: resolved fixed
2011-07-21 13:48:42 +05:30
Sheng Yang
04cdca07fa Enforce redundant router command line checking in patchsystemvm.sh 2011-07-19 15:41:14 -07:00
Edison Su
a622b48d32 It breaks port forwording.
Revert "bug 10329: changed - t :"

This reverts commit 16779afa0233e6ff33cdfca12611e6a43bcd0b42.
2011-07-08 13:52:49 -07:00
Edison Su
399c1addb9 fix meta issue for vmware: create a blank meta data file, even meta data is empty 2011-07-08 13:51:30 -07:00
Abhinandan Prateek
6b7279598e bug 10329: changing - to : in port range
status 10329: resolved fixed
2011-07-07 11:46:17 +05:30
Sheng Yang
dc46ffb0c7 bug 9154: various fix for scripts 2011-06-22 15:30:39 -07:00
Sheng Yang
bbb0f41a92 Fix ipassoc.sh with new added nic
The script should bring the new created interface up.
2011-06-20 17:21:32 -07:00
Sheng Yang
d71ed00148 bug 9154: Add more log in keepalived.log 2011-06-15 15:39:48 -07:00
anthony
0f340c199f align system VM partitions with 4k 2011-06-14 11:47:07 -07:00
Sheng Yang
29c54c42e0 Fix hostname in the generated vm template
The ssh_host_*_key.pub in /etc/sshd contained generator's own hostname. This
patch fixes it.
2011-06-14 11:29:12 -07:00
Sheng Yang
b1ced0e478 Fix buildsystem.sh script
And the script can only be used with the machine installed grub-legacy(e.g. grub
0.97) rather than grub2(grub-pc).
2011-06-13 19:37:21 -07:00
Kelven Yang
1e9efb2f86 bug 10214: merge fixes from 2.2.8/2.2.4 2011-06-10 14:29:01 -07:00
Sheng Yang
e92d00d3bf bug 9495: Fix DomR logging error on boot
status: resolved fixed
2011-06-09 15:04:35 -07:00
Kelven Yang
dae72c26b0 bug 10093: always create .htaccess in DomR 2011-06-08 16:56:41 -07:00
Sheng Yang
5db86e6c20 Fix CheckRouterAnswer's isMaster report
If we got invalid/unsuccessed answer from CheckRouterAnswer, set master to
false.

Also add missed scripts.
2011-06-07 14:47:46 -07:00
Sheng Yang
8542c9ca13 Fix keepalived start up issue
Sometime when keepalived start up(during system boot up period), it would fail
to(likely due to unable to receive the packet), and think itself is the only
router, then make itself master.

Add 10 seconds delay after start up to work around the issue.
2011-06-07 14:47:46 -07:00
Sheng Yang
58ade71a5b Enable only vrrp mode of keepalived 2011-06-07 14:47:46 -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
anthony
37e6ded80c bug 10023: only set ip route for internal DNS
status 10023: resolved fixed
2011-05-25 17:39:20 -07:00
Edison Su
a13be45f7b bug 8350:
haproxy tunning:
0. Test case:
   httpd running in 5 user VMs, all of them created on a xenserver host(16 core, 42G memroy, 10G network)
   domR running on an anther host with same hardware configuration.
   test application, ab, running on anther host behind an anther seperate switch
1.haproxy is not a memory intensive app. I can get 4625.96 connection/s with 1G memory. While it's really a CPU intensive app, domR always uses around 100% CPU on the host.
2.By default, you can't get better connection/s rate, because ip_conntrack_max and tw_bucket are too small, you will see the error in domR like:
   "TCP: time wait bucket table overflow" or "nf_conntrack: table full, dropping packet".
  So I increase these numbers to 1000000 from 65536, then I can steadly get around 4600 connection/s when memory is >= 1G.

  Here is the connection per second, tested by "ab -n 1000000 -c 100 http://192.168.170.152:880/test.html"
  domR memory   conn/s
  128M:         3545.55
  256M:         4081.38
  512M:         4318.18
  1G:           4625.96
  7G:           4745.53

3. If I enable notrack for both connections between domr/user vm, and public network, that tell iptable in domR don't track the connection during my test, then I can get better number, around
5800 connections/s. But we can't enable notrack, as iptables is used to track throughput in domR.

4. In a word, with this commit, the connection rate of haproxy can be increased from 1000-2000/s to 4700/s when domR's memory is larger than 1G.

5. How many CPU need to assign to domR to get this number?  Haven't finished yet, as CPU is shared by all the VMs on the host, if other VMs are busy, it will impact the performance of haproxy.
2011-05-21 21:05:28 -04:00
Chiradeep Vittal
99c8830a2e Update README for building systemvm 2011-05-20 17:52:27 -07:00
Sheng Yang
ae1753c997 Revert "Add error check for buildsystemvm.sh"
This reverts commit a2c7e6f5bf5985d47f9ef25d1569931f28ff4258.
2011-05-17 14:16:25 -07:00
Sheng Yang
7bdaa210a1 Add error check for buildsystemvm.sh
set -e can stop the script if something went wrong. set -u can stop on
uninitialized variable reference.
2011-05-16 13:57:05 -07:00
Abhinandan Prateek
6707048fd5 bug 9869: if several port forwarding rules are deleted in quick succession it makes the router iptables inconsistent
status 9869: resolved fixed
2011-05-16 13:49:24 +05:30
Chiradeep Vittal
8ac4605a0f bug 9771: also for vmware 2011-05-12 15:07:16 -07:00
Abhinandan Prateek
d8b7f5c19b bug 8115: Source IP filtering in Virtual Router
status 8115: resolved fixed

Changes to the router firewall.sh patch to add cidrs
2011-05-12 15:20:00 +05:30
Chiradeep Vittal
515981a436 bug 9544: deal with same ports forwarded from different public ips
status 9544: resolved fixed
2011-05-05 16:49:49 -07:00
Frank
3b75abbde7 Fix DomR reply to windows's periodical DNS requirement 2011-04-21 11:23:23 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
Kelven Yang
253b8837b4 Fix a problem in userdata.sh to set permissions in .htaccess file, extra quot cause apache internal server error 2011-04-12 14:37:09 -07:00
Chiradeep Vittal
1e6024b83f bug 8959: 1. rp_filter prevents connections that span eth2 and eth3 because of default route
2. delete before add of default nat rules
status 8959: resolved fixed
2011-04-04 18:59:40 -07:00
Edison Su
8b3e22e84c enable serial console for system vm, to make debug easier 2011-03-31 19:11:09 -04:00
Edison Su
9854db7dcd bug 8459: acpiphp and pci_hotplug modules need to be auto loaded in domr
status 8459: resolved fixed
2011-03-31 19:11:06 -04:00
Murali Reddy
1b251a5fc8 Bug 4061: support for Microsoft Hyper-V changes- part 1 2011-03-30 18:48:51 +05:30
Kelven Yang
342648244d bug 8994: fix issues in userdata.py to support user_data in vmware 2011-03-23 13:34:40 -07:00