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
Conversation
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>
@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. |
@ramereth is there a reasonable way to write a unit test here? |
@tas50 probably, let me look into it |
lib/chef/provider/mount.rb
Outdated
@@ -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. |
There was a problem hiding this comment.
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>
Thanks @ramereth. |
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