Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1285352 - lagocli init fails on el7 when setting up more then one VM
Summary: lagocli init fails on el7 when setting up more then one VM
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-system-tests
Classification: Community
Component: Core
Version: 0.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: David Caro
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-25 12:50 UTC by Barak Korren
Modified: 2016-06-26 23:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-27 19:11:26 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1285368 0 unspecified CLOSED Running 'virt-sysprep' in parallel on EL7 fails 2022-05-16 11:32:56 UTC

Description Barak Korren 2015-11-25 12:50:07 UTC
Description of problem:
When trying to initialize a Lago environment with more then one VM on EL7, Lago fails while running 'virt-sysprep' for some of the VMs while succeeding for others.

Error message example follows:

2015-11-25 13:51:28,256 - root - DEBUG - command stderr: libvirt: XML-RPC error : Failed to connect socket to '/run/user/24044/libvirt/libvirt-sock': No such file or directory
virt-sysprep: error: libguestfs error: could not connect to libvirt (URI = 
qemu:///session): Failed to connect socket to 
'/run/user/24044/libvirt/libvirt-sock': No such file or directory [code=38 
domain=7]

If reporting bugs, run virt-sysprep with debugging enabled and include the 
complete output:

  virt-sysprep -v -x [...]

2015-11-25 13:51:28,256 - root - ERROR - Error while running thread
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/lago/utils.py", line 44, in _ret_via_queue
    queue.put({'return': func()})
  File "/usr/lib/python2.7/site-packages/lago/virt.py", line 123, in <lambda>
    utils.invoke_in_parallel(lambda vm: vm.bootstrap(), self._vms.values())
  File "/usr/lib/python2.7/site-packages/lago/virt.py", line 909, in bootstrap
    ) for i, nic in enumerate(self._spec['nics']) if 'ip' in nic
  File "/usr/lib/python2.7/site-packages/lago/sysprep.py", line 122, in sysprep
    raise RuntimeError('Failed to bootstrap %s' % disk)
RuntimeError: Failed to bootstrap /home/bkorren/src/workspace/jenkins/images/builder_root.qcow2
2015-11-25 13:51:28,266 - root - ERROR - Error occured, aborting
Traceback (most recent call last):
  File "/usr/bin/lagocli", line 532, in main
    func(args)
  File "/usr/bin/lagocli", line 78, in do_init
    prefix.virt_conf(virt_conf, repo, store)
  File "/usr/lib/python2.7/site-packages/lago/__init__.py", line 349, in virt_conf
    env.bootstrap()
  File "/usr/lib/python2.7/site-packages/lago/virt.py", line 123, in bootstrap
    utils.invoke_in_parallel(lambda vm: vm.bootstrap(), self._vms.values())
  File "/usr/lib/python2.7/site-packages/lago/utils.py", line 87, in invoke_in_parallel
    vt.join_all()
  File "/usr/lib/python2.7/site-packages/lago/utils.py", line 44, in _ret_via_queue
    queue.put({'return': func()})
  File "/usr/lib/python2.7/site-packages/lago/virt.py", line 123, in <lambda>
    utils.invoke_in_parallel(lambda vm: vm.bootstrap(), self._vms.values())
  File "/usr/lib/python2.7/site-packages/lago/virt.py", line 909, in bootstrap
    ) for i, nic in enumerate(self._spec['nics']) if 'ip' in nic
  File "/usr/lib/python2.7/site-packages/lago/sysprep.py", line 122, in sysprep
    raise RuntimeError('Failed to bootstrap %s' % disk)
RuntimeError: Failed to bootstrap /home/bkorren/src/workspace/jenkins/images/builder_root.qcow2



Steps to Reproduce:
1. Create a Lago JSON file setting up more then one VM
2. run 'lagocli init' on EL7 with that JSON

Actual results:
Lago crashes with the error above and erases the prefix it began to create.

Expected results:
The Lago environment should be initialised.

Additional info:
Preventing Lago from bootstrapping VMs in parallel worked-around the issue.
To do that the VirtEnv.bootstrap method was patched with the following code:

    def bootstrap(self):
        #utils.invoke_in_parallel(lambda vm: vm.bootstrap(), self._vms.values())
        for vm in self._vms.values():
	    vm.bootstrap()

Comment 1 David Caro 2016-01-27 19:11:26 UTC
Similar to https://github.com/lago-project/lago/issues/32,
have you checked if the issue is solved with the latest libvirtd version? (as the external bug you added suggests).

If not, please comment on the above issue or open a new one.

Cheers!


Note You need to log in before you can comment on or make changes to this bug.