Commit 6eaf598b authored by Jérome Perrin's avatar Jérome Perrin

testnode/SlapOSControler: run partitions more times

This is for *StandaloneDeploymentScriptTest* test suites, which
download a large disk image during slapos node instance step.

For example, on a Wendelin.StandaloneDeploymentScriptTest-Debian.Stretch
test run [1], we can see that the slapos node instance started at
2022-05-13 07:50:30,788 and stopped trying at 2022-05-13 07:51:35,885.

In the last run, slapos node instance failed, especially this promise:

    2022-05-13 07:51:35,701 INFO     slapgrid_cp: 2022-05-13 07:51:35 slapos[3548917] ERROR ERROR '/srv/slapgrid/slappart22/t/cjl/i/1/srv/monitor/private/virtual-hard-drive-url/virtual-hard-drive-url-processed-config.state' not empty, content available at https://[???]:8026/private/virtual-hard-drive-url/virtual-hard-drive-url-processed-config.state
    ...

and if we access this URL, we can see the error:

    [Errno 2] No such file or directory: '/srv/slapgrid/slappart22/t/cjl/i/1/var/virtual-hard-drive-url/update-image-processed.md5sum'

which means that the image is still not downloaded.

testnode still ignore slapos node instance state return code and run
tests anyway, so the test ran and failed later.

This image is 1.8Go, when I tried to download it locally it took
56.41 seconds, so it must be generally almost OK.

By retrying up to 60 times, we give more time for the slapos node
instance step to download the image.

[1]: https://softinst161166.host.vifib.net/cjl-oSgtg7v20D/suite.log
parent 411cc48a
Pipeline #21465 passed with stage
in 0 seconds
...@@ -39,6 +39,7 @@ from .Utils import createFolder ...@@ -39,6 +39,7 @@ from .Utils import createFolder
MAX_PARTITIONS = 10 MAX_PARTITIONS = 10
MAX_SR_RETRIES = 3 MAX_SR_RETRIES = 3
MAX_CP_RETRIES = 60
class SlapOSControler(object): class SlapOSControler(object):
...@@ -348,7 +349,7 @@ class SlapOSControler(object): ...@@ -348,7 +349,7 @@ class SlapOSControler(object):
def runComputerPartition(self, config, environment, def runComputerPartition(self, config, environment,
stdout=None, stderr=None, cluster_configuration=None, stdout=None, stderr=None, cluster_configuration=None,
max_quantity=MAX_PARTITIONS, **kw): max_quantity=MAX_CP_RETRIES, **kw):
logger.debug("SlapOSControler.runComputerPartition with cluster_config: %r", logger.debug("SlapOSControler.runComputerPartition with cluster_config: %r",
cluster_configuration) cluster_configuration)
for path in self.software_path_list: for path in self.software_path_list:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment