You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running puppet on a node and suddenly I got:
Error: Could not prefetch loginctl_user provider 'ruby': Execution of '/bin/loginctl show-user -p Name -p Linger root mail nginx-edge' returned 1: Failed to get user: User ID 8 is not logged in or lingering
Name=root
Linger=no
nginx-edge is a lingering user. mail normally not, BUT user mail has certain systemd timers that are running.
Since managing the lingering state of nginx-edge failed, management of that user failed.
When I ran the first command manually, the user mail did not show up. Also subsequent puppet runs never had that issue anymore.
So what I assume is that at the moment puppet run the first command the user mail had a systemd timer running and thus was active and showed up in the show-user command. BUT when running the second command, the timer was already done and thus the user not anymore active and thus it didn't show up.
What is a bit worse is that the provider errors out and thus everything errors out.
Not really sure how to fix that issue properly, but it can definitely be that you hit that race condition.
The text was updated successfully, but these errors were encountered:
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
I was running puppet on a node and suddenly I got:
nginx-edge is a lingering user. mail normally not, BUT user mail has certain systemd timers that are running.
Since managing the lingering state of nginx-edge failed, management of that user failed.
When looking at the code (https://github.com/voxpupuli/puppet-systemd/blob/1d785f129b5b5395860b1d39723e0aa7b31f7c74/lib/puppet/provider/loginctl_user/ruby.rb) we see that it first the currently users and then tries to get more info about them in one shot.
When I ran the first command manually, the user mail did not show up. Also subsequent puppet runs never had that issue anymore.
So what I assume is that at the moment puppet run the first command the user mail had a systemd timer running and thus was active and showed up in the
show-user
command. BUT when running the second command, the timer was already done and thus the user not anymore active and thus it didn't show up.What is a bit worse is that the provider errors out and thus everything errors out.
Not really sure how to fix that issue properly, but it can definitely be that you hit that race condition.
The text was updated successfully, but these errors were encountered: