-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
NFS mounts are remounted at every execution #57520
Comments
@nohaj Can you upgrade to Salt 3000.3 as there were a number of issues fixed in runner's etc. in that release, and this might have affected nfs mounts too. And then rerun your tests. |
Hello, Just updated in 3000.3, same issue =( |
This might be related to #39292 causing issues since the fstab is not quite the same. |
OK so I added another NFS share today on some servers but in NFS 4.0 version (different NFS server) and I don't have this issue with this mount. So I switched the others mounts in 4.0 version and the issue is gone.
Does it help you ? |
The mount.mounted state doesn't expect the parameter "options". It should be "opts" as stated by documentation. I did a few tests with Salt 3001 with the following state:
In the first execution it works as expected:
The filesystem is mounted and the fstab entry created. But if I apply the state a second time, the fstab is updated:
Now, the third time it works as expected, with no changes:
But if I umount the /srv/mirrors and apply the state again, the fstab will be updated again:
And the fstab updating cycle restarts. This one happens because when the filesystem is umounted, the generated fstab entry uses the options in the same order that is in sls file. But when the filesystem is mounted, the generated entry uses the options alphabetically ordered. So, they doesn't matches and it keeps updating the fstab depending if the state is applied with the filesystem mounted or not. While I haven't got the same message of the original post, this seems to be a related problem and keeps the fstab being updating even with the correct entry present. I have the fix for this issue, but I don't know if I should include it on PR #57669 which already modifies states/mount.py or create a new one. What would be the better approach? |
You're right. The "options" parameter come from a formula, but inside the formula it's indeed "opts" =) |
Can you share this formula so I can test all the workflow? |
I use this one : https://github.com/saltstack-formulas/nfs-formula |
@nohaj , probably you have something custom in there. The linked nfs-formula also don't use "options", it expects "opts" on calling state or "mount_opts" on pillar. Can you apply the state using salt-call with "-l debug" or "-l trace" and put the output here? |
Sorry about that @piterpunk, I am actually using "opts" and not "options". I don't know why I wrote that in my initial post. And you are right, the third time nothing happen anymore, so it's not as bad as i thought. |
@nohaj nice! So the bug is exactly the one I fixed. Thanks! |
Hello,
I'm trying to mount some NFS shares on my servers and it seems that I'm facing the same problem as the unresolved issues #15289 and #53688 .
At the first execution, the folder is created and the mount is done.
Then, for all the others executions I get :
Same in python :
Am I doing something wrong ?
Regards,
Johan
The text was updated successfully, but these errors were encountered: