openvcloud / 0-templates

Apache License 2.0
1 stars 5 forks source link

Account (or any service) uninstall doesn't work #46

Closed john-kheir closed 6 years ago

john-kheir commented 6 years ago

Scenario

1- Run a blueprint to create account and cloud space, should succeed

services:
  - github.com/openvcloud/0-templates/openvcloud/0.0.1__b06bd8d6:
      address: 'be-g8-3.demo.greenitglobe.com'
      login: 'kheirj@itsyouonline'
      token: '***'
      location: 'be-g8-3'
  - github.com/openvcloud/0-templates/vdcuser/0.0.1__kheirj:
      openvcloud: b06bd8d6
      provider: itsyouonline
      email: kheirj@greenitglobe.com
  - github.com/openvcloud/0-templates/account/0.0.1__64d3cb5d:
      openvcloud: b06bd8d6
  - github.com/openvcloud/0-templates/vdc/0.0.1__1f52f883:
      location: be-g8-3
      account: 64d3cb5d

actions:
  - template: github.com/openvcloud/0-templates/vdcuser/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/account/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/vdc/0.0.1
    actions: ['install']

2 - Run another blueprint to uninstall that account

services:
  - github.com/openvcloud/0-templates/openvcloud/0.0.1__b06bd8d6:
      address: 'be-g8-3.demo.greenitglobe.com'
      login: 'kheirj@itsyouonline'
      token: '***'
      location: 'be-g8-3'
  - github.com/openvcloud/0-templates/vdcuser/0.0.1__kheirj:
      openvcloud: b06bd8d6
      provider: itsyouonline
      email: kheirj@greenitglobe.com

  - github.com/openvcloud/0-templates/account/0.0.1__64d3cb5d:
      openvcloud: b06bd8d6
      location: 'be-g8-3'

actions:
  - template: github.com/openvcloud/0-templates/account/0.0.1
    actions: ['uninstall']

Actual Result

The uninstall of the account failed with the given error

[Sun11 11:42] - base.py           :210 :service-21529f7a-6e81-47b7-a600-7e266594b082 - ERROR    - error executing action uninstall:
Traceback (most recent call last):
  File "/root/0-robot/zerorobot/template/state.py", line 77, in check
    state = self.get(category, tag)
  File "/root/0-robot/zerorobot/template/state.py", line 56, in get
    raise StateCategoryNotExistsError("category %s does not exists" % category)
zerorobot.template.state.StateCategoryNotExistsError: category actions does not exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/0-robot/zerorobot/task/task.py", line 74, in execute
    self._result = self.func()
  File "/opt/code/github/openvcloud/0-templates/templates/account/account.py", line 124, in uninstall
    self.state.check('actions', 'install', 'ok')
  File "/root/0-robot/zerorobot/template/state.py", line 84, in check
    raise StateCheckError(err_msg)
zerorobot.template.state.StateCheckError: check for state actions:install:ok failed
zaibon commented 6 years ago

Duplicate of #33