452 Commits

Author SHA1 Message Date
Marcus Sorensen
9670553ea8 In system vm, wait for interface to be available before configuring gateway.
Previous patch to this only did so for system vms with a $3 interface, usually
eth2. System VMs that only provide DNS wouldn't get a gateway, for example.

BUG-ID: CLOUDSTACK-1565
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1365617851 -0600
2013-04-10 12:17:31 -06:00
Marcus Sorensen
be55c5b3a5 VPC - new system vm doesn't bring up eth0 reliably, and we don't set eth0 to
auto start like we should.  cloud-early-config sets 'auto lo $1', but we don't
pass $1 in vpc router scenario like we do in others for some reason. eth0 is
always link local in vpc router, so setting it to that.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1365546368 -0600
2013-04-09 16:26:08 -06:00
Hugo Trippaers
c9c68e1928 Replace restart with SIGHUP
This signal will force the dnsmasq daemon to reload the configuration directly. This is much faster than restarting the daemon, which result in a much smaller window during which no dns server is available.

Tested by using the replaced version of edithosts.sh on a running vrouter causing dns problems.
2013-04-07 21:46:38 +02:00
Marcus Sorensen
8eb3ebbe1a Summary: CLOUDSTACK-1565 - Waits for ip to come up before setting default route
Submitted-by: Jayapal Reddy <jayapalreddy.uradi@citrix.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1364226284 -0600
2013-03-25 09:46:47 -06:00
Rohit Yadav
c9082c9126 CLOUDSTACK-1643: Don't force load aesni_intel module, fix as per Chiradeep
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-03-14 11:52:06 +05:30
Sheng Yang
630e75596e CLOUDSTACK-1653: Redundant router: Fix check_heartbeat.sh malfunctional due to delayed cron job
The interval between keepalived.ts and keepalived.ts2 should be >= 60 seconds in
normal condition, because every 10 seconds keepalived.ts would be updated, and
at least every 60 seconds, keepalived.ts would be copy to keepalived.ts2.

If the interval is less than 60 seconds, then keepalived process failed to
update keepalived.ts every 10 seconds.

Take some delay of updating into consideration, check_heartbeat.sh would use 30
seconds as a way to tell keepalived process is alive or not.
2013-03-12 18:31:31 -07:00
Rohit Yadav
b5f367e75a CLOUDSTACK-1643: Check and enable Intel AES NI if available for VR
This is an encryption optimization for VPN/SSL, with upto 10x advertised speed.
The patch check for the aesni_intel module if aes is available on the cpu, this
will be true for HVMs.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-03-12 16:34:50 +05:30
Sheng Yang
e35ce6587a CLOUDSTACK-1461: Don't set dns server for non-default ipv6 network
The non-default parameter can be used by ipv4 as well in the future.
2013-03-08 17:43:23 -08:00
Marcus Sorensen
9ad54a082c Summary: KVM - use virtio socket to communicate config to system vms
Detail: This gets rid of the patchdisk method of passing cmdline and
authorized_keys to KVM system VMs. It instead passes them to a virtio socket,
which the KVM guest reads from the character device /dev/vport0p1 during
cloud-early-config. Tested to work on CentOS 6.3 and Ubuntu 12.04. Should
work with even older versions of libvirt.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1362691685 -0700
2013-03-07 14:28:05 -07:00
Sheng Yang
7602997b90 CLOUDSTACK-1521: Stop services after switch to BACKUP 2013-03-05 15:58:57 -08:00
Sheng Yang
dd721a832a CLOUDSTACK-1522: Add timestamp to lock
Use higher precision timestamp rather than file timestamp to find out the order
of lock requester
2013-03-05 15:58:57 -08:00
Marcus Sorensen
7dbea68b87 Summary: Wait for VPC router nics to hotplug before assigning IPs
Detail: CLOUDSTACK-1452, CLOUDSTACK-1523 - When rebooting VPC routers, ip addr
assignment was inconsistent, sometimes the assignment would be attempted while
router was still setting up nic device. This adds a watch for the nic to show
up before attempting to add an ip to a nic.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1362521453 -0700
2013-03-05 15:10:53 -07:00
Sheng Yang
89dee27503 CLOUDSTACK-1414: Reduce arping time to nearly 0
In the previous version it would take at least 1 seconds for arping, and it
would be big if the VR has more than 30 IPs - our biglock default timeout is 30
seconds.

