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

Fix idempotency issues with network mounts #11261

Merged
merged 3 commits into from Mar 29, 2021
Merged

Conversation

ramereth
Copy link
Contributor

Resolves #11255

This is basically a continuation of #11031 where I fixed it in one place but then created a regression with idempotency as noted in #11255. This ensures that the /etc/fstab file actually gets the output we expect with network mounts using a root device.

Signed-off-by: Lance Albertson lance@osuosl.org

Resolves chef#11255

This is basically a continuation of chef#11031 where I fixed it in one place but
then created a regression with idempotency as noted in chef#11255. This ensures that
the /etc/fstab file actually gets the output we expect with network mounts using
a root device.

Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth
Copy link
Contributor Author

@tas50 @lamont-granquist I don't think the failures on related to my change but please take a look at this. I'll backport to chef-16 if you approve.

@tas50
Copy link
Contributor

tas50 commented Mar 29, 2021

@ramereth is there a reasonable way to write a unit test here?

@ramereth
Copy link
Contributor Author

@tas50 probably, let me look into it

@@ -176,7 +176,12 @@ def wait_until_unmounted(tries)
# Returns the new_resource device as per device_type
def device_fstab
# Removed "/" from the end of str, because it was causing idempotency issue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expand this comment a bit since we're beyond the single chomp scenario described there

Signed-off-by: Lance Albertson <lance@osuosl.org>
Signed-off-by: Lance Albertson <lance@osuosl.org>
@tas50 tas50 merged commit 1f8ce20 into chef:master Mar 29, 2021
@tas50
Copy link
Contributor

tas50 commented Mar 29, 2021

Thanks @ramereth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling network mounts with a root of / not idempotent and the / is stripped out
3 participants