Scaling with static ip should be handled properly

Bug #1626309 reported by Santosh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
In Progress
Undecided
Govindaiah M

Bug Description

1. Create a vnfd with following template file.

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: VNF TOSCA template with input parameters

metadata:
  template_name: sample-tosca-vnfd

topology_template:
  inputs:
    image_name:
      type: string
      description: Image Name

    flavor:
      type: string
      description: Flavor Information

    zone:
      type: string
      description: Zone Information

    network:
      type: string
      description: mgmt network

    management:
      type: string
      description: management network

    ip_ad:
      type: string
      description: Ip address

    pkt_in_network:
      type: string
      description: In network

    pkt_out_network:
      type: string
      description: Out network

    vendor:
      type: string
      description: Vendor information

    incr:
      type: string
      description: increment number

    cool_down:
      type: string
      description: cool down seconds

    min_inst:
      type: string
      description: minimum instances

    max_inst:
      type: string
      description: maximum instances

  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: { get_input: image_name}
        flavor: {get_input: flavor}
        availability_zone: { get_input: zone }
        mgmt_driver: noop
        config: |
          param0: key1
          param1: key2

    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: { get_input: management }
        anti_spoofing_protection: true
        ip_address: { get_input: ip_ad}
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1

    CP2:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL2
        - virtualBinding:
            node: VDU1

    CP3:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL3
        - virtualBinding:
            node: VDU1

    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: { get_input: network }
        vendor: {get_input: vendor}

    VL2:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: { get_input: pkt_in_network }
        vendor: {get_input: vendor}

    VL3:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: { get_input: pkt_out_network }
        vendor: {get_input: vendor}

  policies:
    - SP2:
        type: tosca.policy.tacker.Scaling
        properties:
          increment: 1
          cooldown: 60
          min_instances: 1
          max_instances: 3
          default_instances: 1
          targets: [VDU1]

2. Create a vnfd with above template and below param file.
{
 image_name: 'cirros-0.3.4-x86_64-uec',
 flavor: 'm1.tiny',
 zone: 'nova',
 network: 'net_mgmt',
 management: 'true',
 pkt_in_network: 'net0',
 pkt_out_network: 'net1',
 vendor: 'tacker',
 incr: '1',
 cool_down: '60',
 min_inst: '1',
 max_inst: '3',
 ip_ad: '192.168.120.225'

3. When we scale out, scaling should not be allowed or handled properly and VDU1 should not get none ip.

Logs:
vyatta@os-dev-06:/opt/stack/tacker$
vyatta@os-dev-06:/opt/stack/tacker$ tacker vnf-list
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
| id | name | description | mgmt_url | status | vim_id | placement_attr | error_reason |
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
| 4e41310f-2f39-4875 | vnf2 | VNF TOSCA template | {"VDU1": | ACTIVE | 1acba1d4-69c7-406b-88 | {u'vim_name': u'VIM0'} | |
| -a54e-1f49a099f545 | | with input parameters | ["192.168.120.225"]} | | 09-0f60f197bbc5 | | |
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
vyatta@os-dev-06:/opt/stack/tacker$
vyatta@os-dev-06:/opt/stack/tacker$ tacker vnf-scale --vnf-id 4e41310f-2f39-4875-a54e-1f49a099f545 --scaling-policy-name SP2 --scaling-type out

vyatta@os-dev-06:/opt/stack/tacker$ tacker vnf-list
+--------------------+------+--------------------+--------------------+-------------------+--------------------+------------------------+--------------+
| id | name | description | mgmt_url | status | vim_id | placement_attr | error_reason |
+--------------------+------+--------------------+--------------------+-------------------+--------------------+------------------------+--------------+
| 4e41310f-2f39-4875 | vnf2 | VNF TOSCA template | {"VDU1": ["192.168 | PENDING_SCALE_OUT | 1acba1d4-69c7-406b | {u'vim_name': u'VIM0'} | |
| -a54e-1f49a099f545 | | with input | .120.225"]} | | -8809-0f60f197bbc5 | | |
| | | parameters | | | | | |
+--------------------+------+--------------------+--------------------+-------------------+--------------------+------------------------+--------------+
vyatta@os-dev-06:/opt/stack/tacker$ tacker vnf-list
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
| id | name | description | mgmt_url | status | vim_id | placement_attr | error_reason |
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
| 4e41310f-2f39-4875 | vnf2 | VNF TOSCA template | {"VDU1": [null, | ACTIVE | 1acba1d4-69c7-406b-88 | {u'vim_name': u'VIM0'} | |
| -a54e-1f49a099f545 | | with input parameters | "192.168.120.225"]} | | 09-0f60f197bbc5 | | |
+-----------------------+------+-----------------------+-----------------------+--------+-----------------------+------------------------+--------------+
vyatta@os-dev-06:/opt/stack/tacker$
vyatta@os-dev-06:/opt/stack/tacker$

}

Changed in tacker:
assignee: nobody → Govindaiah M (govindaiah-m)
status: New → In Progress
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.