testcloud 0.11.0__tar.gz → 0.11.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {testcloud-0.11.0/testcloud.egg-info → testcloud-0.11.1}/PKG-INFO +1 -1
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/source/conf.py +1 -1
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/__init__.py +1 -1
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/instance.py +33 -9
- {testcloud-0.11.0 → testcloud-0.11.1/testcloud.egg-info}/PKG-INFO +1 -1
- {testcloud-0.11.0 → testcloud-0.11.1}/.gitignore +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/LICENSE +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/README.md +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/conf/99-testcloud-nonroot-libvirt-access.rules +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/conf/settings-example.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/conf/testcloud +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/LICENSE +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/Makefile +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/source/api.rst +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/source/indepth.rst +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/docs/source/index.rst +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/manpages/testcloud.1 +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/pyproject.toml +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/requirements.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/run_testcloud.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/setup.cfg +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/setup.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/test/__init__.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/test/test_cli.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/test/test_config.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/test/test_image.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/test/test_instance.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/cli.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/config.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/__init__.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/alma.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/centos.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/debian.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/fedora.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/misc.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/oracle.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/rocky.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/distro_utils/ubuntu.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/domain_configuration.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/exceptions.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/image.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/sql.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/util.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud/workarounds.py +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud.egg-info/SOURCES.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud.egg-info/dependency_links.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud.egg-info/entry_points.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud.egg-info/requires.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/testcloud.egg-info/top_level.txt +0 -0
- {testcloud-0.11.0 → testcloud-0.11.1}/tox.ini +0 -0
|
@@ -571,13 +571,14 @@ class Instance(object):
|
|
|
571
571
|
"qemu:///system and qemu:///session")
|
|
572
572
|
|
|
573
573
|
excs = []
|
|
574
|
-
for
|
|
574
|
+
for i in range(max(1, retries + 1)):
|
|
575
575
|
try:
|
|
576
576
|
self._start(timeout=timeout)
|
|
577
577
|
break
|
|
578
578
|
except TestcloudInstanceError as exc:
|
|
579
579
|
excs.append(exc)
|
|
580
|
-
|
|
580
|
+
if i != range(max(1, retries + 1)):
|
|
581
|
+
log.debug("Retrying instance creation due to hang...")
|
|
581
582
|
else:
|
|
582
583
|
raise excs[-1]
|
|
583
584
|
|
|
@@ -601,7 +602,7 @@ class Instance(object):
|
|
|
601
602
|
poll_tick = 0.5
|
|
602
603
|
timeout_ticks = timeout / poll_tick
|
|
603
604
|
count = 0
|
|
604
|
-
port_open =
|
|
605
|
+
port_open = False
|
|
605
606
|
domif = {}
|
|
606
607
|
port = self.get_instance_port()
|
|
607
608
|
|
|
@@ -609,22 +610,45 @@ class Instance(object):
|
|
|
609
610
|
# found, indicating that the boot process is post-cloud-init
|
|
610
611
|
while count <= timeout_ticks:
|
|
611
612
|
if self.connection == "qemu:///system":
|
|
613
|
+
log.debug("Checking if ssh is up on: %s" % self.name)
|
|
612
614
|
domif = dom.interfaceAddresses(libvirt.VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE)
|
|
613
615
|
elif self.connection == "qemu:///session" and not self.coreos:
|
|
614
616
|
try:
|
|
615
|
-
log.debug("Checking if cloud-init has finished its job for: "
|
|
617
|
+
log.debug("Checking if cloud-init has finished its job for: %s" % self.name)
|
|
616
618
|
requests.head("http://127.0.0.1:%d" % (port - 1000), timeout=1).raise_for_status()
|
|
617
|
-
port_open =
|
|
619
|
+
port_open = True
|
|
618
620
|
except Exception:
|
|
619
621
|
time.sleep(poll_tick * 4) # Larger value to prevent SYN flood
|
|
620
622
|
count += 4
|
|
621
623
|
continue
|
|
622
624
|
elif self.connection == "qemu:///session" and self.coreos:
|
|
623
625
|
domif = {}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
log.debug("Checking if ssh is up on: %s" % self.name)
|
|
627
|
+
try:
|
|
628
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
629
|
+
sock.settimeout(poll_tick * 4)
|
|
630
|
+
sock.connect(("127.0.0.1", self.get_instance_port()))
|
|
631
|
+
resp = sock.recv(1024)
|
|
632
|
+
assert resp is not None
|
|
633
|
+
assert "ssh" in resp.decode("utf-8").lower()
|
|
634
|
+
port_open = True
|
|
635
|
+
except ConnectionRefusedError:
|
|
636
|
+
# To support old behavior where sock.connect fails before vm startup
|
|
637
|
+
# We didn't wait for timeout in this branch
|
|
638
|
+
domain_state = _find_domain(self.name, self.connection)
|
|
639
|
+
if domain_state != "running":
|
|
640
|
+
break
|
|
641
|
+
time.sleep(poll_tick * 4)
|
|
642
|
+
except (TimeoutError, AssertionError):
|
|
643
|
+
# AssertionError To break on abrupt libvirt domain shutoff
|
|
644
|
+
# TimeoutError Expected while waiting for ssh in VM
|
|
645
|
+
domain_state = _find_domain(self.name, self.connection)
|
|
646
|
+
if domain_state != "running":
|
|
647
|
+
break
|
|
648
|
+
finally:
|
|
649
|
+
sock.close()
|
|
650
|
+
|
|
651
|
+
if len(domif) > 0 or port_open:
|
|
628
652
|
log.info("Successfully booted instance {}".format(self.name))
|
|
629
653
|
return
|
|
630
654
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|