Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

HEAT depends_on: wait for network

Hello colleagues,

I have a pretty clear problem which seems to have an easy solution which, though, doesn't work. There is LAN (i2e-net/-subnet), vRouter connects LAN with external network (e-net) and server in the LAN (din2) which I need to assign external IP (floating IP).

The problem is: when I try to create stack with all components described in the template (below), creation fails with the error "Resource CREATE failed: External network <e-net> is not reachable from subnet <i2e-subnet>. Therefore, cannot associate Port with a Floating IP." However, if I comment out assignment of floating IP in the template, create stack (successfully), then uncomment commented earlier and update stack, everything is ok - servers get's external floating IP successfully.

The problem is clear - HEAT tries to assign floating IP before vRouter provides connectivity between LAN and external network. I tried to put "depends_on" in various resources of template (you will find these places below) but no success.

Please suggest where to use depends_on in the template below or how to solve this issue in other way. Thank you.

The sceleton of HEAT template I use is the following:

############## NETWORK Configuration #######

  i2e-net:
    type: OS::Neutron::Net
    properties: [ ... ]

  i2e-subnet:
    type: OS::Neutron::Subnet
    properties: [ ... depends on i2e-net ]

  i2e-gw:
    type: OS::Neutron::Port
    properties: [ ... ]

  vRouter:
    type: OS::Neutron::Router
    properties: [ ... connected to external net e-net ]

  vRouter_iIF:
    type: OS::Neutron::RouterInterface
    properties: [ ... interface to internal i2e-subnet with i2e-gw address ]

############## SERVER Configuration #######

  srv_life:
    type: OS::Heat::SoftwareComponent
    properties: [ ... configs / actions ]

  din2_depl:
    type: OS::Heat::SoftwareDeployment
#    depends_on: vRouter
    properties:
      actions: [CREATE,UPDATE,DELETE,SUSPEND,RESUME]
      config: { get_resource: srv_life }
      server: { get_resource: din2 }
      signal_transport: NO_SIGNAL

  din2:
    type: OS::Nova::Server
#    depends_on: vRouter
    properties:
      networks:
        - port: { get_resource: din2-i2e }
    [ ... ]

#### SRV ports / addresses ###

# interface to internal net
  din2-i2e:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: i2e-net }

# external IP
  din2-e2e:
    type: OS::Neutron::FloatingIP
#    depends_on: vRouter
    properties:
      floating_network_id: e-net
      port_id: { get_resource: din2-i2e }

Thanks again!