More launch improvements

* launch/README: On servers where the puppet agent daemon needs to
enabled, don't run the initscript directly under sudo. Passing it
through su avoids permission issues with the puppet mysql module.

* launch/launch-node.py: Only test IPv6 connectivity when providers
support it.

Change-Id: Ic37305331ba57ba3de2fb349e1ab503cabcc697d
This commit is contained in:
Jeremy Stanley 2013-08-02 20:04:29 +00:00
parent eb1c279e9d
commit 783e9bd766
2 changed files with 6 additions and 4 deletions

View File

@ -65,12 +65,12 @@ and turn on the Puppet agent so it will start checking into the
master on its own. on Debian/Ubuntu:: master on its own. on Debian/Ubuntu::
sudo sed -i 's/^START=.*/START=yes/' /etc/default/puppet sudo sed -i 's/^START=.*/START=yes/' /etc/default/puppet
sudo invoke-rc.d puppet start sudo su -c 'invoke-rc.d puppet start'
...or on CentOS/Fedora/RHEL:: ...or on CentOS/Fedora/RHEL::
sudo chkconfig puppet on sudo chkconfig puppet on
sudo service puppet start sudo su -c 'service puppet start'
You should be able to tell from the Puppet Dashboard when it begins You should be able to tell from the Puppet Dashboard when it begins
to check in, which normally happens at 10-minute intervals. to check in, which normally happens at 10-minute intervals.

View File

@ -35,6 +35,7 @@ NOVA_PASSWORD=os.environ['OS_PASSWORD']
NOVA_URL=os.environ['OS_AUTH_URL'] NOVA_URL=os.environ['OS_AUTH_URL']
NOVA_PROJECT_ID=os.environ['OS_TENANT_NAME'] NOVA_PROJECT_ID=os.environ['OS_TENANT_NAME']
NOVA_REGION_NAME=os.environ['OS_REGION_NAME'] NOVA_REGION_NAME=os.environ['OS_REGION_NAME']
IPV6=os.environ.get('IPV6', '0') is 1
SCRIPT_DIR = os.path.dirname(sys.argv[0]) SCRIPT_DIR = os.path.dirname(sys.argv[0])
@ -79,8 +80,9 @@ def bootstrap_server(server, admin_pass, key, cert, environment, name,
ssh_client = utils.ssh_connect(ip, 'root', ssh_kwargs, timeout=600) ssh_client = utils.ssh_connect(ip, 'root', ssh_kwargs, timeout=600)
ssh_client.ssh('ping6 -c5 -Q 0x10 review.openstack.org ' if IPV6:
'|| ping6 -c5 -Q 0x10 wiki.openstack.org') ssh_client.ssh('ping6 -c5 -Q 0x10 review.openstack.org '
'|| ping6 -c5 -Q 0x10 wiki.openstack.org')
ssh_client.scp(os.path.join(SCRIPT_DIR, '..', 'install_puppet.sh'), ssh_client.scp(os.path.join(SCRIPT_DIR, '..', 'install_puppet.sh'),
'install_puppet.sh') 'install_puppet.sh')