Skip to content

Enable pkg tests for systemd status on upgrade #67968

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

Merged
merged 18 commits into from
Jun 23, 2025

Conversation

barneysowood
Copy link
Collaborator

@barneysowood barneysowood commented Apr 17, 2025

What does this PR do?

Enables tests for systemd status (enabled, active etc). These were added in #66218 but disabled. We should actually be testing this.

Spotted this when reviewing #66688 - I was surprised that wasn't breaking tests. Assume the intent was that this should be enabled once #66218 was merged and pkg tests were running again

Previous Behavior

Tests for maintaining status of systemd services on upgrade were not being run

New Behavior

Concerns/questions

I've got some concerns about the approach of some of this and would like some feedback..

  1. Installing the previous version, running the test and then re-installing the previous version is necessary to accurately test upgrades, but it is slow. I'm not sure how we could do this reasonably without that.
    To give some idea of times, the Ubuntu 24.04 upgrade goes from ~5m to ~13m and Rocky Linux 9 Upgrade from ~6m to ~12m. Should these be marked with slow_test?

  2. Running the install->upgrade->revert in the newly enabled tests means that when we run the tests in test_salt_upgrade, although the old version is installed, the new version has been installed multiple times, so could have mutated system state.
    I'd perhaps prefer to split these new tests out into a separate set of tests in their own container instance. That would leave the upgrade+integration tests we currently run to be on a totally clean instance, then these tests in something like "Test Package Systemd Upgrade". Obviously that add some complexity to the workflow run setup..

Merge requirements satisfied?

N/A

Commits signed with SSH?

Yes

@barneysowood barneysowood self-assigned this Apr 17, 2025
@barneysowood barneysowood force-pushed the enable-pkg-systemd-tests branch from 31382c6 to ebdaa0c Compare May 6, 2025 14:11
@barneysowood barneysowood force-pushed the enable-pkg-systemd-tests branch from ebdaa0c to a02bdef Compare May 7, 2025 17:06
@barneysowood barneysowood force-pushed the enable-pkg-systemd-tests branch from a02bdef to e514927 Compare May 7, 2025 19:28
@barneysowood
Copy link
Collaborator Author

Hmm, looks like the user tests are breaking in just Photon OS. I'll pull a container for that and debug.

Specify usergroup=True when adding test users - this isn't default on
Photon OS so later assumption about group ownership of PID is wrong
without it.
@barneysowood
Copy link
Collaborator Author

Fixed issue with Photon OS - it defaults to not adding a usergroup with useradd, so the test assumption that the user and group for the pid file would be the same didn't hold. Added usergroup=True to fix that.

@dwoz dwoz modified the milestones: Sulfur v3006.12, Sulfer v3006.13 Jun 13, 2025
@dwoz dwoz merged commit 6bbaab5 into saltstack:3006.x Jun 23, 2025
1394 of 1399 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants