Explicitly detect if mistral workflow missing

Bug #1678329 reported by Sridhar Ramaswamy on 2017-03-31
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Low
bharaththiruveedula

Bug Description

Proactively detect if mistral service is running in the keystone along Tacker. If not, gracefully fail .. easy to find logs and appropriate API response.

-------------------------------

Hi,

I've defined my NSD according to the guide, however, I'm getting the error at the bottom when instantiating the NS, apparently related to the stage where it tries to "open a key file" for the vim.

VNFD files are fine, as VNFs can be instantiated individually without problems. The NSD file refers to the VNFD names specified at the moment of onboarding, not substituting any parameter.

My environment:
- Tacker 0.7.1dev1
- Newton components (python-novaclient 6.0.0 instead of 7.1.0 --> the only requirement not met for current Tacker version)

Thanks,
Gianpietro

#### NSD FILE

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
imports:
  - OPWRT-VNFD
  - APACHEBIND-VNFD
  - SLB-VNFD
topology_template:
  node_templates:
    VNF1:
      type: tosca.nodes.nfv.VNF1
    VNF2:
      type: tosca.nodes.nfv.VNF2
    VNF3:
      type: tosca.nodes.nfv.VNF3

#### VNFD FILE example for OPWRT-VNFD

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: OpenWRT with services

node_types:
  tosca.nodes.nfv.VNF1:
    capabilities:
      forwarder1:
        type: tosca.capabilities.nfv.Forwarder

topology_template:
  substitution_mappings:
    node_type: tosca.nodes.nfv.VNF1
    capabilities:
      forwarder1: [CP1, forwarder] # is this relevant?
  node_templates:
    VDU1:
    .... (nothing special after this)

---------- ERROR -----------

2017-02-28 16:44:52.646 1704 DEBUG tacker.api.v1.base [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] Request body: {u'ns': {u'attributes': {}, u'vim_id': u'd2845470-785e-40af-bb6c-9897d7f316ec', u'nsd_id': u'6d59f12c-7bd7-41e4-8330-cdb2d96bcc5c', u'description': u'', u'name': u'NS NFV Test 01 '}} prepare_request_body /usr/local/lib/python2.7/dist-packages/tacker/api/v1/base.py:510
2017-02-28 16:44:52.649 1704 DEBUG tacker.common.log [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] tacker.nfvo.nfvo_plugin.NfvoPlugin method create_ns called with arguments (<tacker.context.Context object at 0x7f810467dc10>,) {'ns': {u'ns': {u'description': u'', 'tenant_id': u'9a48bc2577544d2c9052d89875a17088', u'vim_id': u'd2845470-785e-40af-bb6c-9897d7f316ec', u'name': u'NS NFV Test 01 ', 'vnf_ids': '', u'attributes': {}, u'nsd_id': u'6d59f12c-7bd7-41e4-8330-cdb2d96bcc5c'}}} wrapper /usr/local/lib/python2.7/dist-packages/tacker/common/log.py:34
2017-02-28 16:44:52.729 1704 DEBUG tacker.vnfm.vim_client [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] VIM info found for vim id d2845470-785e-40af-bb6c-9897d7f316ec get_vim /usr/local/lib/python2.7/dist-packages/tacker/vnfm/vim_client.py:53
2017-02-28 16:44:52.730 1704 DEBUG tacker.vnfm.vim_client [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] VIM id is d2845470-785e-40af-bb6c-9897d7f316ec _build_vim_auth /usr/local/lib/python2.7/dist-packages/tacker/vnfm/vim_client.py:69
2017-02-28 16:44:52.732 1704 DEBUG tacker.vnfm.vim_client [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] Attempting to open key file for vim id d2845470-785e-40af-bb6c-9897d7f316ec _find_vim_key /usr/local/lib/python2.7/dist-packages/tacker/vnfm/vim_client.py:93
2017-02-28 16:44:52.740 1704 INFO tacker.db.db_base [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] No result found for NS NFV Test 01 in <class 'tacker.db.nfvo.ns_db.NS'> table
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource [req-989560de-223d-4ae9-b93b-f5550beb4c5a - - - - -] create failed
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource Traceback (most recent call last):
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/api/v1/resource.py", line 83, in resource
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource result = method(request=request, **args)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/api/v1/base.py", line 395, in create
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource obj = obj_creator(request.context, **kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/common/log.py", line 35, in wrapper
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource return method(*args, **kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/nfvo/nfvo_plugin.py", line 582, in create_ns
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource kwargs=kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/common/driver_manager.py", line 70, in invoke
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource return getattr(driver, method_name)(**kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/nfvo/drivers/vim/openstack_driver.py", line 467, in prepare_and_create_workflow
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource auth_token).get_client()
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/tacker/nfvo/drivers/vim/openstack_driver.py", line 523, in __init__
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource service_type='workflowv2', region_name=None)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 856, in get_endpoint
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource return auth.get_endpoint(self, **kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 216, in get_endpoint
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource service_name=service_name)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource return wrapped(*args, **kwargs)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/access/service_catalog.py", line 228, in url_for
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource raise exceptions.EndpointNotFound(msg)
2017-02-28 16:44:53.305 1704 ERROR tacker.api.v1.resource EndpointNotFound: public endpoint for workflowv2 service not found

Changed in tacker:
importance: Undecided → Low
Changed in tacker:
assignee: nobody → dharmendra (dharmendra-kushwaha)
Changed in tacker:
milestone: none → pike-2
status: New → Confirmed
Changed in tacker:
milestone: pike-2 → pike-3
Changed in tacker:
milestone: pike-3 → none
Changed in tacker:
assignee: dharmendra (dharmendra-kushwaha) → bharaththiruveedula (bharath-ves)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions