[Openstack-dev][Tacker] Not able to run user_data commands on my instance

asked 2017-05-22 07:05:00 -0500

vishnu430 gravatar image

Hi,

I'm have installed openstack with tacker by devstack.

I'm able to run OpenWRT vnf and able to configure the firewall service with openwrt management driver.

And also able to run shell commands in cirros image which is also using openwrt management driver.

Now I have created one ubuntu image, and able to launch through tacker.

In this instance i want run some shell commands through tacker's user_data feature.

But no commands are executing.

Is it possible to run commands on custom images unlike cirros/openwrt?

If yes kindly share the procedure to create proper ubuntu image.

Below is tosca configd file

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: Demo with user-data

metadata:
  template_name: sample-vnfd-userdata

topology_template:
  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      capabilities:
        nfv_compute:
          properties:
            num_cpus: 1
            mem_size: 1024 MB
            disk_size: 1 GB
      properties:
        image: ubuntu-image
        config: |
          param0: key1
          param1: key2
        mgmt_driver: openwrt
        config_drive: true
        user_data_format: RAW
        user_data: |
          #!/bin/sh
          echo "my hostname is `hostname`" > /tmp/hostname
          date > /tmp/date
          ifconfig > /tmp/ifconfig
          df -h > /tmp/diskinfo
    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1

     VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: net_mgmt
        vendor: ACME
edit retag flag offensive close merge delete

Comments

First thing is if using openrwt as management driver many features may not be supported. Try setting to noop in case openrwt is not used. User-data as you have it should work, is correct defined

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-08-22 17:48:31 -0500 )edit