Tacker is not backwards compatible with the vnffgd syntax

Bug #1752304 reported by Manuel Buil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Won't Fix
Undecided
Unassigned

Bug Description

When trying with this template: https://github.com/opnfv/sfc/blob/master/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml

I get the following error when creating the vnffg:

2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource [req-e900a71c-1670-4eee-8459-92fbc3567596 e608e80f2643456fadeb10c4da6bcf63 393c3346fda841698d2804d70884e12a - - -] create failed: No details.: BadRequest: IP protocol must be TCP or UDP, if port range is given.
Neutron server returns request_ids: ['req-214eb73a-f3e2-4573-bc1b-9a8feb3aa5f0']
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource Traceback (most recent call last):
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/api/v1/resource.py", line 77, in resource
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource result = method(request=request, **args)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/api/v1/base.py", line 393, in create
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource obj = obj_creator(request.context, **kwargs)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/common/log.py", line 35, in wrapper
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource return method(*args, **kwargs)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/nfvo/nfvo_plugin.py", line 357, in create_vnffg
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource self.delete_vnffg(context, vnffg_id=vnffg_dict['id'])
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource self.force_reraise()
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource six.reraise(self.type_, self.value, self.tb)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/nfvo/nfvo_plugin.py", line 347, in create_vnffg
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource auth_attr=vim_obj['auth_cred']))
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/common/driver_manager.py", line 70, in invoke
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource return getattr(driver, method_name)(**kwargs)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/nfvo/drivers/vim/openstack_driver.py", line 385, in create_flow_classifier
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource sfc_classifier_params)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/tacker/nfvo/drivers/vim/openstack_driver.py", line 740, in flow_classifier_create
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource fc = self.client.create_flow_classifier({'flow_classifier': fc_dict})
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 2316, in _fx
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource return self.create_ext(path, body)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 722, in create_ext
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource return self.post(path, body=body)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 357, in post
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource headers=headers, params=params)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 292, in do_request
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource self._handle_fault_response(status_code, replybody, resp)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 268, in _handle_fault_response
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource exception_handler_v20(status_code, error_body)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource File "/openstack/venvs/tacker-17.0.0/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 92, in exception_handler_v20
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource request_ids=request_ids)
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource BadRequest: IP protocol must be TCP or UDP, if port range is given.
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource Neutron server returns request_ids: ['req-214eb73a-f3e2-4573-bc1b-9a8feb3aa5f0']
2018-02-27 17:22:43.352 7995 ERROR tacker.api.v1.resource

The reason is that it tries to create three classifiers. Note that in queens there is support for multiple classifiers and this vnffgd is accepted: https://github.com/opnfv/sfc/blob/master/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml-queens However, it should still be compatible with the old way of defining vnffgd for a few releases

Revision history for this message
Trinh Nguyen (dangtrinhnt) wrote :

Hi Manuel,

The criteria syntax has been changed in Tacker.

So instead of:
          criteria:
            - network_src_port_id: {get_input: net_src_port_id}
            - destination_port_range: 80-80
            - ip_proto: 6

You should use:
          criteria:
            - network_src_port_id: {get_input: net_src_port_id}
              destination_port_range: 80-80
              ip_proto: 6

If you want to add backward compatibility to the toscar parser, please submit a patch.

Regards,

Revision history for this message
Manuel Buil (mbuil) wrote :

Yes, exactly what I am mentioning in my initial description (have a look at both vnffgd). I think that suddenly changing an API without granting some "deprecation period" is against the openstack policies, so that's why I consider this as a bug. Unfortunately, I currently don't have the time to do this but I'd say it is good that it is kept in the backlog of bugs

Revision history for this message
Trinh Nguyen (dangtrinhnt) wrote :

Hi Manuel. I will help you with this and raise this question with the Tacker team. Will keep you inform.

Yasufumi Ogawa (yasufum)
Changed in tacker:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.