heat - assigning existing port to a load balancer fails

asked 2020-02-26 21:42:36 -0600

MichaelKostan gravatar image

Hi There, I'm starting to believe that its not possible to assign an pre-created network port to a new Octavia::LoadBalancer in a heat template.

Doing exactly that using the CLI works fine…

  openstack port create my_lb_port --network management
  openstack loadbalancer create --name my_lb --vip-port-id my_lb_port

However, I have not found a way to do the same in a heat template like this one…

    type: OS::Octavia::LoadBalancer
      description: myDescription
      name: myName
      vip_subnet: management
      # using an existing IP address (down, not attached) produces the error "The IP address is in use"
      # using the port name or ID produces the error "Error validating value 'my_lb_port': Invalid IP address"
      #vip_address: my_lb_port
      #vip_address: 613b20b6-8bbb-475a-8bc2-993b4b8d558a
      # and using fictional properties (desparate I am) did produce errors like "Unknown Property vip_port_id"
      #vip_port_id: my_lb_port

Hmmh, I would have thought that whatever is possible in the CLI should work in heat too.

Before I give up - Did you manage to solve/address a similar challenge, or if this is a known feature?

Cheers, Michael

Background: We are trying to separate the port and loadbalancer creation as we have a static DNS environment which requires manual updates.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2020-02-27 07:52:35 -0600

zaneb gravatar image

It appears that Octavia allows three different ways to specify the port:

  1. vip_port_id (+ vip_subnet_id or vip_address if ambiguous)
  2. vip_network_id
  3. vip_subnet_id

But the Heat resource only supports the last one, so Octavia always tries to create a port.

Not implementing vip_network_id may have been intentional (stuff automatically selecting a subnet behind the scenes is a pain for Heat because it adds invisible dependencies between resources). But it's likely that vip_port_id was either overlooked or added after the Heat resource was implemented. Heat would have to add support for it in order to do what you want.

edit flag offensive delete link more



Thank you very much. Sigh - I wish you would have shared different news :) Anyways, this confirms my observations and I will get on with what we have and let the HEAT loadbalancer create the port. Begs the question - how to rename a Octavia port. I shall explore... Again thanks. Cheers, Michael

MichaelKostan gravatar imageMichaelKostan ( 2020-02-27 12:08:32 -0600 )edit

On the bright side... patches welcome ;)

zaneb gravatar imagezaneb ( 2020-02-28 20:28:23 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2020-02-26 21:40:10 -0600

Seen: 63 times

Last updated: Feb 27