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

qvm-block attach dom0 XXX fails due to 'AdminVM' object has no attribute 'is_halted' #3054

Closed
ctrlaltdel opened this Issue Aug 27, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@ctrlaltdel

Qubes OS version (e.g., R3.2):

R4-rc1

Affected TemplateVMs (e.g., fedora-23, if applicable):

Dom0


Expected behavior:

USB storage device available in dom0.

Actual behavior:

got empty response from qubesd

Steps to reproduce the behavior:

Run qvm-block attach dom0 sys-usb:sda from a dom0 terminal after attaching a USB storage device.

General notes:

The following exception is logged in journald:

Aug 27 23:14:02 dom0 qubesd[2430]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.block.Attach' dest=b'dom0' arg=b'sys-usb+sda' len(untrusted_payload)=0
Aug 27 23:14:02 dom0 qubesd[2430]: Traceback (most recent call last):
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 262, in respond
Aug 27 23:14:02 dom0 qubesd[2430]:     untrusted_payload=untrusted_payload)
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 380, in __iter__
Aug 27 23:14:02 dom0 qubesd[2430]:     yield self  # This tells Task to wait for completion.
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 304, in _wakeup
Aug 27 23:14:02 dom0 qubesd[2430]:     future.result()
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 293, in result
Aug 27 23:14:02 dom0 qubesd[2430]:     raise self._exception
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 239, in _step
Aug 27 23:14:02 dom0 qubesd[2430]:     result = coro.send(None)
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib/python3.5/site-packages/qubes/api/admin.py", line 1067, in vm_device_attach
Aug 27 23:14:02 dom0 qubesd[2430]:     yield from self.dest.devices[devclass].attach(assignment)
Aug 27 23:14:02 dom0 qubesd[2430]:   File "/usr/lib/python3.5/site-packages/qubes/devices.py", line 197, in attach
Aug 27 23:14:02 dom0 qubesd[2430]:     if not device_assignment.persistent and self._vm.is_halted():
Aug 27 23:14:02 dom0 qubesd[2430]: AttributeError: 'AdminVM' object has no attribute 'is_halted'
@kalkin

This comment has been minimized.

Show comment
Hide comment
@kalkin

kalkin Aug 30, 2017

Member

AFAIK You shouldn't be able to attach usb devices from dom0. Still so a proper error message would be nice.

Member

kalkin commented Aug 30, 2017

AFAIK You shouldn't be able to attach usb devices from dom0. Still so a proper error message would be nice.

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Oct 20, 2017

vm/adminvm: add is_halted() method
It is used in some places, for example attaching devices.

Fixes QubesOS/qubes-issues#3054

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Oct 21, 2017

vm/adminvm: add is_halted() method
It is used in some places, for example attaching devices.

Fixes QubesOS/qubes-issues#3054
@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Oct 21, 2017

Automated announcement from builder-github

The package qubes-core-dom0-4.0.11-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-4.0.11-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 Oct 21, 2017

Closed

core-admin v4.0.11 (r4.0) #284

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Oct 30, 2017

Automated announcement from builder-github

The package qubes-core-dom0-4.0.11-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-4.0.11-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

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