-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow open source puppet to use os_patching #215
Comments
Sounds like the puppet agent isn't in the path for the service account yet. Is it just on the first run? We could fully qualify the path if that makes a difference. |
I've had a closer look at this. If this really is the very first puppet run, it could be that the standard symlinks aren't yet in place, though pretty sure the installer does that before the first proper run. My guess is that it isn't actually working on the second run, just that you've bypassed the problem. The exec will only be called when one of the files that notify it are changed (the patch window in this case). Does If it's causing you a significant issue and you know that the link is created later in that first run, you could put a Another option is to use |
In puppet open source standard installation (using the packages from puppetlabs) the puppet binary is in /opt/puppetlabs/bin , not in /usr/local/bin/puppet. Since the exec already have /opt/puppetlabs/bin and /usr/local/bin in the path, the cleanest way might be to juste launch "puppet" and not the absolute path to the puppet binary. This is currently impossible to set because the puppet_binary requires an absolute path. |
Hello, Thank you for your replies! Here's the further info I can provide. To answer your questions:
No, as @gmenuel said, Puppet open source installs in
Regarding this:
I changed the patch window by altering the hours in which it should execute (not sure if that suffices for the purpose of this test). Then I ran the puppet agent on the node, I received the following output.
Regarding the symlink creation you mention here:
Can you assist in checking whether or not the symlinks are there? I am not sure where or what to look for. |
I don't think it will suffice, you need to for example change the name of the patch window. Another easier option is just to delete /var/cache/os_patching/patch_window , it will be recreated on the next run and the trigger for the exec will be run. |
You are correct! It was not enough. Thank you for the guidance! Here is the output after I removed the
Thus, albatrossflavour was correct:
Let me know if I can provide further info! |
I did some testing using the Ubuntu packaged puppet agent, which installs in I changed the
Could you try amending that and including it in your setup? |
I followed the installation steps as defined in the official Puppet Open Source documentation:
I could definitely try including the path |
The same issue and install location is valid for Debian 10 and Debian 11 for Puppet 7 |
Do we have any info on the progress of this issue? |
Has there been any investigation ran into this? |
OK. I've cleared the decks on the other PRs and issues. I'm going to take a look at this tomorrow. |
Since this only (?) affects open-source installs, it might be best to look at having a separate hiera entry to supply the I'll do some more testing in the morning, |
I've pushed a new branch up (#215), which has a possible workaround. I'm not happy with it but happy to discuss alternatives and for you lot to kick the tyres. Let me know what you think @nanowinner |
How is the testing going? |
Haven't heard from anyone yet @jcpunk. It's passed my testing, but I'm not 100% happy with the method. Would really like to get other people to weigh in before we release it. I think I'm going to cut a new release for the forge today which will have the fixes already committed. |
@nanowinner @gmenuel @jcpunk @Perkka2 Has anyone been able to take a look at this branch and do some testing on it? |
I'm not showing any problems in my testing. |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Run
puppet agent -vt
on a node that is runningpuppetlabs-patching_as_code v1.1.2
andalbatrossflavour-os_patching v0.17.0
configured for biweekly updates via HieraWhat are you seeing
What behaviour did you expect instead
Output Log
Any additional information you'd like to impart
Upon running
puppet agent -tv
a second time, the expected behaviour occurs. But if there is a change to the code, the first time puppet agent runs, it throws the error as described above.This error is present on a Windows Server 2019, as well, with the exception that the output reads:
Notice the lack of a path here, unlike an explicit path
/usr/local/bin/puppet
in the Linux example.The text was updated successfully, but these errors were encountered: