disable cloud-init's network setup from Heat template

asked 2017-07-06 14:41:04 -0600

doka.ua gravatar image

Hi colleagues,

are there ways to forbid cloud-init to configure networking on guest VM, using Heat template?

At the moment, my OS::Heat::CloudConfig resource looks as below:

type: OS::Heat::CloudConfig
        manage_etc_hosts: true
          config: disabled

and despite this setting, after I boot VM, I find that cloud-init did networking setup (e.g. there is /etc/network/interfaces.d/50-cloud-init.cfg and logs confirm this).

Any ideas on how to prevent cloud init from doing network configuring?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2017-07-06 18:21:17 -0600

I read "User-data cannot change an instance’s network configuration" (http://cloudinit.readthedocs.io/en/la...). Think of it: To get cloud-config data, the instance uses the metadata API, therefore the network. It reads your network clause after networking is configured. Too late.

According to the above doc, you can only disable networking with a kernel parameter or by changing /etc/cloud/cloud.cfg.d on the instance.

Disclaimer: I am not a cloud-init expert, just an interested layman.

edit flag offensive delete link more


Thanks. You're absolutely right and it was absolutely stupid question. Sometimes it happens when brain switches off while hands continue tapping keyboard.

doka.ua gravatar imagedoka.ua ( 2017-07-07 01:29:27 -0600 )edit

A very interesting question because it made me think and also look into the docs, so thanks.

Besides, it made me look smart :)

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-07 02:32:43 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-07-06 14:41:04 -0600

Seen: 1,535 times

Last updated: Jul 06 '17