Ask Your Question
1

HEAT depends_on: wait for network

asked 2016-12-24 03:50:53 -0500

doka.ua gravatar image

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!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-12-26 10:16:50 -0500

doka.ua gravatar image

Hi, it works when din2-e2e depends on router's interface to LAN (in my case it's vRouter_iIf).

Not on router, but on it's interface to LAN.

Solved.

edit flag offensive delete link more

Comments

Yep, that's correct. Note that we consider the fact you have to do this a bug, and it's fixed in 7.0.1 (stable/newton) and will be fixed in Ocata (8.0.0) when it's released: https://bugs.launchpad.net/heat/+bug/...

zaneb gravatar imagezaneb ( 2017-01-04 10:18:39 -0500 )edit

Thanks, Zaneb!

doka.ua gravatar imagedoka.ua ( 2017-01-04 12:38:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-12-24 03:50:53 -0500

Seen: 1,332 times

Last updated: Dec 26 '16