Error when creating Forwarding Graph in OpenStack Tacker

The problem when you learn something by reading old blog posts is that the technology may have already been changed since the date of the post so you're most likely to get into trouble just like me.

I followed some tutorial online about creating a VNF forwarding graph or a service function chain in OpenStack tacker and got this error:

$ tacker vnffg-create --vnffgd-name VNFFG-TEMPLATE MY-VNFFG

BadRequest: Flow Classifier conflicts with another Flow Classifier 564c5506-8fe7-4b1d-b76d-8eb1768463aa

According to the error above, I tried to delete the flow classifier:

$ neutron flow-classifier-list
$ neutron flow-classifier-delete <the classifier ID>

and I got a new error... what?

BadRequest: FlowClassifier a5b3185a-4d2b-41a0-a54d-5cdea5ae2bed does not set logical source port in ovs driver

I'd looked everywhere for clues but jeez... helpless!!! It turned out that the vnffgd TOSCA syntax has been changed to address the multiple flow classifiers (I'm running devstack master branch).

So, so instead of:
...
    Forwarding_path1:
      type: tosca.nodes.nfv.FP.Tacker
      description: creates path (CP12->CP22)
      properties:
        id: 51
        policy:
          type: ACL
          criteria:
            - network_src_port_id: 640dfd77-c92b-45a3-b8fc-22712de480e1
            - destination_port_range: 80-1024
            - ip_proto: 6
...

Use this:

...
    Forwarding_path1:
      type: tosca.nodes.nfv.FP.Tacker
      description: creates path (CP12->CP22)
      properties:
        id: 51
        policy:
          type: ACL
          criteria:
            - network_src_port_id: 640dfd77-c92b-45a3-b8fc-22712de480e1
              destination_port_range: 80-1024
              ip_proto: 6
            - network_src_port_id: 640dfd77-c92b-45a3-b8fc-22712de480eda
              destination_port_range: 80-1024
              ip_proto: 6

...

Basically, "-" is used to indicate a new classifier.

I changed the vnffgd template, deleted the old one in Tacker, created a new vnffgd and I can create forwarding graphs now. Amazing!


References: 

[0] https://github.com/openstack/tacker/blob/master/samples/tosca-templates/vnffgd/tosca-vnffgd-multiple-classifiers-sample.yaml
[1] http://networkop.co.uk/blog/2017/11/23/os-nfv-mano/