Point upstart scripts at venv binaries
This commit is contained in:
parent
6a13a3aa97
commit
32d0181a06
@ -21,6 +21,7 @@ from charmhelpers.contrib.network.ovs import (
|
|||||||
full_restart,
|
full_restart,
|
||||||
)
|
)
|
||||||
from charmhelpers.core.hookenv import (
|
from charmhelpers.core.hookenv import (
|
||||||
|
charm_dir,
|
||||||
config,
|
config,
|
||||||
)
|
)
|
||||||
from charmhelpers.contrib.openstack.neutron import (
|
from charmhelpers.contrib.openstack.neutron import (
|
||||||
@ -265,10 +266,12 @@ def git_post_install(projects_yaml):
|
|||||||
render('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers', {},
|
render('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers', {},
|
||||||
perms=0o440)
|
perms=0o440)
|
||||||
|
|
||||||
|
bin_dir = os.path.join(charm_dir(), 'venv/bin')
|
||||||
neutron_ovs_agent_context = {
|
neutron_ovs_agent_context = {
|
||||||
'service_description': 'Neutron OpenvSwitch Plugin Agent',
|
'service_description': 'Neutron OpenvSwitch Plugin Agent',
|
||||||
'charm_name': 'neutron-openvswitch',
|
'charm_name': 'neutron-openvswitch',
|
||||||
'process_name': 'neutron-openvswitch-agent',
|
'process_name': 'neutron-openvswitch-agent',
|
||||||
|
'executable_name': os.path.join(bin_dir, 'neutron-openvswitch-agent'),
|
||||||
'cleanup_process_name': 'neutron-ovs-cleanup',
|
'cleanup_process_name': 'neutron-ovs-cleanup',
|
||||||
'plugin_config': '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
'plugin_config': '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||||
'log_file': '/var/log/neutron/openvswitch-agent.log',
|
'log_file': '/var/log/neutron/openvswitch-agent.log',
|
||||||
@ -278,6 +281,7 @@ def git_post_install(projects_yaml):
|
|||||||
'service_description': 'Neutron OpenvSwitch Cleanup',
|
'service_description': 'Neutron OpenvSwitch Cleanup',
|
||||||
'charm_name': 'neutron-openvswitch',
|
'charm_name': 'neutron-openvswitch',
|
||||||
'process_name': 'neutron-ovs-cleanup',
|
'process_name': 'neutron-ovs-cleanup',
|
||||||
|
'executable_name': os.path.join(bin_dir, 'neutron-ovs-cleanup'),
|
||||||
'log_file': '/var/log/neutron/ovs-cleanup.log',
|
'log_file': '/var/log/neutron/ovs-cleanup.log',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ end script
|
|||||||
|
|
||||||
pre-start script
|
pre-start script
|
||||||
[ ! -x /usr/bin/{{ process_name }} ] && exit 0
|
[ ! -x /usr/bin/{{ process_name }} ] && exit 0
|
||||||
start-stop-daemon --start --chuid neutron --exec /usr/local/bin/{{ process_name }} -- \
|
start-stop-daemon --start --chuid neutron --exec {{ executable_name }} -- \
|
||||||
--log-file /var/log/neutron/{{ log_file }} \
|
--log-file /var/log/neutron/{{ log_file }} \
|
||||||
--config-file /etc/neutron/neutron.conf --verbose
|
--config-file /etc/neutron/neutron.conf --verbose
|
||||||
end script
|
end script
|
||||||
|
@ -13,6 +13,6 @@ pre-start script
|
|||||||
chown neutron:root /var/run/neutron
|
chown neutron:root /var/run/neutron
|
||||||
end script
|
end script
|
||||||
|
|
||||||
exec start-stop-daemon --start --chuid neutron --exec /usr/local/bin/{{ process_name }} -- \
|
exec start-stop-daemon --start --chuid neutron --exec {{ executable_name }} -- \
|
||||||
--config-file=/etc/neutron/neutron.conf --config-file={{ plugin_config }} \
|
--config-file=/etc/neutron/neutron.conf --config-file={{ plugin_config }} \
|
||||||
--log-file={{ log_file }}
|
--log-file={{ log_file }}
|
||||||
|
Loading…
Reference in New Issue
Block a user