47c5088be0
- create separate directory '/etc/nova/nova-compute.d' where all configuration files that hold all configuration stanzas related to vmware compute driver - in simple mode we upload init script in appropriate directory and create symbolic links on it that are named like nova-compute-vmware-%cluster_id% ; script internally splits its own file name and extracts cluster name. This allow user to selectively start/stop nova-compute services. - Ubuntu init system (Upstart) requires initd service to be restarted, on CentOS we run '/bin/true' - create individual nova-compute configuration file per vSphere cluster; file is named `/etc/nova/nova-compute.d/vmware-%cluster_id%.conf', e.g. /etc/nova/nova-compute.d/vmware-0.conf - create appropriate corosync resource/primitive per nova-compute service in case of HA - currently we use same login and password for all nova-computes - set more strict access permissions (0600) on nova-compute.conf and generated files in `nova-compute.d' directory; these files hold sensitive information (credentials to vCenter server) - set 'multi_host' configuration stanza to False for both deployment modes (nonHA/HA) - add basic unit test coverage for provided functionality DocImpact Change-Id: I675dd2b7cdeacae1e703b82001dc2c855511e320 Impelements: blueprint 1-1-nova-compute-vsphere-cluster-mapping
34 lines
755 B
Plaintext
34 lines
755 B
Plaintext
# vim: set ft=upstart et ts=2:
|
|
description "Nova compute worker"
|
|
author "Soren Hansen <soren@linux2go.dk>"
|
|
|
|
start on runlevel [2345]
|
|
stop on runlevel [!2345]
|
|
|
|
chdir /var/run
|
|
|
|
pre-start script
|
|
mkdir -p /var/run/nova
|
|
chown nova:root /var/run/nova/
|
|
|
|
mkdir -p /var/lock/nova
|
|
chown nova:root /var/lock/nova/
|
|
|
|
modprobe nbd
|
|
|
|
# If libvirt-bin is installed, always wait for it to start first
|
|
if status libvirt-bin; then
|
|
start wait-for-state WAIT_FOR=libvirt-bin WAIT_STATE=running WAITER=nova-compute
|
|
fi
|
|
end script
|
|
|
|
|
|
script
|
|
if [ -r /etc/default/$UPSTART_JOB ]; then
|
|
. /etc/default/$UPSTART_JOB
|
|
fi
|
|
|
|
start-stop-daemon --start --chuid nova --exec /usr/bin/nova-compute -- --config-file=/etc/nova/nova.conf $NOVA_COMPUTE_OPTS
|
|
end script
|
|
|