~openstack-charmers-next/charms/xenial/nova-compute/trunk

« back to all changes in this revision

Viewing changes to hooks/nova_compute_hooks.py

  • Committer: James Page
  • Date: 2015-09-01 09:34:31 UTC
  • mfrom: (151.1.12 trunk)
  • Revision ID: james.page@ubuntu.com-20150901093431-ectw9sny3cuzhxqn
[gnuoy,james-page,r=james-page] Add optional support for hugepage qemu configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    get_topics,
66
66
    assert_charm_supports_ipv6,
67
67
    manage_ovs,
 
68
    install_hugepages,
68
69
)
69
70
 
70
71
from charmhelpers.contrib.network.ip import (
140
141
    if is_relation_made("nrpe-external-master"):
141
142
        update_nrpe_config()
142
143
 
 
144
    if config('hugepages'):
 
145
        install_hugepages()
 
146
 
143
147
    CONFIGS.write_all()
144
148
 
145
149
 
328
332
 
329
333
@hooks.hook('upgrade-charm')
330
334
def upgrade_charm():
 
335
    # NOTE: ensure psutil install for hugepages configuration
 
336
    apt_install(filter_installed_packages(['python-psutil']))
331
337
    for r_id in relation_ids('amqp'):
332
338
        amqp_joined(relation_id=r_id)
333
339