archive.extracted: Use user/group, not archive_user#36552
Merged
cachedout merged 1 commit intosaltstack:developfrom Sep 26, 2016
Merged
Conversation
Contributor
Author
|
I would also appreciate this being cherry-picked to 16.03. |
c5d73da to
ba8650c
Compare
user, not old archive_useruser/group, not archive_user
Ensure that any created parent directories are made with `user`/`group` perms, not as the `archive_user` user. This also allows setting the group for these dirs instead of defaulting to `root`. The `archive_user` argument to archive.extracted has been deprecated since version 2014.7.2, and supplanted by the `user` parameter in 2015.8.0, with a logged warning until Boron. Now that 2016.3.0 is out, complete the deprecation by: - no longer silently using `archive_user` in `archive.extracted`, preferring instead `user` and `group`, - no longer accepted `archive_user` as an argument. Also update man page.
ba8650c to
4a9568d
Compare
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Sep 24, 2016
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Sep 24, 2016
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Sep 24, 2016
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Sep 26, 2016
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions. saltfs-migration: Upgrade Salt on all machines. Steps: - Stop all salt-master and salt-minion services. Because we're upgrading Salt by two major versions at once, there are no guarantees that the masters and minions with different versions will be able to communicate. - Use the install script to re-install Salt on each machine, the master first then the minion. - Restart the salt-master and salt-minion services; pay attention to the system logs in case of startup failure.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Sep 26, 2016
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions. saltfs-migration: Upgrade Salt on all machines. Steps: - Stop all salt-master and salt-minion services. Because we're upgrading Salt by two major versions at once, there are no guarantees that the masters and minions with different versions will be able to communicate. - Use the install script to re-install Salt on each machine, the master first then the minion. - Restart the salt-master and salt-minion services; pay attention to the system logs in case of startup failure. - Do NOT run a highstate until all minions and masters have been updated to Salt 2016.3.0.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Apr 20, 2017
The newer version of this module will prefer to use the unzip command instead of the python zipfil module for unzipping. This works around https://bugs.python.org/issue15795, namely a bug where the zipfile module does not respect permissions. This will fix our Android toolchain `archive.extracted` states. Note that this version of the module does not include saltstack/salt#36552, so keep the `archive_user` argument to `archive.extracted` states. `archive.extracted` sets ownership only on the `if_missing` path, so ensure Salt sets ownership on all the extracted files by unsetting `if_missing`, which (as a new feature) now defaults to `name`. This now refers to the top level extracted directory, so all extracted files will be properly owned by `servo/servo`, which ensures we are able to run the `android` command as the `servo` user to download the platform and build tools in the `cmd.run` state.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Apr 20, 2017
The newer version of this module will prefer to use the unzip command instead of the python zipfil module for unzipping. This works around https://bugs.python.org/issue15795, namely a bug where the zipfile module does not respect permissions. This will fix our Android toolchain `archive.extracted` states. Note that this version of the module does not include saltstack/salt#36552, so keep the `archive_user` argument to `archive.extracted` states. `archive.extracted` sets ownership only on the `if_missing` path, so ensure Salt sets ownership on all the extracted files by unsetting `if_missing`, which (as a new feature) now defaults to `name`. This now refers to the top level extracted directory, so all extracted files will be properly owned by `servo/servo`, which ensures we are able to run the `android` command as the `servo` user to download the platform and build tools in the `cmd.run` state. Because the `unzip` binary will be used to extract the zip files, require the `android-dependencies` `pkg.installed` state from `archive.extracted` states that extract zip archives to ensure that the `unzip` binary is available.
aneeshusa
added a commit
to aneeshusa/servo-saltfs
that referenced
this pull request
Apr 20, 2017
The newer version of this module will prefer to use the unzip command instead of the python zipfile module for unzipping. This works around https://bugs.python.org/issue15795, namely a bug where the zipfile module does not respect permissions. This will fix our Android toolchain `archive.extracted` states. Note that this version of the module does not include saltstack/salt#36552, so keep the `archive_user` argument to `archive.extracted` states. `archive.extracted` sets ownership only on the `if_missing` path, so ensure Salt sets ownership on all the extracted files by unsetting `if_missing`, which defaults to `name`. This now refers to the top level extracted directory, so all extracted files will be properly owned by `servo/servo`, which ensures we are able to run the `android` command as the `servo` user to download the platform and build tools in the `cmd.run` state. Because the `unzip` binary will be used to extract the zip files, require the `android-dependencies` `pkg.installed` state from `archive.extracted` states that extract zip archives to ensure that the `unzip` binary is available.
Coder206
pushed a commit
to Coder206/saltfs
that referenced
this pull request
Apr 22, 2017
Homebrew recently changed their packaging of Salt and Python, using a virtualenvs for Salt. Because we were pinning an old version of Salt, but not the rest of Homebrew, this caused problems where pip was not being resolved properly. Update Salt to the latest version to fix this. As part of the update, also update some states to avoid deprecated parameters in favor of newer ones: - archive.extracted: archive_user -> user, group - cmd.run: user, group -> runas Note that due to saltstack/salt#36552, `archive.extracted` states still have the archive_user argument to ensure parent directories are made with the correct permissions. saltfs-migration: Upgrade Salt on all machines. Steps: - Stop all salt-master and salt-minion services. Because we're upgrading Salt by two major versions at once, there are no guarantees that the masters and minions with different versions will be able to communicate. - Use the install script to re-install Salt on each machine, the master first then the minion. - Restart the salt-master and salt-minion services; pay attention to the system logs in case of startup failure. - Do NOT run a highstate until all minions and masters have been updated to Salt 2016.3.0.
choudhary001
pushed a commit
to choudhary001/saltfs
that referenced
this pull request
May 27, 2017
The newer version of this module will prefer to use the unzip command instead of the python zipfile module for unzipping. This works around https://bugs.python.org/issue15795, namely a bug where the zipfile module does not respect permissions. This will fix our Android toolchain `archive.extracted` states. Note that this version of the module does not include saltstack/salt#36552, so keep the `archive_user` argument to `archive.extracted` states. `archive.extracted` sets ownership only on the `if_missing` path, so ensure Salt sets ownership on all the extracted files by unsetting `if_missing`, which defaults to `name`. This now refers to the top level extracted directory, so all extracted files will be properly owned by `servo/servo`, which ensures we are able to run the `android` command as the `servo` user to download the platform and build tools in the `cmd.run` state. Because the `unzip` binary will be used to extract the zip files, require the `android-dependencies` `pkg.installed` state from `archive.extracted` states that extract zip archives to ensure that the `unzip` binary is available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Ensure that any created parent directories are made with
user/groupperms, not as the
archive_useruser. This also allows setting thegroup for these dirs instead of defaulting to
root.The
archive_userargument to archive.extracted has been deprecatedsince version 2014.7.2, and supplanted by the
userparameter in2015.8.0, with a logged warning until Boron. Now that 2016.3.0 is out,
complete the deprecation by:
archive_userinarchive.extracted,preferring instead
userandgroup,archive_useras an argument.Also update man page.
What issues does this PR fix or reference?
Hit this during servo/saltfs#483 when upgrading from 2015.5.8 to 2016.3.3.
Previous Behavior
Use the (deprecated)
archive_userargument when making parent directories.New Behavior
Use the
userandgrouparguments to set permissions on created parent directories.Tests written?
No
Please review Salt's Contributing Guide for best practices.