ValueError: resources.apache_server: nics are required after microversion 2.36 [closed]

asked 2019-12-10 06:02:38 -0500

sanjay khuntia gravatar image

updated 2019-12-10 23:06:11 -0500

Hi all, I am trying to create a test stack in Openstac Stein release using Heat orchestration in dashboard. I mentioned the template version as "2014-10-16" in my yaml hot file. I am just trying to create one ubuntu server with apache service running on it. however when I try to create the stack from horizon, the stack creation failed giving event error as -

mystack2  250e4834-811a-4158-8929-14b4b0505e25  7 minutes  Create Failed  Resource CREATE failed: ValueError: resources.apache_server: nics are required after microversion 2.36  

apache_server mystack2-apache_server-4h33dsvkdtmf  7 minutes  Create Failed  ValueError: resources.apache_server: nics are required after microversion 2.36

what could be the reason it failed to create the stack? anything I am missing to mention in the yaml file..

# Stein setup template
heat_template_version: 2014-10-16

description: 'Install Apache on a single Ubuntu vm using the  OS::Nova::Server resource type. '

parameters:

  key_name:
    type: string
    label: Key Name
    description: Name of an existing KeyPair to enable SSH access to the instances. 

  image_id:
    type: string
    label: Image ID
    description: Image to be used for compute instance
    default: Ubuntu16
    constraints:
      - allowed_values: [ Ubuntu16 ]
        description: Value must be one of Ubuntu 16.04, Ubuntu 18.04

  instance_type:
    type: string
    label: Instance Type
    description: Type of instance (flavor) to be used. 
    default: medium
    constraints:
      - allowed_values: [ medium, large, x-large ]
        description: Value must be one of m1.small, m1.medium, m1.large or m1.xlarge.

  availability_zone:
    type: string
    label: Availability Zone
    description: Physical location of the server. 
    default: nova
    constraints:
      - allowed_values: [ nova ]
        description: Value must be one of nova.

  db_port:
    type: number
    label: Database port
    description: Database port. 
    default: 5432



resources:

    allow_ssh:
        type: OS::Neutron::SecurityGroup
        properties:
            description: allow incoming SSH and ICMP traffic from anywhere.
            name: allow incoming traffic, tcp port 22 and icmp
            rules:
              - protocol: icmp
              - protocol: tcp
                port_range_min: 22
                port_range_max: 22
              - protocol: tcp
                port_range_min: 80
                port_range_max: 80
              - protocol: tcp
                port_range_min: 443
                port_range_max: 443

    apache_server:
        type: OS::Nova::Server
        properties:
            key_name: { get_param: key_name }
            image: 
              Fn::Select:
                - { get_param: image_id }
                - 
                 'Ubuntu16': 8f303c7f-bb59-4743-b490-5e11996a0d1c
            flavor: { get_param: instance_type }
            availability_zone: {get_param: availability_zone}
            security_groups:
                - { get_resource: allow_ssh }
            user_data_format: RAW
            user_data:
                str_replace:
                  template: |
                    #!/bin/bash
                    echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
                    echo "Begin: run user_data bash script. "
                    echo "Database port: DB_PORT"
                    apt-get update
                    apt-get -y upgrade
                    apt-get -y install apache2
                    echo "127.0.0.1  `hostname`" >> /etc/hosts
                    /etc/init.d/apache2 restart
                    echo "End: run user_data bash script. "
                    echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
                  params:
                    DB_PORT: { get_param: db_port }

outputs:

    instance_ip:
        description: The IP address of the deployed instance
        value: { get_attr: [apache_server, first_address] }

    website_url:
        description: URL for Apache server
        value: 
            list_join: ['', ['http://', get_attr: [apache_server, first_address]]]

please let me know.

thank you for the pointers and comments.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sanjay khuntia
close date 2019-12-15 09:53:00.811791

Comments

Hard to say without seeing the template. I suppose you use properties removed by microversion 2.36.

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-10 17:22:06 -0500 )edit
1

Since the error complains about NICs, I would try adding a networksproperty to the server definition (example see https://docs.openstack.org/heat/lates...).

Bernd Bausch gravatar imageBernd Bausch ( 2019-12-10 23:34:14 -0500 )edit

Thanks Bernd for you reply. Updated my query with the template I am trying with.

sanjay khuntia gravatar imagesanjay khuntia ( 2019-12-10 23:43:12 -0500 )edit