Bug 1285352 - lagocli init fails on el7 when setting up more then one VM
lagocli init fails on el7 when setting up more then one VM
Status: CLOSED DEFERRED
Product: ovirt-system-tests
Classification: Community
Component: Core (Show other bugs)
0.4
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Caro
Pavel Stehlik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-25 07:50 EST by Barak Korren
Modified: 2016-06-26 19:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-27 14:11:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1285368 None None None Never

  None (edit)
Description Barak Korren 2015-11-25 07:50:07 EST
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 14:11:26 EST
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.