简体   繁体   English

Openstack Cloud-init 没有为实例分配正确的网络接口

[英]Openstack Cloud-init do not assign proper network interface to instance

I have a Openstack installation where lately some of the instances are not able to match de virtual interfaces attached to them and seems that is trying to link with old assigned mac to the same ip but deleted at some point from network maintenance and regenerated by the dhcp (I see that 'Cannot rename mac' in tables).我有一个 Openstack 安装,其中最近一些实例无法匹配附加到它们的虚拟接口,并且似乎正在尝试将旧分配的 mac 链接到相同的 ip 但在某些时候从网络维护中删除并由 dhcp 重新生成(我在表格中看到“无法重命名 mac”)。

I try to understand when and what metadata service cloud-init asks for the ip-mac to configure it and if there is some kind of cache that it can remove to refresh the instance.我试图了解什么时候以及什么元数据服务 cloud-init 要求 ip-mac 对其进行配置,以及是否有某种缓存可以删除以刷新实例。

Any idea?任何想法? There is a way I can recover my selfprovided specific IP and having Neutron clean?有一种方法可以恢复我自己提供的特定 IP 并清洁中子?

[   17.414605] cloud-init[627]: Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init-local' at Tue, 11 Jan 2022 17:11:50 +0000. Up 17.05 seconds.
[   17.419674] cloud-init[627]: 2022-01-11 17:11:50,714 - stages.py[WARNING]: Failed to rename devices: [nic not present] Cannot rename mac=fa:16:3e:5f:c5:a3 to ens3, not available.
[[0;32m  OK  [0m] Finished [0;1;39mInitial cloud-init job (pre-networking)[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork (Pre)[0m.
         Starting [0;1;39mNetwork Service[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Service[0m.
         Starting [0;1;39mWait for Network to be Configured[0m...
         Starting [0;1;39mNetwork Name Resolution[0m...
[[0;32m  OK  [0m] Finished [0;1;39mWait for Network to be Configured[0m.
         Starting [0;1;39mInitial cloud-ini��� (metadata service crawler)[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Name Resolution[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mHost and Network Name Lookups[0m.
[   18.702674] cloud-init[638]: Cloud-init v. 21.4-0ubuntu1~20.04.1 running 'init' at Tue, 11 Jan 2022 17:11:51 +0000. Up 18.50 seconds.
[   18.706923] cloud-init[638]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[   18.710320] cloud-init[638]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   18.713541] cloud-init[638]: ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
[   18.716788] cloud-init[638]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   18.719333] cloud-init[638]: ci-info: |  ens3  | False |     .     |     .     |   .   | fa:16:3e:db:2c:9b |
[   18.722036] cloud-init[638]: ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |  host |         .         |
[   18.725660] cloud-init[638]: ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
[   18.728025] cloud-init[638]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   18.730341] cloud-init[638]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[   18.732360] cloud-init[638]: ci-info: +-------+-------------+---------+-----------+-------+
[   18.734362] cloud-init[638]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[   18.737230] cloud-init[638]: ci-info: +-------+-------------+---------+-----------+-------+
[   18.739237] cloud-init[638]: ci-info: +-------+-------------+---------+-----------+-------+
[   18.742121] cloud-init[638]: 2022-01-11 17:11:52,003 - stages.py[WARNING]: Failed to rename devices: [nic not present] Cannot rename mac=fa:16:3e:5f:c5:a3 to ens3, not available.
[[0;32m  OK  [0m] Finished [0;1;39mInitial cloud-ini���ob (metadata service crawler)[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mCloud-config availability[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mNetwork is Online[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mSystem Initialization[0m.

I answer myself in case it helps someone in the future.我回答自己,以防将来对某人有所帮助。 The metadata service doesn't seem to work well to overwrite the config from cloud-init although in the cloud-init logs it was seen that it recovered http://controller:8775/openstack/2016-10-06/network_data.json... Anyway, to get past this problem I just mounted the disk and directly edited /mnt/atos-docker/etc/netplan/50-cloud-init.yaml with the expected MAC and then was binded properly.元数据服务似乎不能很好地覆盖来自 cloud-init 的配置,尽管在 cloud-init 日志中可以看到它恢复了 http://controller:8775/openstack/2016-10-06/network_data.json ...无论如何,为了解决这个问题,我只是安装了磁盘并使用预期的 MAC 直接编辑 /mnt/atos-docker/etc/netplan/50-cloud-init.yaml 然后正确绑定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM