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

« back to all changes in this revision

Viewing changes to hooks/nova_compute_utils.py

  • Committer: Ryan Beisner
  • Date: 2016-04-07 17:18:34 UTC
  • Revision ID: ryan.beisner@canonical.com-20160407171834-sadfjmzcj065x912
Set smt off and cpu-mode to host-passthrough for ppc64 architectures

When deploying a ppc64el compute node, smt needs to be
turned off and cpu-mode needs to be set to host-passthrough
for nova/libvirt/kvm use.

Change-Id: I48bd8f9e42dbc5f7c626addaa2fdd1e3f8fdd97e

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
    check_output(['chown', '-R', user, ssh_dir])
469
469
 
470
470
 
 
471
def set_ppc64_cpu_smt_state(smt_state):
 
472
    """Set ppc64_cpu smt state."""
 
473
    log('Setting ppc64_cpu smt state: %s' % smt_state)
 
474
    cmd = ['ppc64_cpu', '--smt=%s' % smt_state]
 
475
    check_output(cmd)
 
476
 
 
477
 
471
478
def import_authorized_keys(user='root', prefix=None):
472
479
    """Import SSH authorized_keys + known_hosts from a cloud-compute relation.
473
480
    Store known_hosts in user's $HOME/.ssh and authorized_keys in a path