openvcloud / 0-templates

Apache License 2.0
1 stars 5 forks source link

Can't uninstall a service. #33

Closed john-kheir closed 6 years ago

john-kheir commented 6 years ago

1- Create a blueprint to create account and vdc. 2- Create another blueprint to uninstall the account

services:
  - github.com/openvcloud/0-templates/openvcloud/0.0.1__d4c5d026:
      address: 'be-g8-4.demo.greenitglobe.com'
      login: 'kheirj@itsyouonline'
      token: '*****'
  - github.com/openvcloud/0-templates/vdcuser/0.0.1__kheirj:
      openvcloud: d4c5d026
      email: kheirj@greenitglobe.com
      provider: itsyouonline
  - github.com/openvcloud/0-templates/account/0.0.1__18cc2d66:
      openvcloud: d4c5d026

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

Result

This error prevented the account to be uninstalled

[Thu01 12:28] - pywsgi.py           :1146:j.zerorobot                    - INFO     - ::1 - - [2018-03-01 12:28:57] "POST /blueprints HTTP/1.1" 200 385 0.177952
Traceback (most recent call last):
  File "/root/0-robot/zerorobot/template/state.py", line 77, in check
    try:
  File "/root/0-robot/zerorobot/template/state.py", line 56, in get
    if category not in self.categories:
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 67, in execute
    self._result = self.func()
  File "/opt/code/github/openvcloud/0-templates/templates/account/account.py", line 109, in uninstall
    self.state.check('actions', 'install', 'ok')
  File "/root/0-robot/zerorobot/template/state.py", line 84, in check
    except StateCategoryNotExistsError:
zerorobot.template.state.StateCheckError: check for state actions:install:ok failed
chrisvdg commented 6 years ago

With a bp installing an account (and vdcuser )successfully before running a bp uninstalling account, worked without a hickup for me and deleted the account on ovc.

@john-kheir, are you sure the install bp of yours ran successfully?

john-kheir commented 6 years ago

@chrisvdg it is working now with me