Misc fixes from yolanda.

This commit is contained in:
James Page 2013-04-08 12:25:17 +01:00
commit 2b0ec42777
4 changed files with 9 additions and 2 deletions

View File

@ -55,7 +55,10 @@ def modify_config_file(nova_conf, values):
with open(nova_conf, "w") as f:
config.write(f)
f.close()
# add line at the end, it's a dupe and configparser doesn't handle it
with open(nova_conf, "a") as f:
f.write("notification_driver=nova.openstack.common.notifier.rabbit_notifier\n")
except IOError as e:
juju_log('ERROR', 'Error updating nova config file')
sys.exit(1)

View File

@ -10,6 +10,8 @@ import ceilometer_utils
def install():
utils.configure_source()
utils.install(*ceilometer_utils.CEILOMETER_AGENT_PACKAGES)
ceilometer_utils.modify_config_file(ceilometer_utils.NOVA_CONF,
ceilometer_utils.NOVA_SETTINGS)
port = ceilometer_utils.CEILOMETER_PORT
utils.expose(port)
@ -38,6 +40,7 @@ def render_ceilometer_conf(context):
if (context and os.path.exists(ceilometer_utils.CEILOMETER_CONF)):
# merge contexts
context['service_port'] = ceilometer_utils.CEILOMETER_PORT
context['ceilometer_host'] = utils.get_unit_hostname()
with open(ceilometer_utils.CEILOMETER_CONF, "w") as conf:
conf.write(utils.render_template(

View File

@ -1 +1 @@
16
18

View File

@ -12,3 +12,4 @@ os_tenant_name = {{ keystone_os_tenant }}
os_username = {{ keystone_os_username }}
os_password = {{ keystone_os_password }}
logdir = /var/log/ceilometer
host = {{ ceilometer_host }}