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

(Backport 52962) mount: add not_change parameter to set_fstab and similars #55516

Merged
merged 2 commits into from
Jan 2, 2020

Conversation

aplanas
Copy link
Contributor

@aplanas aplanas commented Dec 5, 2019

What does this PR do?

The current 'set_' family search the entry based on a 'match_on'
parameter. If the line is found check that there is no difference
between the expectations and the present line. If there are changes
this line gets replaced.

This default behavior is the correct one in cases where the Salt
code owns all the changes made on entries. But in some scenarios
we do not want to overwrite the line if is already present, even
if there are differences in other parameters, like the option field.

This patch add a new parameter, 'not_change', that if is True will
not overwrite the present line in any case.

Also update the mount state to transfer this new parameter.

Tests written?

Yes

(backport #52962, already merged in develop, on top of #54965)

The current 'set_' family search the entry based on a 'match_on'
parameter. If the line is found check that there is no difference
between the expectations and the present line. If there are changes
this line gets replaced.

This default behaviour is the correct one in cases where the Salt
code owns all the changes made on entries. But in some scenarios
we do not want to overwrite the line if is already present, even
if there are diferences in other parameters, like the option field.

This patch add a new parameter, 'not_change', that if is True will
not overwrite the present line in any case.

Also update the `mount` state to transfer this new parameter.

(cherry picked from commit 5e748e7)
@aplanas aplanas requested a review from a team as a code owner December 5, 2019 09:54
@ghost ghost requested a review from DmitryKuzmenko December 5, 2019 09:54
@dhiltonp dhiltonp self-assigned this Dec 5, 2019
@dwoz dwoz merged commit 89d97b2 into saltstack:master Jan 2, 2020
@aplanas aplanas deleted the backport_52962 branch April 7, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants