xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

Deployment fails with KeyError 'table_name' (Opera v0.6.5) #196

Closed duelle closed 3 years ago

duelle commented 3 years ago

When trying to deploy a ToDoListAPI example [1] with Opera v0.6.5, this results in the following error message:

opera deploy todolist_with_outputs.csar -c
Traceback (most recent call last):
  File "/usr/bin/opera", line 8, in <module>
    sys.exit(main())
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/cli.py", line 47, in main
    return args.func(args)
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/commands/deploy.py", line 71, in _parser_callback
    status = info(myuser, storage)["status"]
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/commands/info.py", line 108, in info
    topology = template.instantiate(storage)
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/template/topology.py", line 46, in instantiate
    return Instance(storage, itertools.chain.from_iterable(node.instantiate() for node in self.nodes.values()))
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/instance/topology.py", line 14, in __init__
    node.read()
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/instance/base.py", line 41, in read
    self.load(self.topology.read(self.tosca_id))
  File "/home/myuser/.local/lib/python3.9/site-packages/opera/instance/base.py", line 50, in load
    self.attributes[k].load(v)
KeyError: 'table_name'

When looking at the TOSCA-model I couldn't find any obvious issues with it.

[1] todolist_with_outputs.zip

anzoman commented 3 years ago

Hi @duelle does this error happen immediately after you initiate the deployment or somewhere at the middle? Currently I'm unable to reproduce this error with the CSAR above. It seems like that some attribute is unset or cannot be loaded from TOSCA.

duelle commented 3 years ago

@anzoman It occured immediately after triggering the deployment. I tried it again and it seems not to occur again. Maybe there was a side effect of a previous deployment, despite using the -c option.. Right now, the same files work for me as well..

Thanks for looking into this.