Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-4816

[test-operator] Tobiko can't execute virt-customize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • test-operator
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • No

      Tobiko tests using ubuntu images need to run a virt-customize command on the downloaded ubuntu image in order to modify some stuff from it.

      With a tobiko container created with podman using the ci-fmw's tobiko role, that works fine. With the test-operator, we get this error:

      $ python3 -m tox -e neutron -- tobiko/tests/scenario/neutron/test_qos.py::QoSNetworkTest::test_ping_dscp
      ...
      Traceback (most recent call last):  File "/var/lib/tobiko/tobiko/tobiko/common/_skip.py", line 123, in wrapper    return method(*args, **kwargs)  File "/var/lib/tobiko/tobiko/tobiko/common/_skip.py", line 123, in wrapper    return method(*args, **kwargs)  File "/var/lib/tobiko/tobiko/tobiko/tests/scenario/neutron/test_qos.py", line 49, in setUp    sh.get_hostname(self.server.ssh_client)  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 653, in setup_fixture    setup_fixture(fixture, **self.kwargs)  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 201, in setup_fixture    raise testtools.MultipleExceptions(*errors)  File "/usr/lib64/python3.9/contextlib.py", line 137, in __exit__    self.gen.throw(typ, value, traceback)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 154, in handle_multiple_exceptions    reraise(*exception)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 118, in reraise    raise value  File "/var/lib/tobiko/tobiko/.tox/py3/lib/python3.9/site-packages/fixtures/fixture.py", line 197, in setUp    self._setUp()  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 612, in _setUp    self.setup_fixture()  File "/var/lib/tobiko/tobiko/.tox/py3/lib/python3.9/site-packages/oslo_concurrency/lockutils.py", line 391, in inner    return f(*args, **kwargs)  File "/var/lib/tobiko/tobiko/tobiko/openstack/stacks/_nova.py", line 440, in setup_fixture    super(CloudInitServerStackFixture, self).setup_fixture()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 155, in setup_fixture    self.setup_parameters()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 165, in setup_parameters    self.get_stack_parameters()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 197, in get_stack_parameters    return tobiko.reset_fixture(self.parameters).values  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 242, in reset_fixture    fixture.reset()  File "/usr/lib64/python3.9/contextlib.py", line 137, in __exit__    self.gen.throw(typ, value, traceback)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 154, in handle_multiple_exceptions    reraise(*exception)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 118, in reraise    raise value  File "/var/lib/tobiko/tobiko/.tox/py3/lib/python3.9/site-packages/fixtures/fixture.py", line 197, in setUp    self._setUp()  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 612, in _setUp    self.setup_fixture()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 583, in setup_fixture    self.setup_values()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 603, in setup_values    self._values = values = self.get_values()  File "/var/lib/tobiko/tobiko/tobiko/openstack/heat/_stack.py", line 662, in get_values    value = getattr(self.stack, key, None)  File "/var/lib/tobiko/tobiko/tobiko/openstack/stacks/_nova.py", line 112, in image    return self.image_fixture.image_id  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 653, in setup_fixture    setup_fixture(fixture, **self.kwargs)  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 201, in setup_fixture    raise testtools.MultipleExceptions(*errors)  File "/usr/lib64/python3.9/contextlib.py", line 137, in __exit__    self.gen.throw(typ, value, traceback)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 154, in handle_multiple_exceptions    reraise(*exception)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 118, in reraise    raise value  File "/var/lib/tobiko/tobiko/.tox/py3/lib/python3.9/site-packages/fixtures/fixture.py", line 197, in setUp    self._setUp()  File "/var/lib/tobiko/tobiko/tobiko/common/_fixture.py", line 612, in _setUp    self.setup_fixture()  File "/var/lib/tobiko/tobiko/.tox/py3/lib/python3.9/site-packages/oslo_concurrency/lockutils.py", line 391, in inner    return f(*args, **kwargs)  File "/var/lib/tobiko/tobiko/tobiko/openstack/stacks/_ubuntu.py", line 47, in setup_fixture    super(UbuntuMinimalImageFixture, self).setup_fixture()  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 113, in setup_fixture    self.setup_image()  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 213, in setup_image    self.create_image()  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 249, in create_image    self.upload_image()  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 288, in upload_image    image_data, image_size = self.get_image_data()  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 333, in get_image_data    return self.get_image_file(image_file=self.real_image_file)  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 336, in get_image_file    image_file = self.customize_image_file(base_file=image_file)  File "/var/lib/tobiko/tobiko/tobiko/openstack/glance/_image.py", line 463, in customize_image_file    sh.execute(command + options)  File "/var/lib/tobiko/tobiko/tobiko/shell/sh/_execute.py", line 157, in execute    return execute_process(process=process,  File "/var/lib/tobiko/tobiko/tobiko/shell/sh/_execute.py", line 206, in execute_process    error.reraise()  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 109, in reraise    reraise(*self)  File "/var/lib/tobiko/tobiko/tobiko/common/_exception.py", line 118, in reraise    raise value  File "/var/lib/tobiko/tobiko/tobiko/shell/sh/_execute.py", line 185, in execute_process    process.check_exit_status(expect_exit_status)  File "/var/lib/tobiko/tobiko/tobiko/shell/sh/_process.py", line 423, in check_exit_status    raise extobiko.shell.sh._exception.ShellCommandFailed: command '/bin/sh -c 'virt-customize -a /tmp/tmp.tZrDRW1g1O --firstboot-command '"'"'sh -c "hostname > /var/www/html/id"'"'"' --install iperf3,iputils-ping,nano,ncat,nginx,vlan --password ubuntu:password:ubuntu --run-command '"'"'echo "[Unit]Description=iperf3 server on port %iAfter=syslog.target network.target [Service]ExecStart=/usr/bin/iperf3 -s -p %iRestart=alwaysUser=root [Install]WantedBy=multi-user.targetDefaultInstance=5201" > /etc/systemd/system/iperf3-server@.service'"'"' --run-command '"'"'systemctl enable iperf3-server@5201'"'"' --run-command '"'"'echo "8021q" >> /etc/modules'"'"' --write '"'"'/etc/netplan/75-tobiko-vlan.yaml:network:  version: 2  vlans:    vlan101:      dhcp4: true      dhcp4-overrides:        use-routes: false      dhcp6: true      dhcp6-overrides:        use-routes: false      id: 101      link: enp3s0'"'"''' failed (exit status is 1);stdin:Nonestdout:[   0.0] Examining the guest ... stderr:libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directoryvirt-customize: error: libguestfs error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory [code=38 int1=2] If reporting bugs, run virt-customize with debugging enabled and include the complete output:   virt-customize -v -x [...]

       

              eolivare Eduardo Olivares Toledo
              eolivare Eduardo Olivares Toledo
              rhos-tempest
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: