Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-26654

Heat wrongly passing "no_fixed_ips" to Neutron hen creating a port via "OS::Nova::Server" resource type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Normal Normal
    • None
    • None
    • openstack-heat
    • None
    • EDPM Sprint 20
    • 1
    • Moderate

      When creating an instance via the OS::Nova::Server resource type in a Heat template, specifying a network and a subnet to get a port created on the instance, it fails on Neutron with Unrecognized attribute(s) 'no_fixed_ips'.

      Again, the reason why this fails is because for ports without fixed IPs, Neutron expects fixed_ips = [] as it does not understand no_fixed_ips, so Heat should not be passing that. Commit [1] where the no_fixed_ips feature was introduced in Heat, added logic to avoid passing no_fixed_ips to Neutron, but that logic was never added for the case where the port is requested to be created via OS::Nova::Server.

      Here's a template reproducing the issue (Heat versions affected: >= Wallaby):

       

      {{heat_template_version: wallaby

      resources:

      server_test:
      type: OS::Nova::Server
      properties:
      name: server_test
      config_drive: true
      flavor: m1.small
      image: "focal-raw"
      networks:

      • network: 0924ec50-c1b7-4ea9-bdd2-334772fd3398
        port_extra_properties:
        port_security_enabled: false
        subnet: cb49c91d-62d0-4677-b121-0dcf0476ecf0}}

      [1] https://opendev.org/openstack/heat/commit/9292264aa74d6d9e6e8f58045c7e3faf755ea725

              rh-ee-dhrusing Dhruvendra Singh
              rh-ee-dhrusing Dhruvendra Singh
              rhos-dfg-df
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: