Closed 0xIslamTaha closed 6 years ago
I have the same issue when calling account.space_get
directly from js9
and using the parameters as in template. More detailed stack trace:
In [15]: space = acc.space_get(
...: name='katiadevDeleteMe1',
...: create=True,
...: maxMemoryCapacity=-1,
...: maxVDiskCapacity=-1,
...: maxCPUCapacity=-1,
...: maxNumPublicIP=-1,
...: maxNetworkPeerTransfer=-1,
...: externalnetworkId=None
...: )
...:
...:
* Cloudspace is still deploying, checking again in 2 second
* Cloudspace is still deploying, checking again in 2 second
* Cloudspace is still deploying, checking again in 2 second
* Cloudspace is still deploying, checking again in 2 second
* Cloudspace is still deploying, checking again in 2 second
RuntimeError Traceback (most recent call last)
/usr/local/bin/js9 in <module>()
7 maxNumPublicIP=-1,
8 maxNetworkPeerTransfer=-1,
----> 9 externalnetworkId=None
10 )
11
/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Account.py in space_get(self, name, location, create, maxMemoryCapacity, maxVDiskCapacity, maxCPUCapacity, maxNASCapacity, maxNetworkOptTransfer, maxNetworkPeerTransfer, maxNumPublicIP, externalnetworkId)
88 maxNumPublicIP=maxNumPublicIP,
89 externalnetworkId=externalnetworkId)
---> 90 return self.space_get(name, location, False)
91 else:
92 raise j.exceptions.RuntimeError(
/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Account.py in space_get(self, name, location, create, maxMemoryCapacity, maxVDiskCapacity, maxCPUCapacity, maxNASCapacity, maxNetworkOptTransfer, maxNetworkPeerTransfer, maxNumPublicIP, externalnetworkId)
72 location = self.client.config.data["location"]
73 for space in self.spaces:
---> 74 if space.model['name'] == name and space.model['location'] == location:
75 return space
76 else:
/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Space.py in model(self)
70
71 if j.data.time.epoch > timeout:
---> 72 raise RuntimeError("timeout on getting space info from %s" % self)
73
74 return self._model
/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Space.py in __repr__(self)
360
361 def __repr__(self):
--> 362 return "space: %s (%s)" % (self.model["name"], self.id)
363
364 __str__ = __repr__
/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Space.py in model(self)
70
71 if j.data.time.epoch > timeout:
---> 72 raise RuntimeError("timeout on getting space info from %s" % self)
73
74 return self._model
RuntimeError: timeout on getting space info from space: katiadevDeleteMe1 (315)
If it's just because the timeout is too short, the timeout set here should be increased: https://github.com/Jumpscale/lib9/blob/e3bcaa96c3f177cca5db5a9dd83fc2299cfc62a2/JumpScale9Lib/clients/openvcloud/Space.py#L55
@rkhamis is that possible to confirm this issue is related to js9?
timeout is currently at 20 seconds. Do you guys feel you need it to be longer?
for me, creating a cs in slow env like be-g8-3 is taking more than 20 sec for sure.
alright. here you go https://github.com/Jumpscale/lib9/commit/6ddb02518dfebfe8b953b7ca2f335d47ec803ada
@rkhamis still got it after some testing. Created 5 cloudspaces on be-g8-3 and they took from 47-66 to deploy successfully and had one timeout after 68 seconds (python timing doesn't seem very accurate?)
@chrisvdg not accurate at all from the looks of it... will put it on the TODO... would you prefer a longer timeout anyway?
@rkhamis , I'd guess 100 would be fine, it's a timeout so I think it can be quite long
@rkhamis, increased it myself, haven't had a timeout testing this with a successful deployment https://github.com/Jumpscale/lib9/commit/671c02f46826aaa48885583b930f1961dc7a7e85
@islamTaha12 can this be closed?
Description Create a vdc throws an error while the vdc has been deployed in the env
Blueprint
0-robot Logs
The Env status