voxpupuli / puppet-pxe

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

Multiple issues when specifying images #14

Closed TheLQ closed 9 years ago

TheLQ commented 10 years ago

According to the homepage if I want to deploy ubuntu my config needs to look like this

include pxe
$ubuntu = {
  "arch" => ["amd64","i386"],
  "ver"  => ["hardy","karmic","lucid","maverick","natty","oneiric","precise"],
  "os"   => "ubuntu"
}
resource_permute('pxe::images', $ubuntu)

Issue 1: This fails with resource_permute(): wrong number of arguments (2; must be 3)

So I added the $ubuntu_common hash from tests/init.pp:

include pxe
$ubuntu = {
  "arch" => ["amd64","i386"],
  "ver"  => ["hardy","karmic","lucid","maverick","natty","oneiric","precise"],
  "os"   => "ubuntu"
}
$ubuntu_common = {
  file => "os_<%= os %>",
  kernel => "images/<%= os %>/<%= ver %>/<%= arch %>/linux",
  append => "vga=791 initrd=images/<%= os %>/<%= ver %>/<%= arch %>/initrd.gz auto locale=en_US console-setup/layoutcode=us netcfg/get_hostname=debian url=http://urd.puppetlabs.lan/seed/ubuntu_base.cfg text",
}
resource_permute('pxe::images', $ubuntu, $ubuntu_common)

Issue 2: This fails with undefined method 'each' for "ubuntu":String. I tried changing the os to ["ubuntu"] but unsurprisingly this fails with Invalid parameter file. I'm not sure which way is correct

Issue 3: The homepage says to add to pxe::images but tests/init.pp says pxe::bootstrap, which fails with Invalid resource type pxe::bootstrap. I'm assuming the home page is correct but I'm not sure

What I'm wondering is why the homepage says "Build: Passing" when clearly the tests don't work. It seems travis-ci is only checking for code correctness and style, but not if the tests runs without errors. This seems a little misleading for both you and users.

zachfi commented 10 years ago

Are you using ruby 1.9?

TheLQ commented 10 years ago

Yes

root@quackpuppet:/etc/puppet# ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
root@quackpxe:~# ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
zachfi commented 10 years ago

The module was only ever tested on 1.8. I'll try to make some updates in the next days to get a PR for you to test.

zachfi commented 10 years ago

https://github.com/xaque208/puppet-pxe/pull/15

Please check your manifest against the README from that PR. I've all of the test manifests in tests/ and it all seems to work. Thanks for the report. This module has not gotten much attention over the years since its just mostly worked for us. I've tried to update the README to be more accurate with its use cases.

Travis CI testing is relatively slim. The tests are passing, but that doesn't say anything about what is being tested. If you can help in this regard, please do. I'll happily review PRs for this as well. Cheers.

zachfi commented 9 years ago

I believe this was resolved in #15