salt icon indicating copy to clipboard operation
salt copied to clipboard

[3006.x] Ensure on rpm and deb systems, that user and group for existing Salt, is maintained on upgrade

Open dmurphy18 opened this issue 1 year ago • 4 comments

What does this PR do?

On upgrading on Redhat and Debian families, ensures that existing permissions (user, group) are preserved.

What issues does this PR fix or reference?

Fixes: https://github.com/saltstack/salt/issues/65264

Previous Behavior

Upgrades would force Salt directories etc. permissions user:group to salt:salt

New Behavior

Upgrades of Salt, now note the permissions (user:group) of Salt directories and preserves those permissions.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

  • [ ] Docs
  • [X] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
  • [ ] Tests written/updated

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

dmurphy18 avatar Mar 12 '24 22:03 dmurphy18

Proposed to @barneysowood that I take over https://github.com/saltstack/salt/pull/66047 and https://github.com/saltstack/salt/pull/66050 since they are not receiving enough attention

dmurphy18 avatar Apr 23 '24 15:04 dmurphy18

Taken over #66047 and #66050 with @barneysowood permission

dmurphy18 avatar Apr 24 '24 19:04 dmurphy18

Run into testing infrastructure problem, with --no-install on the CLI, runs into missing salt-master since shutil.which("salt-master") fails, since it is NOT INSTALLED :faceplam:, confirmed with 3006.x branch with same command:

nox -e 'ci-test-onedir-pkgs' -- upgrade --prev-version=3006.8  -vv --run-destructive --no-install --log-level=TRACE --log-cli-level=TRACE --log-file-level=TRACE 2>&1 tests/pytests/pkg/upgrade/test_salt_upgrade.py | tee ~/mytest.log

Working on solution. Note: the --no-install on CLI negates upgrade, and when fails due to command

nox -e 'ci-test-onedir-pkgs' -- upgrade --prev-version=3006.8  -vv --run-destructive --log-level=TRACE --log-cli-level=TRACE --log-file-level=TRACE 2>&1 tests/pytests/pkg | tee ~/mytest.log

and the above command introduces the --no-install internally and hence failure.

dmurphy18 avatar Jun 14 '24 16:06 dmurphy18

Fixing test_salt_api.py in tests/pytests/pkg/integration, packaging tests appear not to have been completed before the Broadcom buyout was finalized and running into issues as implementing upgrade/downgrade tests.

dmurphy18 avatar Jun 24 '24 20:06 dmurphy18