Puppet install of Openstack: Could not find resource ‘Package[dnsmasq-base]Package[dnsmasq-utils]’ for relationship on ‘Package[neutron-dhcp-agent]’

dnsmasqopenstackpuppet

ebug: Executing '/etc/puppet/etckeeper-commit-pre'
debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find resource 'Package[dnsmasq-base]Package[dnsmasq-utils]' for relationship on 'Package[neutron-dhcp-agent]' on node controller6.ec2.internal
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

I must be missing something obvious, I have the packages dnsmasq, dnsmasq-base, and dnsmasq-utils installed on my Ubuntu 12.04 LTS server yet puppet is unable to find them. I'm running sudo puppet so I don't think this would be a permissions issue. Disabling the requirement in my params.pp let the installation continue (but it got hung up on a separate issue so I can't tell you if it would have worked had it finished). I've also tried with v3.2 and 3.3 of neutron, and the rest of the modules have the versions required of them by openstack. Lastly, if I disable neutron in the openstack all.pp I can get a working install of Openstack functioning (minus networking).

Hoping someone here has a hint or two for me, thanks for reading.

Edit

Wanted to add that I have since manually installed the neutron-dhcp-agent package in hopes of fixing this problem but have been unsuccessful.

Edit 2

   $dnsmasq_packages   = ['dnsmasq-base', 'dnsmasq-utils']

Line 105 in /etc/puppet/modules/neutron/manifests/params.pp

If I comment out the packages (replace with []) then it will continue past the point it errors out at.

Edit 3

I believe the problem originates here, /etc/puppet/modules/neutron/manifests/agents/dhcp.pp Any suggestions on how I should try to fix this? I'm going to put two checks instead of one and see how that goes.

include neutron::params

      Neutron_config<||>            ~> Service['neutron-dhcp-service']


 Neutron_dhcp_agent_config<||> ~> Service['neutron-dhcp-service']

  case $dhcp_driver {
    /\.Dnsmasq/: {
      Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
      ensure_packages($::neutron::params::dnsmasq_packages)
    }
    default: {
      fail("Unsupported dhcp_driver ${dhcp_driver}")
    }
  }

Best Answer

To fix the problem I followed the suggestions in the comments and split

$dnsmasq_packages   = ['dnsmasq-base', 'dnsmasq-utils']

into two lines, you can see the changes here.

For the sake of having everything in one place here are the changes:

manifests/agents/dhcp.pp

Starts on line 85

    case $dhcp_driver {
      /\.Dnsmasq/: {
 -      Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
 -      ensure_packages($::neutron::params::dnsmasq_packages)
 +      Package[$::neutron::params::dnsmasq-base_package] -> Package<| title == 'neutron-dhcp-agent' |>
 +      Package[$::neutron::params::dnsmasq-utils_package] -> Package<| title == 'neutron-dhcp-agent' |>
 +      ensure_packages($::neutron::params::dnsmasq-base_package)
 +      ensure_packages($::neutron::params::dnsmasq-utils_package)
      }
      default: {
        fail("Unsupported dhcp_driver ${dhcp_driver}")

manifests/params.pp

Starts on line 93

 $metadata_agent_package = 'neutron-metadata-agent'
  $metadata_agent_service = 'neutron-metadata-agent'

 -    $dnsmasq_packages   = ['dnsmasq-base', 'dnsmasq-utils']
 +    $dnsmasq-base_package = ['dnsmasq-base']
 +    $dnsmasq-utils_package = ['dnsmasq-utils']

      $isc_dhcp_packages  = ['isc-dhcp-server']

Edit

Although the above fixed my problem while running Puppet 2.7.11, I recently upgraded to version 3.5.1 and the problem disappeared. So two potential solutions if you ever run into this :)

Related Topic