Module not working with new auth_keys

Bug #1521539 reported by Bruno Bompastor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-nova
Fix Released
Medium
Bruno Bompastor

Bug Description

I was running packstack liberty with nova-network (packstack --allinone --os-neutron-install=n) and while using the nova puppet module i got this error:

tar --dereference -cpzf - apache ceilometer certmonger cinder concat firewall glance galera heat horizon inifile ironic keystone manila memcached mongodb mysql neutron nova nssdb openstack packstack qpid rabbitmq redis remote rsync sahara ssh stdlib swift sysctl tempest trove vcsrepo vlan vswitch xinetd openstacklib | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@ tar -C /var/tmp/packstack/d06694dbe4854211ba6ebbc7c9b85f54/modules -xpzf -
2015-11-25 11:03:08::ERROR::run_setup::1017::root:: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 992, in main
    single_step_aio_install(options, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 760, in single_step_aio_install
    single_step_install(options, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 791, in single_step_install
    _main(options, answerfilepath, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 660, in _main
    runSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 627, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/setup_controller.py", line 81, in runAllSequences
    sequence.run(config=self.CONF, messages=self.MESSAGES)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 109, in run
    step.run(config=config, messages=messages)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 50, in run
    self.function(config, messages)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/puppet_950.py", line 209, in apply_puppet_manifest
    wait_for_puppet(currently_running, messages)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/puppet_950.py", line 123, in wait_for_puppet
    validate_logfile(log)
  File "/usr/lib/python2.7/site-packages/packstack/modules/puppet.py", line 107, in validate_logfile
    raise PuppetError(message)
PuppetError: Error appeared during Puppet run: _nova.pp
Error: File: /etc/nova/nova.conf does not contain all required sections. Nova types will not work if nova is not correctly configured.^[[0m
You will find full trace in log /var/tmp/packstack/20151125-103231-TvYGcA/manifests/_nova.pp.log

It seems that nova provider needs to update the auth_keys. I fixed it with this patch:

Author: Bruno Bompastor <email address hidden>
Date: Wed Nov 25 11:28:17 2015 +0100

    Update auth keys for nova

diff --git a/lib/puppet/provider/nova.rb b/lib/puppet/provider/nova.rb
index 06b90c5..1faa51b 100644
--- a/lib/puppet/provider/nova.rb
+++ b/lib/puppet/provider/nova.rb
@@ -39,8 +39,8 @@ class Puppet::Provider::Nova < Puppet::Provider

   def self.get_nova_credentials
     #needed keys for authentication
- auth_keys = ['auth_host', 'auth_port', 'auth_protocol',
- 'admin_tenant_name', 'admin_user', 'admin_password']
+ auth_keys = ['auth_uri', 'admin_tenant_name', 'admin_user',
+ 'admin_password']
     conf = nova_conf
     if conf and conf['keystone_authtoken'] and
         auth_keys.all?{|k| !conf['keystone_authtoken'][k].nil?}
@@ -59,7 +59,7 @@ class Puppet::Provider::Nova < Puppet::Provider

   def self.get_auth_endpoint
     q = nova_credentials
- "#{q['auth_protocol']}://#{q['auth_host']}:#{q['auth_port']}/v2.0/"
+ "#{q['auth_uri']}"
   end

   def self.auth_endpoint

Cheers,

Bruno Bompastor.

affects: puppet-nova → packstack
Revision history for this message
Emilien Macchi (emilienm) wrote :

@Bruno, thank you for your bug report. Are you willing to submit a patch in openstack/puppet-nova?

affects: packstack → puppet-nova
Changed in puppet-nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Bruno Bompastor (bruno-bompastor) wrote :

Sure, I will take care of that.

Changed in puppet-nova:
assignee: nobody → Bruno Bompastor (bruno-bompastor)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/252326

Changed in puppet-nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-nova (master)

Reviewed: https://review.openstack.org/252326
Committed: https://git.openstack.org/cgit/openstack/puppet-nova/commit/?id=b7c535598246e12dc678e608f38302be9abbfd88
Submitter: Jenkins
Branch: master

commit b7c535598246e12dc678e608f38302be9abbfd88
Author: Bruno Bompastor <email address hidden>
Date: Wed Dec 2 11:38:23 2015 +0100

    Use auth_uri to get nova credentials

    This change updates the puppet-nova module to use the new keys
    for authentication, since auth_host, auth_port and auth_protocol
    were deprecated in favor of auth_uri.

    Change-Id: Id0183eaf8a93d45b6374777ddcf80c0f3f2dbebb
    Closes-Bug: #1521539

Changed in puppet-nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-nova (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/258285

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-nova (stable/liberty)

Reviewed: https://review.openstack.org/258285
Committed: https://git.openstack.org/cgit/openstack/puppet-nova/commit/?id=b30e85f8391419df46040aed94971f9ceacd6759
Submitter: Jenkins
Branch: stable/liberty

commit b30e85f8391419df46040aed94971f9ceacd6759
Author: Bruno Bompastor <email address hidden>
Date: Wed Dec 2 11:38:23 2015 +0100

    Use auth_uri to get nova credentials

    This change updates the puppet-nova module to use the new keys
    for authentication, since auth_host, auth_port and auth_protocol
    were deprecated in favor of auth_uri.

    Change-Id: Id0183eaf8a93d45b6374777ddcf80c0f3f2dbebb
    Closes-Bug: #1521539
    (cherry picked from commit b7c535598246e12dc678e608f38302be9abbfd88)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/puppet-nova 7.1.0

This issue was fixed in the openstack/puppet-nova 7.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.