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

Ensure provided mode is compared on equal grounds with existing mode (Python 1.9) #14770

Closed
wants to merge 1 commit into from

Conversation

dagwieers
Copy link
Contributor

Issue Type:
  • Bugfix Pull Request

This fixes #14771 for Ansible 1.9.x

Ansible Version:
ansible 1.9.4
  configured module search path = None
Summary:

This is a backport of #14769

We noticed that doing template/copy on files with a slightly different octal mode than expected, check-mode would result in a change, while a real run would return ok.

We traced this to the fact that Ansible converts existing permissions using sstat.S_IMODE(), however it doesn't do so with the provided mode. So when we provided '0100755', it compared '0755' with '0100755'. In a real run this would be equal, but in check-mode it would be considered a change.

…(Python 1.9)

This is a backport of ansible#14769

We noticed that doing template/copy on files with a slightly different octal mode than expected, check-mode would result in a change, while a real run would return ok.

We traced this to the fact that Ansible converts existing permissions using sstat.S_IMODE(), however it doesn't do so with the provided mode. So when we provided '00755', it compared '0755' with '00755'. In a real run this would be equal, but in check-mode it would be considered a change.
@bcoca bcoca added bugfix_pull_request backport This PR does not target the devel branch. labels Mar 3, 2016
@bcoca bcoca added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Mar 4, 2016
@bcoca
Copy link
Member

bcoca commented Mar 4, 2016

discussion in the 2.0 version of this ticket #14769

@dagwieers dagwieers closed this Mar 4, 2016
@jimi-c jimi-c removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Mar 4, 2016
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport This PR does not target the devel branch. bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants