Closed john-kheir closed 6 years ago
@john-kheir , example code is misleading here, so if you used underscore in the name of vm
, the install actions might have failed and kept retrying, so the next action in the task list (get_info
in this case) couldn't be executed, so wait
action would hang.
However, since you mentioned that the VM was successfully created, I assume you dind't use underscores. For this scenarios I can't reproduce the error. I'm using the same example on code and I have node created and I can get_info
with no problem.
If scenario reproduces, more exact log of cmd's would be helpful, as well as robot log.
Expected value of "port" should be of type int or a string of int., Retrying in 3 seconds...
[Tue12 13:38] - Space.py :280 :j.space - INFO - Cloud space ID:676 name:86e60f3b size:1 image:1 disksize:10
Expected value of "port" should be of type int or a string of int., Retrying in 6 seconds...
[Tue12 13:38] - Space.py :280 :j.space - INFO - Cloud space ID:676 name:86e60f3b size:1 image:1 disksize:10
Expected value of "port" should be of type int or a string of int., Retrying in 12 seconds...
[Tue12 13:38] - Space.py :280 :j.space - INFO - Cloud space ID:676 name:86e60f3b size:1 image:1 disksize:10
Expected value of "port" should be of type int or a string of int., Retrying in 24 seconds...
[Tue12 13:38] - Space.py :280 :j.space - INFO - Cloud space ID:676 name:86e60f3b size:1 image:1 disksize:10
[Tue12 13:38] - base.py :207 :service-214602e0-eb2b-4614-b6e9-3837d473e761 - ERROR - error executing action install:
Traceback (most recent call last):
File "/opt/code/github/zero-os/0-robot/zerorobot/task/task.py", line 79, in execute
self._result = self._func()
File "/opt/code/github/zero-os/0-robot/zerorobot/template/decorator.py", line 43, in f_retry
return f(*args, **kwargs)
File "/opt/code/github/openvcloud/0-templates/templates/node/node.py", line 127, in install
machine = self._machine_create()
File "/opt/code/github/openvcloud/0-templates/templates/node/node.py", line 157, in _machine_create
managed_private=data.get('managedPrivate', False)
File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Space.py", line 336, in machine_create
machine.authorizeSSH(sshkeyname=sshkeyname)
File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Machine.py", line 386, in authorizeSSH
self._authorize(sshkeyname, instance, addr, port, None)
File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Machine.py", line 404, in _authorize
keyname="", allow_agent=False, timeout=300)
File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClientFactory.py", line 50, in new
cl = self.get(instance=instance, data=data, die=die, use_paramiko=use_paramiko)
File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClientFactory.py", line 99, in get
return SSHClient(instance=instance, data=data, parent=self, interactive=interactive)
File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClient.py", line 27, in __init__
data=data, parent=parent, interactive=interactive)
File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClientBase.py", line 27, in __init__
parent=parent, template=TEMPLATE, interactive=interactive)
File "/opt/code/github/jumpscale/core9/JumpScale9/tools/configmanager/JSBaseClassConfig.py", line 29, in __init__
self, instance=self._instance, data=data, template=self._template, ui=self._ui)
File "/opt/code/github/jumpscale/core9/JumpScale9/tools/configmanager/ConfigManager.py", line 234, in _get_for_obj
sc = Config(instance=instance, location=location, template=template, data=data)
File "/opt/code/github/jumpscale/core9/JumpScale9/tools/configmanager/Config.py", line 41, in __init__
data, error = j.data.serializer.toml.merge(tomlsource=data2, tomlupdate=data, listunique=True)
File "/opt/code/github/jumpscale/core9/JumpScale9/data/serializers/SerializerTOML.py", line 159, in merge
errors=errors, listunique=listunique, listsort=listsort, liststrip=liststrip)
File "/opt/code/github/jumpscale/core9/JumpScale9/data/serializers/SerializerDict.py", line 112, in merge
errors=errors, listunique=listunique, listsort=listsort, liststrip=liststrip)
File "/opt/code/github/jumpscale/core9/JumpScale9/data/serializers/SerializerDict.py", line 71, in set_value
raise RuntimeError("Expected value of \"{}\" should be of type int or a string of int.".format(key))
RuntimeError: Expected value of "port" should be of type int or a string of int.
@john-kheir , This looks like a bug in js9 that was there around yesterday. Please check that js9 is updated today.
node_info
line which hangs
node_info = node.schedule_action('get_info').wait(die=True).result
And the vm name and the vm service name don't have underscore according to this test case https://github.com/openvcloud/0-templates/blob/master/tests/integration_tests/testsuite/ovc_tests/a_basic/vms_tests.py#L136
ipdb> vm_name
'a930d7d3'
ipdb> vm_ser_name
'e43adce8'
ipdb>
@john-kheir , please add node.state
value
Node state
ipdb> node.state
{}
"install" task state for this node
ipdb> install = t1.list_tasks()[0]
ipdb> install.state
'running'
This ticket was related to a network problem. nothing wrong in the code
Scenario
1- Create account, vdc and node using dsl
2- Try to make a call for scheduling an action "get _info"
Actual result
This call won't come back (not even a timeout) although the vm has been created on the environment
Zrobot version
version: development branch commit 60a521780fd832299fef57d5fae403818d2c6447