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 · 7 comments

Comments

Projects
None yet
4 participants
@ij1

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.

@donob4n

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n 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.

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.

donob4n added a commit to donob4n/qubes-core-admin-linux that referenced this issue Feb 23, 2018

@ij1

This comment has been minimized.

Show comment
Hide comment
@ij1

ij1 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.

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

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n 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 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

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n Feb 23, 2018

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

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

Fix qubes-dom0-update regression by restoring dom0-updated dir
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 ij1 referenced this issue in QubesOS/qubes-core-agent-linux Feb 23, 2018

Merged

Fix qubes-dom0-update regression by restoring dom0-updates dir #99

ij1 added a commit to ij1/qubes-core-agent-linux that referenced this issue Feb 23, 2018

Fix qubes-dom0-update regression by restoring dom0-updates dir
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

This comment has been minimized.

Show comment
Hide comment
@ij1

ij1 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).

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

Merge remote-tracking branch 'qubesos/pr/39' into release3.2
* 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

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 4, 2018

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

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 qubesos-bot referenced this issue in QubesOS/updates-status Mar 4, 2018

Closed

core-admin-linux v4.0.12 (r4.0) #445

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

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

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 qubesos-bot referenced this issue in QubesOS/updates-status Mar 13, 2018

Closed

core-agent-linux v3.2.26 (r3.2) #452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment