Puppet apply hangs

2,565 views
Skip to first unread message

Guy Knights

unread,
Jan 17, 2014, 7:04:17 PM1/17/14
to puppet...@googlegroups.com
I have a bunch of dev servers which have begun experiencing the same issue when I run puppet apply. The full command I'm using is: sudo puppet apply --modulepath=/opt/puppet-conf/development/modules --environment=development. 

I've never had a problem running this command before, but very recently, when I run it on any of my dev servers it just hangs right after I hit enter. It never times out and I don't get any output, event when I add --verbose, --debug and --detailed-exitcodes.

I investigated further, and ran the above command using strace. It appears that puppet hangs when trying to read /etc/puppet/routes.yaml (which doesn't exist). I created /etc/puppet/routes.yaml but then puppet apply just fails (I'm not really sure what to put in routes.yaml, though).

Does anyone have any idea what's happening here? I'm not sure why this only just started happening. For the record, here are the packages I have installed:

ii  facter                            1.7.4-1puppetlabs1           Ruby module for collecting simple facts about a host operating system
ii  hiera                             1.3.0-1puppetlabs1           A simple pluggable Hierarchical Database.
ii  puppet                            3.4.2-1puppetlabs1           Centralized configuration management - agent startup and compatibility scripts
ii  puppet-common                     3.4.2-1puppetlabs1           Centralized configuration management
ii  puppetlabs-release                1.0-7                        "Package to install Puppet Labs gpg key and apt repo"
ii  ruby-rgen                         0.6.5-1puppetlabs1           A framework supporting Model Driven Software Development (MDSD)

Thanks,
Guy

Guy Knights

unread,
Jan 17, 2014, 7:11:18 PM1/17/14
to puppet...@googlegroups.com
I went a bit further and found a routes.yaml config which I believe works, but it looks like this isn't actually the issue. The routes.yaml I used is:

---
master:
  facts:
    terminus: yaml
    cache: yaml

Here's the last few lines of puppet apply when using strace:

stat("/etc/puppet/routes.yaml", {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
open("/etc/puppet/routes.yaml", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f87e13ba000
read(3, "---\nmaster:\n  facts:\n    terminu"..., 4096) = 56
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f87e13ba000, 4096)            = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f87e13ba000
read(0,

It just hangs there at the "read(0," line.



--
Guy Knights
Lead Systems Administrator

www.eastsidegamestudio.com
g...@eastsidegamestudio.com

Jose Luis Ledesma

unread,
Jan 17, 2014, 7:23:05 PM1/17/14
to puppet...@googlegroups.com
0 is standard input... Seems that puppet is waiting for some input??? Or did puppet close fd 0?

Regards

Guy Knights

unread,
Jan 17, 2014, 8:19:10 PM1/17/14
to puppet...@googlegroups.com
Oops...never mind. I just realised that I forgot to point the puppet apply command at a manifest file. I did that and the command works now. Still, it would be nice if it gave an error message if you don't supply a manifest.

Jose Luis Ledesma

unread,
Jan 17, 2014, 8:21:03 PM1/17/14
to puppet...@googlegroups.com
I think it was waiting for a manifest in the standard input
Reply all
Reply to author
Forward
0 new messages