-
-
Notifications
You must be signed in to change notification settings - Fork 56
updater: dom0 non-iteractive updater #191
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
base: main
Are you sure you want to change the base?
Conversation
introduce agent_type: for local (dom0), remote (template vms etc.) and proxy (update vm) actions. `qubes-vm-update` uses `qubes-dom0-update --just-print-progress` for non-interactive update, only small subset of action are supported.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #191 +/- ##
==========================================
- Coverage 73.03% 70.67% -2.37%
==========================================
Files 10 10
Lines 1157 1265 +108
==========================================
+ Hits 845 894 +49
- Misses 312 371 +59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on initial reading the code, I haven't tested it yet.
super().__init__(log_handler, log_level, agent_type) | ||
|
||
if self.type == AgentType.UPDATE_VM: | ||
dnfconf = "/var/lib/qubes/dom0-updates/etc/dnf/dnf.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use self.UPDATE_VM_INSTALLROOT
like in the other places?
|
||
self.base = dnf.Base(conf) | ||
if self.type == AgentType.UPDATE_VM: | ||
self.base._allow_erasing = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the dnf source, the only place where it's used in practice is an argument to base.resolve()
. So, you can use it there (in upgrade_internal) instead of setting a private attribute.
QVMRUN_OPTS=(--quiet --filter-escape-chars --nogui --pass-io) | ||
|
||
if [ "$PROGRESS_REPORTING" == "1" ]; then | ||
CMD="/usr/lib/qubes/qubes-download-dom0-updates-init.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to handle the case of old template too. It's okay to refuse this mode in such a case, but it needs a proper error message instead of a file not found error. Something like "Progress reporting requires updatevm based on a template with Qubes 4.3 packages", or something like this (maybe include template name and/or name of the updatevm?)
Whether it is new enough, you can check either by handling exit code 127 (file not found), or (better) by announcing some supported feature in the core-agent-linux PR and checking it here.
qubes-vm-update
usesqubes-dom0-update --just-print-progress
for non-interactive update, only small subset of action are supported.requires: QubesOS/qubes-core-agent-linux/pull/576