puppet-glance fails when auth_admin_prefix parameter unset

Bug #1190481 reported by Simon Sellar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-openstack
Fix Released
Undecided
Unassigned

Bug Description

When auth_admin_prefix is not passed to api.pp, it results in puppet failing with 'unknown method fetch'

Offending code is here:

lib/puppet/provider/glance.rb line 24

        g['auth_admin_prefix'] = glance_file['keystone_authtoken'].fetch('auth_admin_prefix', '').strip

If auth_admin_prefix is unset, glance_file['keystone_authtoken'] returns nil, not a hash, causing fetch to fail.

I will put a patch up for review to fix this shortly.

Revision history for this message
François Charlier (francois-charlier) wrote :

Oh, I assumed glance_file['keystone_authtoken'] was a Hash, but indeed it's not :(

There's a patch available from Simon https://review.openstack.org/32838

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

Reviewed: https://review.openstack.org/32838
Committed: http://github.com/stackforge/puppet-glance/commit/bf4fe406aa20f6b0987d13d6492179bf7e86b30a
Submitter: Jenkins
Branch: master

commit bf4fe406aa20f6b0987d13d6492179bf7e86b30a
Author: Simon Sellar <email address hidden>
Date: Thu Jun 13 00:38:07 2013 +0000

    Check if auth_admin_prefix is defined

    Check if auth_admin_prefix is defined (passed as a parameter to api.pp)
    before trying to access it in the settings data structure.

    Change-Id: I61a3ae41dca2a5e5bd9e635b0a2ab9eb05b0326a
    Fixes: bug #1190481

Changed in puppet-openstack:
status: Confirmed → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-openstack:
status: Fix Committed → Fix Released
Mathieu Gagné (mgagne)
Changed in puppet-openstack:
milestone: none → 2.2.0
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.