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

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

Open
wants to merge 59 commits into
base: 3006.x
Choose a base branch
from

Conversation

dmurphy18
Copy link
Contributor

@dmurphy18 dmurphy18 commented Mar 12, 2024

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: #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.

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 dmurphy18 requested a review from a team as a code owner March 12, 2024 22:28
@dmurphy18 dmurphy18 requested review from dwoz and removed request for a team March 12, 2024 22:28
@dmurphy18 dmurphy18 self-assigned this Mar 12, 2024
@dmurphy18 dmurphy18 changed the title [WIP] [3006.x] Ensure on rpm systems, that user and group for existing Salt, is maintained on upgrade [3006.x] Ensure on rpm systems, that user and group for existing Salt, is maintained on upgrade Mar 13, 2024
@dmurphy18 dmurphy18 changed the title [WIP][3006.x] Ensure on rpm and deb systems, that user and group for existing Salt, is maintained on upgrade [3006.x] Ensure on rpm and deb systems, that user and group for existing Salt, is maintained on upgrade Jun 27, 2024
pytestmark = [
pytest.mark.skip_unless_on_linux,
]

Copy link
Contributor

Choose a reason for hiding this comment

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

Some of these tests should run on Windows and MacOS. The local ones should still run. Maybe skip just the ones that require a master.

@@ -5,20 +5,24 @@
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Skip these on MacOS as well

ret = salt_call_cli.run("--local", "cmd.run", test_cmd)
assert ret.returncode == 0


@pytest.mark.skip_on_windows
Copy link
Contributor

Choose a reason for hiding this comment

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

Skip for MacOS also, as there is no SystemD

def test_salt_version(version, install_salt):
"""
Test version output from salt --version
"""
actual = []
test_bin = os.path.join(*install_salt.binary_paths["salt"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should use salt-call here... then it will work on All OSes. No reason why we can't test this on Windows and MacOS. It's one of the few cross-platform tests we could run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite test:slow Enable Slow Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants