New Question
0

NetworkConfig problem

asked 2021-01-02 17:01:27 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello everyone, I use it cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin Configure windows network. When an IP is not used, cloudinitbase can be configured correctly. However, when I set an IP that has been used by this virtual machine, it will not configure this IP. How can I solve this problem.

e.g: When the virtual machine uses 192.168.31.2 IP for the first time, cloudinitbase can be configured correctly. If I use cloudinitbase to modify the virtual machine IP to 192.168.31.3, the virtual machine IP will be changed to 192.168.31.3. Now when I use cloudinitbase to reset the IP to 192.168.31.2, cloudinitbase will not set the virtual machine IP to 192.168.31.2, but 192.168.31.3

Hello everyone, I use it ''cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin'' Configure windows network. When an IP is not used, cloudinitbase can be configured correctly. However, when I set an IP that has been used by this virtual machine, it will not configure this IP. How can I solve this problem.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2021-01-05 19:40:18 +0200

avladu gravatar image

Hello,

Plugins like cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin run once per instance, meaning that the network is only set once at the first boot. Any subsequent cloudbase-init runs on the same instance will not re-set the instance network.

When it runs, the cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin gets the network configuration from the metadata service, depending on the enabled metadata services in cloudbase-init config file. If the metadata is not available, the plugin cannot set any network configuration.

If possible, can you describe your setup in terms of what cloud type you are using (OpenStack, AWS or Azure) and share the cloudbase-init logs?

Thank you,
Adrian Vladu

edit flag offensive delete link more

Comments

Hello,I use openstack and the log has been uploaded to Google https://drive.google.com/file/d/1UmviYUS5M4OO_boznr4Ad8IYxfOF7wjf/view?usp=sharing

echoes123 gravatar imageechoes123 ( 2021-01-05 19:49:11 +0200 )edit

As this is a wiki post, please share the logs publicly. I suggest pastebin or http://paste.openstack.org/. Thank you.

avladu gravatar imageavladu ( 2021-01-05 20:12:37 +0200 )edit

From the logs that you have sent, it seems cloudbase-init is working as expected: it sets the network configuration the first time is configured to do so (if the networking plugin gets executed, its state is saved in the registry and it won't be executed at the next cloudbase-init run).

avladu gravatar imageavladu ( 2021-01-08 13:29:30 +0200 )edit

If I want to run the network plug-in every time cloudinitbase runs, how should I set it?

echoes123 gravatar imageechoes123 ( 2021-01-09 23:57:54 +0200 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-01-02 17:01:27 +0200

Seen: 666 times

Last updated: Jan 05 '21