Closed Dinaamagdy closed 6 years ago
@Dinaamagdy, Having your blueprint would be nice to try and replicate it (don't forget to remove auth tokens etc.)
@Dinaamagdy , there were indeed some missing checks in the templates. This should be solved by #75 .
Feel free to test on branch vdcuser
and verify that the problem was solved.
still get this error when I update fake cloudspace with update action , using the following blueprint:
services:
- github.com/openvcloud/0-templates/sshkey/0.0.1__b0e5ec7a:
dir: '/root/.ssh/'
passphrase: 'b0e5ec7a'
- github.com/openvcloud/0-templates/openvcloud/0.0.1__3cd11936:
address: 'be-g8-3.demo.greenitglobe.com'
login: 'gig_qa_1@itsyouonline'
token: 'eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJhenAiOiJ1Z3ZoYnI4dENtVUFrMHZLTC1KNTNOZnVLdERwIiwiZXhwIjoxNTIyNzY2MTQwLCJpc3MiOiJpdHN5b3VvbmxpbmUiLCJzY29wZSI6WyJ1c2VyOmFkbWluIl0sInVzZXJuYW1lIjoiZ2lnX3FhXzEifQ.Cb4GJFFRTTZIyo7NpmhA3w1CSR8lpoZFyDPUo8Mll0ehxHFvDf-BppQOALncAk7Df0j9GCWjAxzOvw7EI6XXLSJkydRWOK1Ib42EPutAIA2eqjnPm5_24BgKO3C1f-yT'
location: 'be-g8-3'
- github.com/openvcloud/0-templates/vdcuser/0.0.1__gig_qa_1:
email: dina.magdy.mohammed+123@gmail.com
provider: itsyouonline
openvcloud: 3cd11936
- github.com/openvcloud/0-templates/account/0.0.1__c1c442a5:
openvcloud: cb9ebb33
- github.com/openvcloud/0-templates/vdc/0.0.1__6bbbecb2:
maxMemoryCapacity: 710
account: c1c442a5
actions:
- template: github.com/openvcloud/0-templates/vdc/0.0.1
args:
maxNumPublicIP: 294
maxNetworkPeerTransfer: 181
maxMemoryCapacity: 711
maxCPUCapacity: 959
maxVDiskCapacity: 841
service: 6bbbecb2
actions: ['update']
the following Error on zrobt serever
[Mon02 14:20] - base.py :201 :service-883e3906-ee3d-4a61-94a3-a1f52b4afdb9 - ERROR - error executing action update:
Traceback (most recent call last):
File "/root/0-robot/zerorobot/template/state.py", line 78, in check
state = self.get(category, tag)
File "/root/0-robot/zerorobot/template/state.py", line 57, in get
raise StateCategoryNotExistsError("category %s does not exist" % category)
zerorobot.template.state.StateCategoryNotExistsError: category actions does not exist
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/0-robot/zerorobot/task/task.py", line 76, in execute
self._result = self.func(**self._args)
File "/opt/code/github/openvcloud/0-templates/templates/vdc/vdc.py", line 330, in update
self.state.check('actions', 'install', 'ok')
File "/root/0-robot/zerorobot/template/state.py", line 85, in check
raise StateCheckError(err_msg)
zerorobot.template.state.StateCheckError: check for state actions:install:ok failed
There should be an error that cloudspace doesn't exist and it should be displayed in the terminal.
@Dinaamagdy, did you run an install template before this? Because if not, this is an expected error as the update
action checks if the install
was run successfully before.
@chrisvdg what about updat non-exist cloudspace?, should I change service name only ?
@Dinaamagdy , I don't think the templates allow you to do this, if you run update
on a vdc service that has not has not run install
before, it will error like you posted before, and running install
will try and make sure it does exist.
If you reference a service in an action that doesn't exists, 0-robot will skip that action.
no way to do that using template according to @chrisvdg
Scenario
Try to update fake cloudspace with update action
Result
Error raise on zrobot server that install action doesn't exist
Expected Result
There should be an error that cloudspace doesn't exist and it should be displayed in the terminal.