Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Normal
-
Resolution: Fixed
-
Affects Version/s: PUP 6.0.2
-
Fix Version/s: PUP 6.0.7
-
Component/s: None
-
Labels:
-
Template:
-
Epic Link:
-
Team:Platform OS
-
Sprint:Platform OS Kanban
-
Method Found:Needs Assessment
-
CS Priority:Reviewed
-
Release Notes:Not Needed
-
QA Risk Assessment:Needs Assessment
Description
Puppet Version: 6.0.2 (or any)
Puppet Server Version: 2018.1
OS Name/Version: Windows (linux most likely as well)
When puppet runs it created the pidlock file with the pid of puppet. If puppet stops/crashes while running the lock file remains. Puppet reads the file, checks for pid as integer, and sees if that pid is running (system.kill(0) to see if alive). If ANY PID responds, it locks, even if the PID is not a puppet PID.
Desired Behavior: Puppet should check PID to see if it is running and its puppet, not just running.
Actual Behavior: if any process has that pid, puppet locks.
Steps to replicate (tested on windows 2016 with Puppet 6.0.2)
1 - start puppet run with 'puppet agent -t'
2 - while running stop the puppet/puppet-pxp agent services
3 - open pidloclk file, there should be a PID there
4 - change PID lock file contents to any other currently running PID
5 - start puppet / run 'puppet agent -t'
Affected Code: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/pidlock.rb#L55
This is the logic check that only determines if a pid is active, not who owns it.