file resource repeatedly logs 'chmod' in some cases #976
Replies: 7 comments 1 reply
|
Weird! That is unique. The obvious first thing I'd check is to make sure there isn't something else changing it back... If you'd like to debug, I'd recommend adding a Printf in the Watch() method for that resource and seeing if new events are being generated... I assume yes... How often does the chmod happen? Every ~1ms-10ms or 1s? (eg: really fast or not?) Secondly, I'd expect if there was a bug, it would be chmodCheckApply https://github.com/purpleidea/mgmt/blob/master/engine/resources/file.go#L1272 It's important that it does not make a change if it's already the correct state. That might be the bug. Can you try with the symbolic mode as well? Eg: HTH and thanks for the report! |
|
Actually... I can repro :P How do you find these! Let me debug... |
|
The bug is dest is a dir, but you've set a non-dir mode. I don't think this should be counted as a user error, let me think how best to fix it. |
|
And I can confirm the mode => symbolic workaround works. So please use that for the moment. (It's probably better to always use that anyways.) |
|
Patch incoming... Trying to meet our internal SLA's! |
|
Testing in CI now. |
|
Fix merged, thank you for the report! \o/ |
Uh oh!
There was an error while loading. Please reload this page.
Sample mcl:
Caveat: I am using a
baddevbranch chasingmasterand haven't tested a release. I'm currently only on my mac and reproduced this on linux arm64 in a vm, not yet tested linux x86_64.Problem: mgmt gets stuck in a loop doing chmod?
In case it's unique to this use case -- here's the apache group and nginx user info:
All reactions