Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot deploy basic openstack example #263

Open
atsag opened this issue Apr 10, 2023 · 1 comment
Open

Cannot deploy basic openstack example #263

atsag opened this issue Apr 10, 2023 · 1 comment

Comments

@atsag
Copy link

atsag commented Apr 10, 2023

Hello! I have followed the official documentation to install opera in a virtual environment and have successfully run the example deployment.
Further, I have downloaded the admin-openrc.sh file from openstack and have sourced it.
Finally, I have configured the VM details in the input file which is used for the deployments (input.yaml).
However, there is an error in the beginning of the execution of the create.yaml playbook (os_server task) as far as I can understand from the execution logs:

opera deploy -i inputs.yaml service.yaml -c
The clean state deploy option might have unexpected consequences on the already deployed blueprint.
Do you want to continue? (Y/n): y
[Worker_0]   Deploying vm_0
[Worker_0]     Executing create on vm_0
[Worker_0] ------------
[Worker_0] ------------
ERROR! couldn't resolve module/action 'os_server'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/tmp/tmpxp7d6o1e/create.yaml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
    - name: Create VM
      ^ here
[Worker_0] ============
Error processing node vm_0: Failed in vm, interface Standard, operation <opera_tosca_parser.p
arser.tosca.v_1_3.template.operation.Operation object at 0x7ff3f8abf220>.
Traceback (most recent call last):
  File "/home/ubuntu/virtenv/bin/opera", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/cli.py", line 61, in main
    return args.func(args)
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/commands/deploy.py", line 130, in _parser_callback
    deploy_service_template(csar_or_st_path, inputs, storage,
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/commands/deploy.py", line 165
, in deploy_service_template
    topology.deploy(verbose_mode, workdir, num_workers)
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/instance/topology.py", line 65, in deploy
    do_deploy = executor.wait_results()
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/threading/node_executor.py",
line 48, in wait_results
    raise AggregatedOperationError("Failed", errors)

OS is ubuntu 22.04 LTS, python is 3.10.
If possible, please indicate further directions. Thank you!

@atsag
Copy link
Author

atsag commented Apr 10, 2023

It seems that the openstack.cloud collection for ansible should have been installed (e.g using ansible-galaxy collection install openstack.cloud for ansible 2.9+ installations). However, I know encounter another issue:

opera deploy -i inputs.yaml service.yaml -c
The clean state deploy option might have unexpected consequences on the already deployed blueprint.
Do you want to continue? (Y/n): Y
[Worker_0]   Deploying vm_0
[Worker_0]     Executing create on vm_0
[Worker_0] ------------
{
  "custom_stats": {},
  "global_custom_stats": {},
  "stats": {
    "opera": {
      "changed": 0,
      "failures": 1,
      "ignored": 0,
      "ok": 0,
      "rescued": 0,
      "skipped": 0,
      "unreachable": 0
    }
  }
}
[Worker_0] ------------
[Worker_0] ============
Error processing node vm_0: Failed in vm, interface Standard, operation <opera_tosca_parser.parser.tosca.v_1_3.template.operation.Operation object at 0x7fcbcb437130>.
Traceback (most recent call last):
  File "/home/ubuntu/virtenv/bin/opera", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/cli.py", line 61, in main
    return args.func(args)
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/commands/deploy.py", line 130, in _parser_callback
    deploy_service_template(csar_or_st_path, inputs, storage,
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/commands/deploy.py", line 165, in deploy_service_template
    topology.deploy(verbose_mode, workdir, num_workers)
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/instance/topology.py", line 65, in deploy
    do_deploy = executor.wait_results()
  File "/home/ubuntu/virtenv/lib/python3.10/site-packages/opera/threading/node_executor.py",
line 48, in wait_results
    raise AggregatedOperationError("Failed", errors)
opera.error.AggregatedOperationError: Failed

If I am not incorrect, this is related to an operation defined inside xopera-examples/misc/nginx-openstack/library/openstack/vm/types.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant