Skip to content

Ensure bootstrap.sh can write to overlay fs #10415

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agraul
Copy link
Member

@agraul agraul commented Jun 4, 2025

What does this PR change?

We can't assume that the overlay dir corresponding to the transaction we open contains the minion config directory. For example, when venv-salt-minion was previously installed and bootstrap.sh is executed again, the new overlay dir might not have etc/venv-salt-minion.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • Cucumber tests were added

  • DONE

Links

Issue(s): #
Port(s): # add downstream PR(s), if any

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

We can't assume that the overlay dir corresponding to the transaction we
open contains the minion config directory. For example, when
venv-salt-minion was previously installed and bootstrap.sh is executed
again, the new overlay dir might not have etc/venv-salt-minion.
@agraul agraul requested a review from a team as a code owner June 4, 2025 13:16
@agraul agraul requested review from m-czernek and removed request for a team June 4, 2025 13:16
@agraul
Copy link
Member Author

agraul commented Jun 4, 2025

Changelog test stumbles over a period that's not separating two sentences 🤷‍♂️

@@ -948,6 +948,10 @@ def getRegistrationSaltSh(productName):
MINION_SERVICE="venv-salt-minion"
fi

if [ -n "$SNAPSHOT_ID" ]; then
test -d "$MINION_CONFIG_DIR" || mkdir -p "$MINION_CONFIG_DIR"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand here, but if the only problem is that we could re-execute the bootstrap script multiple times, shouldn't we just continue in the previous transaction?

In new_transaction, we use /usr/sbin/tukit -q open, we could use /usr/sbin/tukit --continue --discard -q open instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

There might have been transactions in between the one that added etc/venv-salt-minion/ and the latest. I didn't want to search all the transactions, thought it was cleaner to "onboard in a new transaction", no matter what happened before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, that sounds about right. I suppose this would be situational. Perhaps at some point we could let the users decide whether they want a new transaction or continue in previous one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants