Skip to content
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

Facts script file mode flip-flop on Windows #223

Closed
sigv opened this issue Mar 8, 2019 · 3 comments
Closed

Facts script file mode flip-flop on Windows #223

sigv opened this issue Mar 8, 2019 · 3 comments
Labels
Projects

Comments

@sigv
Copy link
Contributor

sigv commented Mar 8, 2019

File permissions changes on Windows for MCO directories were resolved with #217, however the refresh_facts.rb script file still experiences the same troublesome situation where in each Puppet run the mode gets changed, reporting all Windows systems as having been changed even though the actual underlying ACL on the system is unchanged.

Relevant resource: /manifests/facts.pp:17

Log:

> puppet agent -t
Info: Using configured environment 'development'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for <redacted>
Info: Applying configuration version '2aa17cd1f912d346317c57587959ad56ad2a036a'
Notice: /Stage[main]/Mcollective::Facts/File[C:/ProgramData/PuppetLabs/mcollective/plugins/mcollective/refresh_facts.rb]
/mode: mode changed '0775' to '0755'
Notice: Applied catalog in 10.35 seconds
sigv added a commit to sigv/puppet-mcollective that referenced this issue Mar 13, 2019
On Windows, if the owner and the group are set the same, modes
such as `0755` cause unnecessary repeated changes as it tries
to change `0775` to `0755` on each run.

Setting the mode as `0775` should be safe as for most OSes the
plugin group is `root` and therefore for most configurations
does not expose write access to any new accounts. For BSD
derivatives, the `wheel` group has the same considerations.

Closes choria-io#223.
ripienaar added a commit that referenced this issue Mar 13, 2019
(#223) Change `refresh_facts.rb` mode to `0775`
@ripienaar ripienaar added the bug label Mar 13, 2019
@ripienaar ripienaar added this to BACKLOG in Work Board via automation Mar 13, 2019
@ripienaar ripienaar moved this from BACKLOG to TEST in Work Board Mar 13, 2019
@ripienaar
Copy link
Member

ripienaar commented Mar 13, 2019

@sigv is this one a big pain for you? I could do a bug fix release should you be unable to carry a local path till next release

@sigv
Copy link
Contributor Author

sigv commented Mar 13, 2019

@ripienaar It is annoying to have Changed resources on our Puppetboard. I would believe this change to be beneficial to anyone running this on Windows as well, but at the same time, I would not say it is too critical that it can't wait until your usual monthly release cycle rolls around.

For now we are going to manually track the merge commit in our Puppetfile and will have to remember to bump it to the next release when it is pushed:

diff --git a/Puppetfile b/Puppetfile
index 011252c..d468a28 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -27 +27 @@ mod 'choria-choria', '0.13.0'
-mod 'choria-mcollective', '0.9.1'
+mod 'choria-mcollective', :git => 'https://github.com/choria-io/puppet-mcollective.git', :commit => '53481b8100481d3ad214c6ff379eba1fbde433d0'

@ripienaar
Copy link
Member

Thanks @sigv I'll hold it over till my next cycle then unless something else comes up

@ripienaar ripienaar moved this from TEST to Ready for Release in Work Board May 14, 2019
@ripienaar ripienaar moved this from Ready for Release to DONE in Work Board May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Work Board
  
DONE
Development

No branches or pull requests

2 participants