Fix it by send out two arping immediately, and then sleep 1 second for router to
update arp cache.
2013-02-26 12:39:15 -08:00
Sheng Yang
a1b33cadf5 CLOUDSTACK-1332: Enable IPv6 dns in VR 2013-02-25 19:12:15 -08:00
Rohit Yadav
80d58b6c73 CLOUDSTACK-1317: Bump CloudStack package version to 4.2.0-SNAPSHOT in all poms
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-20 16:42:56 +05:30
Chiradeep Vittal
5c077f3413 CLOUDSTACK-1265: /etc/init.d/dnsmasq puts pid in /var/run/dnsmasq/dnsmasq.pid
logrotate checks /var/run/dnsmasq.pid instead and may not send SIGUSR2 to dnsmasq to start writing to the new log file instead
2013-02-13 14:33:41 -08:00
Wei Zhou
1e24892dfe If filesystem in virtual router is in read-only state, reports error to
commands send to virtual router, instead of keeping silence.

Test:

Before change:
(1) Acquire IP. always in "Allocating" state.
(2) EnableStaticNat, the result is success(it is incorrect).
(3) DisableStaticNat, will get error message.. This is correct.
(4) Add Firewalls. always in "Adding" state.
(5) The AgentManager report statistics every 60 minutes(normally it
should be router.stats.interval=5 minutes).

After change:
(1) Acquire IP, will get error message.
(2) EnableStaticNat, will get error message.
(3) DisableStaticNat, will get error message.
(4) Add Firewalls, will get error message. But the firewall rules are
saved in database.
(5) The AgentManager report statistics every 5 minutes, except the
network with read-only FS virtual router.
2013-02-12 09:22:04 -08:00
anthony
e936257674 CLOUDSTACK-1199: add external DNS to dnsmasq configuration file 2013-02-08 16:30:32 -08:00
Sheng Yang
5cb9df91a1 Merge branch 'ipv6'
Conflicts:
	api/src/com/cloud/network/NetworkProfile.java
2013-01-31 15:07:33 -08:00
Jayapal
b6727e5646 CLOUDSTACK-299: Egress firewall rules feature for guest network on VR 2013-01-31 11:20:47 +05:30
Jayapal
48fdc25daa CLOUDSTACK-299: Egress firewall rules feature for guest network on VR 2013-01-31 10:57:30 +05:30
Sheng Yang
dfc9dc19f8 IPv6: Add IPv6 address to router in /etc/hosts 2013-01-29 22:08:32 -08:00
Sheng Yang
8f66d266b3 IPv6: Enable VR's ability to provide DHCPv6 service 2013-01-26 23:14:42 -08:00
Sheng Yang
f89c66070b IPv6: Update dnsmasq.conf to new version 2013-01-26 23:14:35 -08:00
Sheng Yang
9300a02ba4 IPv6: Update edithosts.sh accept parameters 2013-01-26 23:14:27 -08:00
Sheng Yang
6169c1d724 IPv6: Enable IPv6 address for router 2013-01-26 23:14:21 -08:00
Sheng Yang
a5ac88db88 CLOUDSTACK-938: Add missing checkbatchs2svpn.sh 2013-01-18 11:01:00 -08:00
Marcus Sorensen
e37a82375c Summary: Fix rp_filter for VPC router
Detail: VPC router was being treated like normal VR, which was an issue because
normally the VR has an eth0,1,2 which are isolated, linklocal, and public
networks respectively. rp_filter is turned on for eth0,1 and off for 2
(hardcoded). VPC however comes up with eth0,1 as public, linklocal, and no other
interfaces until new isolated networks are added, so the process doesn't work.
This change turns on rp_filter as new isolated networks are added to the VR.

BUG-ID: CLOUDSTACK-938
Bugfix-for: 4.0.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358451991 -0700
2013-01-17 12:51:38 -07:00
Sheng Yang
0b60dda1e6 Correct the license information of services.sh 2012-12-21 15:32:36 -08:00
Sheng Yang
911f8c33c5 Fix broadcast address is 0.0.0.0 on additional public vlan issue 2012-12-21 15:22:15 -08:00
Sheng Yang
5eba489198 Redundant Router: Restart vpn related services when redundant router fail-over 2012-12-21 15:22:03 -08:00
Sheng Yang
7926e66afa Redundant router: Fix wrong log attend to keepalived.log
If something got wrong with passwd_server_ip script, it would output to
keepalived.log, thus cause other scripts malfunctional.

Also make savepassword.sh using the same lock as serve_password.sh.
2012-12-21 15:21:49 -08:00
Edison Su
b70c1a5a84 Backs NFS-based secondary storage with an S3-compatible object store. Periodically, a reaper thread synchronizes templates and ISOs stored on a NFS secondary storage mount with a configured S3 object store. It also pushes snapshots to the object store when they are created and downloads them in other zones on-demand. In addition to permitting the use of commodity or IaaS storage solutions for static assets, it provides a means of automatically synchronizing template and ISO assets across multiple zones. 2012-12-13 23:18:37 -08:00
Atsushi Midorikawa
15704cfa6c virtual router: edithosts.sh cleanup fails on existing hosts
The already deleted same hostname  is not deleted from /etc/hosts of
vRouter.

