[Openstack] Floating IP association using Heat

D. Davide Lamanna davide.lamanna at binarioetico.it
Mon Jun 12 10:53:09 UTC 2017


Hi all,

I'm using "association" resource in a heat template, like that:

association:
   type: OS::Nova::FloatingIPAssociation
   properties:
     floating_ip: { get_param: foo_floating_ip }
     server_id: { get_resource: bar_instance }

With:

 bar_instance:
    type: OS::Nova::Server
    properties:
      key_name: { get_param: key_name }
      image: { get_param: image_id }
      flavor: { get_param: instance_type }
      networks:
        - port: { get_resource: bar_instance_port }

 foo_floating_ip:
    type: string
    label: Foo Floating IP
    description: Floating IP to be associated to the Foo Instance
    default: fd06c9c0-dcf7-4881-9bae-aafc1b8a8cf7

Where:

fd06c9c0-dcf7-4881-9bae-aafc1b8a8cf7

is the ID of the Floating IP I want to associate to my instance.



The stack gets created fine. The dashboard says that the association of
the floating IP is exactly what I planned, i.e. the instance gets the
Floating IP I wanted. But ssh connection gets refused!

Then, if I deassociate by hand the floating IP associated by Heat and
reassociate by hand the same Floating IP, everything works fine. So it
seems like Heat associates the Floating IP, but it is not actually
possible to connect to it. Whereas it works if you do it by hand afterwards.


Any clue?


Cheers,
Dave




More information about the Openstack mailing list