Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P9523
locking process tree: systemd---sshd---sshd---sshd(cdanis)---zsh---sudo(root)---locktest.sh---sleep
Active
Public
Actions
Authored by
CDanis
on Nov 4 2019, 6:32 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F30988340: raw.txt
Nov 4 2019, 6:32 PM
2019-11-04 18:32:40 (UTC+0)
Subscribers
None
diff --git a/modules/puppetmaster/templates/puppet-merge.erb b/modules/puppetmaster/templates/puppet-merge.erb
index 845a998749..dd45030d78 100755
--- a/modules/puppetmaster/templates/puppet-merge.erb
+++ b/modules/puppetmaster/templates/puppet-merge.erb
@@ -21,7 +21,14 @@ lock() {
if ! flock -xn $LOCKFD
then
trap EXIT
- die "failed to lock, another puppet-merge running on this host?"
+ PSTREE=$(pstree -su $(fuser $LOCKFILE 2>/dev/null))
+ if [ $(echo "$PSTREE" | wc -l) -eq 1 ]
+ then
+ PSTREE="\nlocking process tree: $PSTREE"
+ else
+ PSTREE=""
+ fi
+ die "failed to lock, another puppet-merge running on this host?${PSTREE}"
fi
}
Event Timeline
CDanis
created this paste.
Nov 4 2019, 6:32 PM
2019-11-04 18:32:40 (UTC+0)
CDanis
changed the title of this paste from untitled to
locking process tree: systemd---sshd---sshd---sshd(cdanis)---zsh---sudo(root)---locktest.sh---sleep
.
Log In to Comment