Cascade file mount and file again (with the same folder) [closed]

asked 2018-01-31 10:23:21 -0600

mknl gravatar image


we currently have the problem that a mount of a nfs volume is changing the permissions of the folder where it is mounted to. We create a folder with file (with owner group to something which is not root ... and mode) after the the volume will be mounted with a mount ressource. This mount step changes the owner+group back to root:root.

The file ressource determines this, but this takes an additional puppet run to change it back to the correct owner+group.

So I thought about a solution for this in one puppet run. 1. add another file ressource which change it back directly --> not possible as it leads to "Duplicate declaration: File[<folder>] " 2. add a notify to the mount ressource and trigger the file resource again after mounting --> "Error: Failed to apply catalog: Found 3 dependency cycles: File[<folder>] => Mount[<folder>] => File[<folder>])"

Any other ideas?

Thanks in advance.

Note: our puppet version is quite old

Runtime environment: puppet_version=3.8.6, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mknl
close date 2018-02-06 04:49:35.006534



The only thing that we have done in those cases was the anti-pattern of having a conditional exec statement that depends on the mount resource to 'fix' the permissions.... it's not pretty

DarylW gravatar imageDarylW ( 2018-01-31 14:40:44 -0600 )edit

Yes this is how we resolved this problem.

mknl gravatar imagemknl ( 2018-02-06 04:48:30 -0600 )edit