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

Clear Salt cache and synchronize Salt before installing/uninstalling #530

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

eloquence
Copy link
Member

Towards #527

Status

Ready for review

Test plan

If you have made changes to the provisioning logic

  • All tests (make test) pass in dom0 of a Qubes install (not run yet)

  • No files added/removed

@eloquence
Copy link
Member Author

While we're at it, it may be reasonable to add the package cache clean operation discussed in #505 to this PR, since both changes require fairly lengthy test runs to verify. If so, happy to investigate or add a commit with a preferred command.

from the currently installed version
"""
try:
subprocess.check_call(["sudo", "rm", "-rf", "/var/cache/salt"])
Copy link
Member Author

@eloquence eloquence Apr 9, 2020

Choose a reason for hiding this comment

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

It's worth noting there's also qubesctl saltutil.clear_cache, which does leave some scaffolding in place, but is a bit less drastic. The removal is recommended by the qubes-mgmt-salt README here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Comparing the state after running each command:

@conorsch
Copy link
Contributor

With the changes from this PR locally applied, attempt a clean production or staging install

As part of review, I'll transition a test machine from "prod" to "staging" env, running the --uninstall action first.

@conorsch
Copy link
Contributor

The introduced of these additional calls doesn't show any problems for me. It's worth nothing that there's now an error message displayed:

[CRITICAL] Specific ext_pillar interface qvm_prefs is unavailable

but that message doesn't interfere with the install or uninstall actions. I suspect it's related to an ordering problem in how the upstream qubes modules (specifically qvm_prefs) are merged into the site salt config. Given the quest for stability in the install flow, I'd prefer to merge the changes proposed here, and we can circle back to redirect stderr to dev/null if desired.

@conorsch conorsch self-requested a review April 10, 2020 23:02
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