-
Notifications
You must be signed in to change notification settings - Fork 686
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-staging molecule scenario fails at create step #3936
Comments
Came across this issue the other day. And it quite obnoxious. After a little digging, it seems that the problem is with qubes, particularly some part that does not seem to be yet implemented. They even have a A quick temporary fix to comment out all those lines like so: """
try:
# FIXME: convert to qrexec calls to dom0/GUI VM
appmenus_cmd = \
['qvm-appmenus', '--init', '--update',
'--source', src_vm.name, dst_vm.name]
subprocess.check_output(appmenus_cmd, stderr=subprocess.STDOUT)
except OSError:
# this file needs to be python 2.7 compatible,so no FileNotFoundError
self.log.error('Failed to clone appmenus, qvm-appmenus missing')
if not ignore_errors:
raise qubesadmin.exc.QubesException(
'Failed to clone appmenus')
except subprocess.CalledProcessError as e:
self.log.error('Failed to clone appmenus: %s',
e.output.decode())
if not ignore_errors:
raise qubesadmin.exc.QubesException(
'Failed to clone appmenus')
""" Maybe this problem should be mentioned in the docs so people at least know it's not only happening to them. |
Opened an issue detailing the problem on qubes-issues as this seems to be a problem with qubes rather than this project |
I use this script locally to work around the problem in the meantime:
Run that in dom0, then |
@emkll @conorsch I didn't run into this while setting up staging under Qubes recently, even though we're not using |
@rmol I'm definitely still seeing the error locally: TASK [Clone base image for staging VMs] **************************************** fatal: [localhost]: FAILED! => {"msg": "The conditional check 'clone_result.rc != 0 and \"qvm-clone: error: VM \"+item.vm_name+\" already exists\" not in clone_result.stderr_lines' failed. The error was: error while evaluating conditional (clone_result.rc != 0 and \"qvm-clone: error: VM \"+item.vm_name+\" already exists\" not in clone_result.stderr_lines): Unable to look up a name or access an attribute in template string ({% if clone_result.rc != 0 and \"qvm-clone: error: VM \"+item.vm_name+\" already exists\" not in clone_result.stderr_lines %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable"} to retry, use: --limit @/home/user/securedrop/molecule/qubes-staging/create.retry For complete's sake, here's confirmation that I'm running latest develop, with latest pip deps installed. Terminal session
I use a patch to get around this, so I'll submit that, as well as knocking out the longstanding #3629. |
Description
qubes-staging molecule action fails to create (clone sd-$ROLE-base) in the adminvm:
manually running qvm-clone results in the same error (and the VMs are not cloned):
Steps to Reproduce
molecule converge -s qubes-staging
Expected Behavior
molecule scenario should succeed and a SecureDrop staging environment should be created
Actual Behavior
Molecule scenario fails at the Create step
Comments
qvm-clone automatically uses the class of the source of the copy (
--class StandaloneVM
), and passing--class StandaloneVM
does not address the issue.Workaround is to qvm-clone the base VMs in dom0, and then run the molecule converge step in the adminVM. In dom0:
The text was updated successfully, but these errors were encountered: