On HP-UX (both versions) puppetd waits a long time for this command to complete:
/usr/sbin/swlist TWWpkgut15.TWWpkgut15-RUN
I'm not sure whether it ever exits. I've waited 20 minutes so far. When I
run that command as root on the command-line it takes less than a second.
That command is checking to see whether a package is installed. We don't
see the hang with Puppet version 0.24.7.
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account
The only thing that occurs to me off the top of my head is that this might be a regression introduced by 6ab2453d966d1d48e12d8a8cec34b9e460597d04 which was intended to fix #2731.
Mark, could you try running:
git revert 6ab2453d966d1d48e12d8a8cec34b9e460597d04
to revert the suspect patch and retest, to see if this changes the behavior?
While the mechanism isn't completely clear, all indications are that this is the feared regression caused by #2731 (see that ticket for details).
Suggested fix is to revert 6ab2453d966d1d48e12d8a8cec34b9e460597d04 and reopen #2731.
Reverted 6ab2453d966d1d48e12d8a8cec34b9e460597d04 in branch 0.25.x
Hey, could you tell me what the size of the output of that command is? I wonder if perhaps the buffer for the pipe is being filled up completely.
Ha! I bet you win the prize. The output is kind of large. No stderr:
/usr/sbin/swlist TWWpkgut15.TWWpkgut15-RUN |wc
1559 1568 145342
Excellent :-) Can you check if it still happens with http://ricky.fedorapeople.org/0001-Use-a-pipe-instead-of-a-temp-file-for-command-output.patch (this is on the 0.25.x branch).
With that patch against 0.25.x (commit 7e2e12be7827c2adb64a192b5b7176c7c541af44) I get this backtrace when it tries to check that the package is installed:
/home/happy/puppet.git/lib/puppet/provider/package/hpux.rb:24:in `install'
/home/happy/puppet.git/lib/puppet/type/package.rb:52:in `set_present'
/home/happy/puppet.git/lib/puppet/property.rb:109:in `send'
/home/happy/puppet.git/lib/puppet/property.rb:109:in `call_valuemethod'
/home/happy/puppet.git/lib/puppet/property.rb:298:in `set'
/home/happy/puppet.git/lib/puppet/property.rb:363:in `sync'
/home/happy/puppet.git/lib/puppet/transaction/change.rb:54:in `go'
/home/happy/puppet.git/lib/puppet/transaction/change.rb:72:in `forward'
/home/happy/puppet.git/lib/puppet/transaction.rb:120:in `apply_changes'
/home/happy/puppet.git/lib/puppet/transaction.rb:113:in `collect'
/home/happy/puppet.git/lib/puppet/transaction.rb:113:in `apply_changes'
/home/happy/puppet.git/lib/puppet/transaction.rb:85:in `apply'
/home/happy/puppet.git/lib/puppet/transaction.rb:251:in `eval_children_and_apply_resource'
/home/happy/puppet.git/lib/puppet/util.rb:395:in `thinmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:394:in `thinmark'
/home/happy/puppet.git/lib/puppet/transaction.rb:250:in `eval_children_and_apply_resource'
/home/happy/puppet.git/lib/puppet/transaction.rb:207:in `eval_resource'
/home/happy/puppet.git/lib/puppet/transaction.rb:296:in `evaluate'
/home/happy/puppet.git/lib/puppet/util.rb:395:in `thinmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:394:in `thinmark'
/home/happy/puppet.git/lib/puppet/transaction.rb:295:in `evaluate'
/home/happy/puppet.git/lib/puppet/transaction.rb:289:in `collect'
/home/happy/puppet.git/lib/puppet/transaction.rb:289:in `evaluate'
/home/happy/puppet.git/lib/puppet/resource/catalog.rb:142:in `apply'
/home/happy/puppet.git/lib/puppet/configurer.rb:153:in `run'
/home/happy/puppet.git/lib/puppet/util.rb:178:in `benchmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:177:in `benchmark'
/home/happy/puppet.git/lib/puppet/configurer.rb:152:in `run'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/home/happy/puppet.git/lib/puppet/agent/locker.rb:21:in `lock'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/opt/TWWfsw/ruby18/lib/ruby/sync.rb:230:in `synchronize'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/home/happy/puppet.git/lib/puppet/agent.rb:130:in `with_client'
/home/happy/puppet.git/lib/puppet/agent.rb:51:in `run'
/home/happy/puppet.git/lib/puppet/application/puppetd.rb:103:in `onetime'
/home/happy/puppet.git/lib/puppet/application.rb:226:in `send'
/home/happy/puppet.git/lib/puppet/application.rb:226:in `run_command'
/home/happy/puppet.git/lib/puppet/application.rb:217:in `run'
/home/happy/puppet.git/lib/puppet/application.rb:306:in `exit_on_fail'
/home/happy/puppet.git/lib/puppet/application.rb:217:in `run'
sbin/puppetd:159
/home/happy/puppet.git/lib/puppet/provider/package/hpux.rb:24:in `install'
/home/happy/puppet.git/lib/puppet/type/package.rb:52:in `set_present'
/home/happy/puppet.git/lib/puppet/property.rb:109:in `send'
/home/happy/puppet.git/lib/puppet/property.rb:109:in `call_valuemethod'
/home/happy/puppet.git/lib/puppet/property.rb:298:in `set'
/home/happy/puppet.git/lib/puppet/property.rb:363:in `sync'
/home/happy/puppet.git/lib/puppet/transaction/change.rb:54:in `go'
/home/happy/puppet.git/lib/puppet/transaction/change.rb:72:in `forward'
/home/happy/puppet.git/lib/puppet/transaction.rb:120:in `apply_changes'
/home/happy/puppet.git/lib/puppet/transaction.rb:113:in `collect'
/home/happy/puppet.git/lib/puppet/transaction.rb:113:in `apply_changes'
/home/happy/puppet.git/lib/puppet/transaction.rb:85:in `apply'
/home/happy/puppet.git/lib/puppet/transaction.rb:251:in `eval_children_and_apply_resource'
/home/happy/puppet.git/lib/puppet/util.rb:395:in `thinmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:394:in `thinmark'
/home/happy/puppet.git/lib/puppet/transaction.rb:250:in `eval_children_and_apply_resource'
/home/happy/puppet.git/lib/puppet/transaction.rb:207:in `eval_resource'
/home/happy/puppet.git/lib/puppet/transaction.rb:296:in `evaluate'
/home/happy/puppet.git/lib/puppet/util.rb:395:in `thinmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:394:in `thinmark'
/home/happy/puppet.git/lib/puppet/transaction.rb:295:in `evaluate'
/home/happy/puppet.git/lib/puppet/transaction.rb:289:in `collect'
/home/happy/puppet.git/lib/puppet/transaction.rb:289:in `evaluate'
/home/happy/puppet.git/lib/puppet/resource/catalog.rb:142:in `apply'
/home/happy/puppet.git/lib/puppet/configurer.rb:153:in `run'
/home/happy/puppet.git/lib/puppet/util.rb:178:in `benchmark'
/opt/TWWfsw/ruby18/lib/ruby/benchmark.rb:308:in `realtime'
/home/happy/puppet.git/lib/puppet/util.rb:177:in `benchmark'
/home/happy/puppet.git/lib/puppet/configurer.rb:152:in `run'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/home/happy/puppet.git/lib/puppet/agent/locker.rb:21:in `lock'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/opt/TWWfsw/ruby18/lib/ruby/sync.rb:230:in `synchronize'
/home/happy/puppet.git/lib/puppet/agent.rb:53:in `run'
/home/happy/puppet.git/lib/puppet/agent.rb:130:in `with_client'
/home/happy/puppet.git/lib/puppet/agent.rb:51:in `run'
/home/happy/puppet.git/lib/puppet/application/puppetd.rb:103:in `onetime'
/home/happy/puppet.git/lib/puppet/application.rb:226:in `send'
/home/happy/puppet.git/lib/puppet/application.rb:226:in `run_command'
/home/happy/puppet.git/lib/puppet/application.rb:217:in `run'
/home/happy/puppet.git/lib/puppet/application.rb:306:in `exit_on_fail'
/home/happy/puppet.git/lib/puppet/application.rb:217:in `run'
sbin/puppetd:159
err: //tww/Package[TWWpkgutils15]/ensure: change from absent to present failed: Could not set present on ensure: source must be provided to install HP-UX packages at /usr/src/git/bor/puppet/modules/tww/manifests/init.pp:20
That's what I get for not testing it with a full puppet run first. Apparently, output_read.eof? doesn't imply that there is no data to be read.
This patch lets readpartial throw the an EOFError to report that there is really no data left:
http://ricky.fedorapeople.org/0001-Use-a-pipe-instead-of-a-temp-file-for-command-output.patch
Thanks for all the testing so far :-)
That worked great. No hang and no errors.
Thanks!
Fixed with new commit for #2731.