voxpupuli / puppet-pxe

Puppet module for deploying a PXE boot server
https://forge.puppet.com/puppet/pxe
51 stars 38 forks source link

err: Failed to apply catalog: Could not find dependent #7

Closed tjbenator closed 10 years ago

tjbenator commented 10 years ago

Added basic setup to a node:

node 'pxe' {
   class { "tftp": }
   class { "pxe": }
}

Receiving the following error:

err: Failed to apply catalog: Could not find dependent Exec[concat_/srv/tftp/pxelinux.cfg/default] for File[/var/lib/puppet/concat/_srv_tftp_pxelinux.cfg_default/fragments/10_default-menu-entry-Tools] at /etc/puppet/modules/concat/manifests/fragment.pp:51

I have installed all the require dependencies: puppetlabs/stdlib puppetlabs/xinetd ripienaar/concat puppetlabs/tftp permute: Tried both zleslie/permute (via puppet module install) and xaque208/permute (isn't on puppet forge?) from GitHub. I received more output with xaque208/permute

zachfi commented 10 years ago

I believe this to be fixed recently. @WhatsARanjit can you confirm?

TheLQ commented 10 years ago

This is still failing with latest sources on github. Tried replacing the permute module with the xaque208/permute one on github and I get the same output.

librarian puppet config

mod "xaque208/pxe",
  :git => "git://github.com/xaque208/puppet-pxe.git"
mod "xaque208/permute",
  :git => "git://github.com/xaque208/puppet-permute.git"

manifests/site.pp

node quacktest {    
    class { "tftp": }
    class { "pxe": }
}

Output on quacktest

$ sudo puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/php_version.rb
Info: Caching catalog for quacktest
Error: Failed to apply catalog: Could not find dependent Exec[concat_/srv/tftp/pxelinux.cfg/default] for File[/var/lib/puppet/concat/_srv_tftp_pxelinux.cfg_default/fragments/10_default-menu-entry-Tools] at /etc/puppet/modules/concat/manifests/fragment.pp:120
zachfi commented 10 years ago

Can you pleas please make sure you have the puppetlabs/concat included installed and test again?

TheLQ commented 10 years ago

Just checked, I have concat installed. Snippet from the modulefile:

name 'puppetlabs-concat'
version '1.1.0'
source 'git://github.com/puppetlabs/puppetlabs-concat.git'
author 'Puppetlabs'
license 'Apache 2.0'
summary 'Concat module'
description 'Concat module'
project_page 'http://github.com/puppetlabs/puppetlabs-concat'
dependency 'puppetlabs/stdlib', '>= 4.0.0'

For good measure I added the git source for puppetlabs/concat to my librarian config and rebuilt my modules folder. Tried it on a machine I've never run this module on and I still get the same error.

zachfi commented 10 years ago

Bummer. This module doesn't get too many updates and is in need of some tests. I'll mock up a quick test and see if I can reproduce this. I think I see the bug.

zachfi commented 10 years ago

Can you please test out #13 . I believe this should solve the issue.

TheLQ commented 10 years ago

Yay puppet applies it successfully now! Thanks for the fix

Now I just need to get it working on Ubuntu 14.04. First, this is the the bare minimum config I needed to get PXE to work at all. I also had to restart the xinetd service but I think that's a bug in the tftpd module.

class { "tftp": 
    directory => "/srv/tftp/"
}
class { "pxe": }

When PXE booting this loads the image but fails to load the default config file with "No DEFAULT or UI configuration found". My pxelinux.cfg/default file looks like this

LABEL Tools
  KERNEL menu.c32
  APPEND pxelinux.cfg/menu_tools

If I put DEFAULT menu.c32 at the top it works and I can even run memtest86. I'm not really sure where that file is being generated so I can't provide a patch.

Thanks for the work btw, this is a pretty nice module

zachfi commented 10 years ago

I'll merge the PR that works for you since its an improvement. I'll look at the defaults sometime next week.

zachfi commented 10 years ago

PXE is technically setup, though you don't have a default. Please see the "Menu" section in the README. I believe the first resource in there should cover your use case. If not, please file a new bug.