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

qubes-dom0-update fails when the template is missing /var/lib/qubes/dom0-updates dir #3620

Closed
ij1 opened this issue Feb 22, 2018 · 9 comments
Labels
C: core r3.2-dom0-stable r4.0-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@ij1
Copy link

ij1 commented Feb 22, 2018

Qubes OS version:

R3.2

Affected TemplateVMs:

debian-9 derived template that for some reason had /var/lib/qubes/dom0-updates missing.

The reason why it has gone missing is unknown, however, I recently (a few days ago) installed QSB#38 packages into that template and this was the first time I used qubes-dom0-updates after that (IIRC).


Steps to reproduce the behavior:

  • Remove /var/lib/qubes/dom0-updates from updatevm
  • Run sudo qubes-dom0-update in dom0

Expected behavior:

Normal update process.

Actual behavior:

[dom0]$ sudo qubes-dom0-update
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time...
Running command on VM: 'sys-firewall'...
Running command on VM: 'sys-firewall'...
tar: /var/lib/qubes/dom0-updates: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Dom0 updates dir does not exists: /var/lib/qubes/dom0-updates
[dom0]$

General notes:

I was able to restore the functionality by adding that /var/lib/qubes/dom0-updates and chowning it to user.user.

The same problem occurs also with --clean option so it won't help any.

@andrewdavidwong andrewdavidwong added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: core labels Feb 23, 2018
@andrewdavidwong andrewdavidwong added this to the Release 3.2 updates milestone Feb 23, 2018
@donob4n
Copy link

donob4n commented Feb 23, 2018

Fixed with donob4n/qubes-core-admin-linux@facf84a

But I'm not sure if the bug is this not working when there is no /var/lib/qubes/dom0-updates or the fact it doesn't exist.

Qubes 4.0 seems affected too.

@ij1
Copy link
Author

ij1 commented Feb 23, 2018

Will that fix actually work? Doesn't mkdir return an error if the directory is already there?
That is, I guess it would fix my problem but break it for the another case.

@donob4n
Copy link

donob4n commented Feb 23, 2018

Yes but qvm-run doesn't, so it just ignores it. I thought about doing more elegant "if" but there is no too much benefit since it's ignored and chown could fix a rare permission corruption.

@donob4n
Copy link

donob4n commented Feb 23, 2018

uhM, it seems that retcode is ignored because there is no --pass-io

ij1 added a commit to ij1/qubes-core-agent-linux that referenced this issue Feb 23, 2018
This dir was present in 3.2.22 but then got removed from the
package. Missing that dir causes a problem for qubes-dom0-update
that expects to find that dir existing.

Fixes: QubesOS/qubes-issues#3620
ij1 added a commit to ij1/qubes-core-agent-linux that referenced this issue Feb 23, 2018
This dir was present in 3.2.22 but then got removed from the
package. Missing that dir causes a problem for qubes-dom0-update
that expects to find that dir existing.

Fixes: QubesOS/qubes-issues#3620
@ij1
Copy link
Author

ij1 commented Feb 23, 2018

I think I've now found the cause for the missing the directory. The directory was present in qubes-core-agent v3.2.22 but not any more in the #QSB38-fixed versions (probably due to some non-#QSB38 related pending work that got included to the newer version).

marmarek added a commit to QubesOS/qubes-core-admin-linux that referenced this issue Feb 25, 2018
* qubesos/pr/39:
  Added -p to mkdir for skip error if dir exists
  Make dir dom0-updates if not exists on UpdateVM

Fixes QubesOS/qubes-issues#3620
@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-dom0-linux-4.0.12-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-dom0-linux-4.0.13-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.18-1.fc23 has been pushed to the r3.2 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.18-1.fc23 has been pushed to the r3.2 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core r3.2-dom0-stable r4.0-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants