Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Platform OS
-
2
-
Platform OS Kanban
-
Major
-
2 - 5-25% of Customers
-
4 - Major
-
3 - $$$$
-
Bug Fix
-
The puppet-agent package no longer invokes custom facts on upgrade, avoiding a deadlock when such a fact tried to access the package manager's database
Description
The Problem
If you have a custom fact that calls out to yum and puppet-agent is being installed via yum then the custom fact waits for the puppet-agent install to complete and the puppet-agent install waits for facter to return and... it hangs.
Suggested solution
We shouldn't call puppet apply during install or if we do we should make it not load custom facts ( if that's possible ).
My proposed solution would be that we simply record the state of the puppet service before installing instead of the whole puppet resource and then call puppet resource service puppet ensure=<state> instead of puppet apply.
[root@master201647-centos ~]# puppet resource service puppet | grep ensure| sed 's/ensure => //' | sed s'/.$//' | sed 's/^..//' | sed "s/'//g" > puppet_service_state.txt
|
[root@master201647-centos ~]# cat puppet_service_state.txt
|
stopped
|
[root@master201647-centos ~]# puppet resource service puppet ensure=$(cat puppet_service_state.txt)
|
service { 'puppet':
|
ensure => 'stopped',
|
}
|
This relates to this portion of code:
Pull Request
Attachments
Issue Links
- is blocked by
-
VANAGON-120 Vanagon puts "postinstall" scripts in the "postuninstall" section of AIX RPMs
-
- Closed
-
-
VANAGON-121 Special Vanagon Release for Branan
-
- Closed
-
- is duplicated by
-
PA-1841 Use of `puppet` in post-install script invites deadlock
-
- Closed
-
- is supported by
-
PA-5199 puppetlabs/puppet_agent: Puppet agent upgrade causes YUM dependency issues
-
- Accepted
-