30 Commits

Author SHA1 Message Date
Sheng Yang
dabea9da08 CLOUDSTACK-3533: Add space after IP for dhcp_release
To prevent use the wrong mac of the IP with same prefix.

Thanks to Wei Zhou's comment!
2013-07-24 00:50:57 -07:00
Sheng Yang
b6f7dccf0b CLOUDSTACK-3533: Fix missing parameter of dhcp_release 2013-07-24 00:04:44 -07:00
Sheng Yang
1ca4f66306 CLOUDSTACK-3533: Fix dhcp_release for IPv6
dhcp_release doesn't support IPv6, though it won't return failure(that's a bug
that has been fixed in recent release). So if it's IPv6, we would still use the
old way(restart dnsmasq) to refresh the lease.
2013-07-23 18:09:05 -07:00
Sheng Yang
9fe1a2b9fa CLOUDSTACK-3540: Fix edithosts.sh to prevent removing active dhcp entries
IP match must terminated by comma.
2013-07-15 18:01:57 -07:00
Jayapal
baf681c16d CLOUDSTACK-3533 Fixed dhcphosts.txt for two entries and also dhcp_relase for ipv6 2013-07-15 20:02:31 +05:30
Jayapal
6c6217594d Revert "CLOUDSTACK-3424 Fixed dhcphosts entry and also dhcp_relase for ipv6"
This reverts commit f37567ef45fe6e41469a176d387e91840bfae23c.
This deletes the duplicate entry when new vm came with deleted vm ip.
So will not fix the bug CLOUDSTACK 3424 fully. So this changes will be committed into new bug
2013-07-15 18:44:22 +05:30
Jayapal
f37567ef45 CLOUDSTACK-3424 Fixed dhcphosts entry and also dhcp_relase for ipv6 2013-07-15 18:15:34 +05:30
Jayapal
4779a00594 CLOUDSTACK-3404 fixed vm deploy in ipv6 network, dhcp_release is performed only in ipv4 2013-07-09 13:15:45 +05:30
Jayapal
daa4c326aa CLOUDSTACK-3312 Updated dhcp_release to listen on eth0 in edithosts.sh 2013-07-04 16:36:50 +05:30
Alena Prokharchyk
d66e9c7b51 CLOUDSTACK-2843: Provideded an ability to turn off the synchronization being done on the CS agent side,
for number of commands participating in Vm deployment process, as parallel deployment is supported on the hypervisor side.
The behavior is controlled by global config varirables:

"execute.in.sequence.hypervisor.commands" (false by default) sets/resets the synchronization for commands:
=========================
StartCommand
StopCommand
CreateCommand
CopyVolumeCommand

"execute.in.sequence.network.element.commands" (false by default) sets/resets the synchronization for commands:
==========================
DhcpEntryCommand
SavePasswordCommand
UserDataCommand
VmDataCommand

As a part of the fix, increased the global lock timeout to 30 mins in several VR scripts:
===========================
edithosts.sh
savepassword.sh
userdata.sh

to support situations when multiple concurrent calls to the script are being made.
2013-06-19 10:12:13 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
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
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
anthony
e936257674 CLOUDSTACK-1199: add external DNS to dnsmasq configuration file 2013-02-08 16:30: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
9300a02ba4 IPv6: Update edithosts.sh accept parameters 2013-01-26 23:14:27 -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
Gavin Lee
39a676c496 Correct license header mainly for patches folder
Signed-off-by: Chip Childers <chip.childers@gmail.com>
I've assumed that Gavin's commit is appropriate, based
on an assumption that we will keep these files in the source
tree.  If https://issues.apache.org/jira/browse/LEGAL-146
results in a different opionion from the members, then we
will end up having to do something more drastic anyway.
2012-08-31 10:50:46 -04:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
Sheng Yang
1ca493e4fa bug 14042: Don't set dhcp:router option on DHCP server for non-default network on CentOS/RHEL
The routing table with two nics may be messed up, due to we sent same
router(gateway) information from different DHCP server, in order to specify
default gateway. E.g.

Network A: 192.168.1.0/24, gw 192.168.1.1
Network B: 192.168.2.0/24, gw 192.168.2.1

User VM: Nic 1 connect to network A, get ip 192.168.1.10; nic 2 connect to
network B, get ip 192.168.2.10.

Set network A as the default network of user VM.

Currently we would send this information to user VM through DHCP offer:
In network A: dhcp-option:router 192.168.1.1
In network B: dhcp-option:router 192.168.1.1

So both NIC in the guest VM would receive 192.168.1.1 as router(gateway).

But, in CentOS 5.6, dhclient-scripts try to tell if the gateway is reachable
for current subnet.

So when we try to enable nic 2(eth1) of user VM, dhclient would receive:
IP: 192.168.2.10
Mask: 255.255.255.0
Router: 192.168.1.1

Then it would found that the specified gateway(router) is not within its own
subnet(192.168.2.0/24). But since we send out this ip(192.168.1.1) as the
gateway for it, dhclient thought that it should got someway to access the
network through this IP. So it would execute:

ip route add 192.168.1.1 dev eth1
ip route replace default via 192.168.1.1 dev eth1

But it can never reach 192.168.1.1(which is in the eth0's subnet and the
gateway of eth0) by go through eth1 interface. So it is messed up.

We've tested Windows 2008 R2, CentOS 5.3, CentOS 5.6 and Ubuntu 10.04. Windows
and Ubuntu are fine with above policy.

To solve this, we send different dhcp:router option according to the guest OS
type now.

We may need expand this list later, but for now we only know that CentOS and
RHEL would behavior in this way.

status 14042: resolved fixed
2012-03-21 10:38:18 -07:00
frank
52610ffcb3 add copyright header to shell scripts 2012-01-11 18:41:53 -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
Chiradeep Vittal
797836723d bug 10804: add default dns provider 2011-12-05 16:56:31 -08:00
Chiradeep Vittal
89f13ad700 bug 10804 virtual router support for per-vm default network 2011-12-05 14:53:42 -08:00
Sheng Yang
c47bc3664e Add rrouter lock for edithost.sh and ipassoc.sh 2011-09-14 16:26:09 -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
7ccc833114 Fix potential redundant router FAULT state by dnsmasq
This message may show during redundant router start up:

FAULT (Restarting DNS forwarder and DHCP server: dnsmasq failed!)

This caused by edithost.sh is racy with keepalived process. They both want to
restart dnsmasq.

Even in normal condition, it's very hard to reproduce this bug. Add file lock
for edithost.sh should solve it.
2011-08-19 16:11:48 -07:00
Sheng Yang
9f6dc993ab Fix dhcp_entry.sh fail on redundant router
And don't worry about "chkconfig dnsmasq off", because keepalived script should
take care of it.
2011-08-10 17:13:45 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
edison
e67e7d0e7b remove patches/systemv, and mv tools/systemvm into patches 2010-10-05 20:41:39 -07:00