QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
541 stars 48 forks source link

Create New Qube tool: Vague error when putting a space in Qube name #9558

Open Geblaat opened 1 week ago

Geblaat commented 1 week ago

How to file a helpful issue

Qubes OS release

4.2.3

Brief summary

The Create New Qube tool has succeeded the Create Qubes VM tool. The old tool did not allow a space in the name of a Qube name. It just doesn't enter a space at all when you press Space. The new tool does enter the space, but then gives a vague error when creating the Qube. I assume a space in a Qube name is still unsupported, but now this is unclear to new users.

Steps to reproduce

  1. Open Create New Qube
  2. Enter a name with a space in it
  3. Click Create

Expected behavior

  1. Throw an error that explains to the user a space is not allowed in a Qube name
  2. Or don't enter a space at all at step 2 when the user presses Space bar, like the old tool

Actual behavior

Error message: Could not create qube An error occurred: Got empty response from qubesd. See journalctl in dom0 for details

alimirjamali commented 1 week ago

The linked #9303 issue makes it clear. Every AdminAPI call from qubesadmin to qubesd with key=value pairs should assure that there is no space in values. Namely admin.pool.Add, admin.vm.Create and admin.vm.CreateInPool. Since the qubesd side uses .split(' ')

p.s.: Interestingly QubesBase.add_pool is using \n to join the key=value pairs payload and qubesd side is using .splitlines().