Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud-init sometimes fails with 'Unable to find a system nic' error #10

Open
proman3419 opened this issue Oct 8, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@proman3419
Copy link
Member

proman3419 commented Oct 8, 2023

When executing access vm Terraform script an exception has been thrown.
If a vm has more than expected interfaces it most likely has occured.

Image

[UPDATE] occurs on master and worker vms too
[UPDATE] @pgorgolew reported failure rate of 20%

Instance log

[   13.334655] cloud-init[553]: Cloud-init v. 23.2.2-0ubuntu0~22.04.1 running 'init-local' at Sun, 08 Oct 2023 18:23:20 +0000. Up 13.26 seconds.
[   21.413934] cloud-init[553]: 2023-10-08 18:23:28,550 - util.py[WARNING]: failed stage init-local
[   21.424139] cloud-init[553]: failed run of stage init-local
[   21.427146] cloud-init[553]: ------------------------------------------------------------
[   21.431425] cloud-init[553]: Traceback (most recent call last):
[   21.434642] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 766, in status_wrapper
[   21.440394] cloud-init[553]:     ret = functor(name, args)
[   21.443243] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 432, in main_init
[   21.448589] cloud-init[553]:     init.apply_network_config(bring_up=bring_up_interfaces)
[   21.452841] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 886, in apply_network_config
[   21.458539] cloud-init[553]:     netcfg, src = self._find_networking_config()
[   21.462402] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 827, in _find_networking_config
[   21.468325] cloud-init[553]:     if self.datasource and hasattr(self.datasource, "network_config"):
[   21.473112] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceOpenStack.py", line 141, in network_config
[   21.479832] cloud-init[553]:     self._network_config = openstack.convert_net_json(
[   21.483877] cloud-init[553]:   File "/usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py", line 739, in convert_net_json
[   21.490675] cloud-init[553]:     raise ValueError("Unable to find a system nic for %s" % d)
[   21.494358] cloud-init[553]: ValueError: Unable to find a system nic for {'type': 'physical', 'mtu': 8950, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:25:a7:79'}
[   21.503967] cloud-init[553]: ------------------------------------------------------------
[[0;1;31mFAILED[0m] Failed to start [0;1;39mInitial cloud-init job (pre-networking)[0m.
See 'systemctl status cloud-init-local.service' for details.
[[0;32m  OK  [0m] Reached target [0;1;39mPreparation for Network[0m.
         Starting [0;1;39mNetwork Configuration[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Configuration[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.
[   22.245810] cloud-init[580]: Cloud-init v. 23.2.2-0ubuntu0~22.04.1 running 'init' at Sun, 08 Oct 2023 18:23:29 +0000. Up 22.19 seconds.
[   22.284051] cloud-init[580]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[   22.289272] cloud-init[580]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   22.296891] cloud-init[580]: ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
[   22.304311] cloud-init[580]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   22.311767] cloud-init[580]: ci-info: |  ens3  | False |     .     |     .     |   .   | fa:16:3e:cf:26:c3 |
[   22.319385] cloud-init[580]: ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |  host |         .         |
[   22.326789] cloud-init[580]: ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
[   22.334159] cloud-init[580]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[   22.341557] cloud-init[580]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
[   22.347771] cloud-init[580]: ci-info: +-------+-------------+---------+-----------+-------+
[   22.353133] cloud-init[580]: ci-info: | Route | Destination | Gateway | Interface | Flags |
[   22.360109] cloud-init[580]: ci-info: +-------+-------------+---------+-----------+-------+
[   22.366355] cloud-init[580]: ci-info: +-------+-------------+---------+-----------+-------+
[   22.408992] cloud-init[580]: 2023-10-08 18:23:29,545 - util.py[WARNING]: failed stage init
[   22.415594] cloud-init[580]: failed run of stage init
[   22.419473] cloud-init[580]: ------------------------------------------------------------

A workaround has been described here.

@proman3419 proman3419 added the bug Something isn't working label Oct 8, 2023
@proman3419 proman3419 changed the title Terraform sometimes fails with 'Unable to find a system nic' error cloud_init sometimes fails with 'Unable to find a system nic' error Oct 15, 2023
@proman3419 proman3419 self-assigned this Oct 15, 2023
@proman3419 proman3419 changed the title cloud_init sometimes fails with 'Unable to find a system nic' error cloud-init sometimes fails with 'Unable to find a system nic' error Oct 15, 2023
@proman3419 proman3419 removed their assignment Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant