generic_service declares package incorrectly

Bug #1465433 reported by Mike Dorman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-nova
Fix Released
Undecided
Mike Dorman

Bug Description

puppet-nova's generic_service defined type declares a package with title $nova_title. It does a check to see if the package exists in the catalog already first, but based on the title $package_name.

This results in the possibility of duplicate package declaration, or more likely, a failure on the package dependency for the service resource declared by the generic_service instance.

Example:

The spicehtml5proxy class uses the generic_service type to manage that service:

  nova::generic_service { 'spicehtml5proxy':
    enabled => $enabled,
    manage_service => $manage_service,
    package_name => $::nova::params::spicehtml5proxy_package_name,
    service_name => $::nova::params::spicehtml5proxy_service_name,
    ensure_package => $ensure_package,
  }

For EL-based distros, package_name = 'openstack-nova-console' and inside the generic_service type, $nova_title = 'nova-spicehtml5proxy'

This results in the generic_service type checking for the existence of Package[openstack-nova-console], but then is defining Package[nova-spicehtml5proxy]

The openstack-nova-console package already exists in the catalog, so Package[nova-spicehtml5proxy] is never defined, breaking the dependency set on Service[nova-spicehtml5proxy]

I believe generic_service should define the Package with a title of $package_name, rather than $nova_title.

Mike Dorman (mdorman-m)
Changed in puppet-nova:
assignee: nobody → Mike Dorman (mdorman-m)
status: New → In Progress
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/192009

Changed in puppet-nova:
status: In Progress → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-nova:
milestone: none → 6.0.0
Mathieu Gagné (mgagne)
Changed in puppet-nova:
status: Fix Committed → Fix Released
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.