0
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}")
    }
  }
Jack
  • 63
  • 2
  • 3
  • 11
  • That seems like a flaw in the module that it's trying to compile into a catalog for the node; which specific module are you using? – Shane Madden Apr 30 '14 at 20:16
  • I haven't ever tried this installer, but it's listing two packages as a single resource. Syntax error where the required packages are listed, perhaps a missing semi-colon? –  Apr 30 '14 at 20:19
  • Thanks for the reply, here is a link to the module https://forge.puppetlabs.com/puppetlabs/neutron , pertinent files include ./neutron/spec/classes/neutron_agents_dhcp_spec.rb and ./neutron/manifests/params.pp:105 – Jack Apr 30 '14 at 20:21
  • @yoonix I tried passing the packages one at time (each) and the install worked. Is this just a limitation of puppet? I find it difficult to believe that they would code something that simply doesn't work, that 2,754 people have downloaded, and that I would be the first to encounter the issue. I must be doing something wrong... – Jack Apr 30 '14 at 21:00
  • 2
    Could also be a bug in puppet where its' behavior is different between versions. It certainly wouldn't be the first time... –  Apr 30 '14 at 21:05
  • Thanks to both of your for your comments, I went ahead and modified the code and submitted a [pull request](https://github.com/philippedorman/puppet-neutron/commit/b09c4198cd7f0ddee1cbcf118d5e72810bb7da21), it fixed my problem, we'll see where it goes from here. – Jack May 01 '14 at 13:34

1 Answers1

0

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 :)

Jack
  • 63
  • 2
  • 3
  • 11