vRouter's /etc/hosts format:
$ip $host

This patch fixes deletion logic below.
sed -i /"$host "/d $HOSTS

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-13 23:02:14 -08:00
ilya musayev
8ff8673f73 Fixed ARP issue that affected VmWare with Adavanced Network Zone that use Multiple vSwitches 2012-12-07 16:24:24 -06:00
Marcus Sorensen
82a7e49fad Summary: Add TCP to DNS firewall settings for virtual routers
Detail: TCP is occasionally used for certain DNS query types

BUG-ID: CLOUDSTACK-535
Bugfix-for: 4.0.1
Reported-by: Tamas Monos
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1353946670 -0700
2012-11-26 09:21:32 -07:00
Rohit Yadav
ac1920ee9d CLOUDSTACK-500: Fix race condition between password server and iptables-persistent
Fixes order of service startup. Fixes file redirectors.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-23 15:43:11 +05:30
Marcus Sorensen
b8af4278d0 Summary: VPC router needs /etc/hosts entry
Detail: This adjusts cloud-early-config to properly set the host entry for a
   vpc router. We were previously using the hostname command prior to the actual
   hostname being set, now we use the NAME variable passed to us.

BUG-ID: CLOUDSTACK-502
Bugfix-for: 4.0.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1353083661 -0700
2012-11-16 09:34:21 -07:00
Wido den Hollander
e477e1b78d CLOUDSTACK-448: Detect when running inside Xen HVM
This was reported by Jason Bausewein <jason.bausewein@tier3.com>
2012-11-09 14:05:27 +01:00
Hugo Trippaers
6c411fb249 Summary: cleanup up dependencies
Fixing some dependency issues, console-proxy only depends on agent (and
the core,api,utils via agent) and patches depends on nothing as its just
creating an achive with scripts
2012-11-07 17:50:02 +01:00
Hugo Trippaers
4a5b9be32a Summary: making the patches should happen in the package phase 2012-11-07 16:28:07 +01:00
Marcus Sorensen
761b4f60a1 Summary: Fix virtual router trying to resolve own host name (v2)
Detail: Make change in 95df86e1e030ab955ac09f145df37f3aef606c05 be specific
to VPC.

BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1351695701 -0600
2012-10-31 09:01:41 -06:00
marcus
95df86e1e0 Summary: Fix virtual router trying to resolve own host name
Detail: Several virtual router configuration commands, such as iptables
commands, run slowly due to attempting to do a name lookup on the virtual
router's hostname and having to time out. This is seen in the agent logs when
a virtual router command is run, as "unable to resolve host r-410-VM" or
similar. This can make for very slow router configuration, especially as the
number of network rules grows. This change simply sets the router's name to
the localhost IP in /etc/hosts

BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <shadowsor@gmail.com> 1351659441 -0600
2012-10-30 22:57:21 -06:00
Rohit Yadav
dbe88c1ed3 CLOUDSTACK-417: Handle passwd-srvr securely on VR, port 8080
By default do not enable port 8080 in iptables-router. Since, the socat
server which serves the password is in an infinite loop, any incorrect
attempt is returned bad_request and passwd-srvr won't break.

When /etc/init.d/cloud-passwd-srvr is started:
  - It finds and removes any old rules on port 8080, eth0
  - It applies iptables rule that accepts only traffic from private cidr.

When cloud-passwd-srvr is stopped:
  - It removes iptables rules on port 8080, eth0

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-26 21:37:32 +05:30
Edison Su
4c35fae49e switch to ant target to create cloud-scripts.tgz, as there is assumption that the owner of files in this tgz is root. 2012-10-21 00:01:48 -07:00
Rohit Yadav
e528ef0377 patches: add nonoss profile
Add nonoss profile, and dependency vmware-base and plugin-hypervisor-vmware

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-11 14:40:38 +05:30
Sheng Yang
5ff1c52e40 CS-16441: Clear /tmp for file locks when starting up 2012-10-03 17:19:47 -07:00
Alex Huang
25e8deb679 Applied review #7342 2012-10-01 17:34:56 -07:00
Hugo Trippaers
aa6355ffe6 Updated master to 4.1.0
mvn release:update-versions -DautoVersionSubmodules=true -Dnonoss -P
client,deps,developer  -DdevelopmentVersion=4.1.0-SNAPSHOT
2012-10-01 11:00:55 -07:00
Anthony Xu
12d12ac54c CS-16409 : dhcp request doesn't have target ip, remove ip in the iptable rule 2012-10-01 10:27:42 -07:00