kubernetes-sigs/image-builder

[outscale] cloud-init missmatch version, network interfaces are down

DvdChe opened this issue · 2 comments

Environment

  • Make target: make osc-ubuntu-2204
  • **Run using container image? (Y/N):**N

In images/capi/packer/outscale/ubuntu-2204.json, the source image is specified as follow :

"image_name": "Ubuntu-22.04-2023.02.21-0"

This image seems to not exists anymore so I specified a more recent one :

"image_name": "Ubuntu-22.04-2023.12.04-0"

Which is an official made by outscale ( ami-a3ca408c )

This is the only change I made.

What steps did you take and what happened?

make osc-ubuntu-2204 is successfull, however, VM remains unreachable on network when it booted from this image.

What did you expect to happen?

VM should be reachable from network

Relevant log output

When we boot-up from fresh omi, we can see that network-configuration, fails and cloud-init leave network interface (eth0) down:

VM log Output when we boot-up a fresh outscale capi image
[...]
[K[[0;1;31mFAILED[0m] Failed to start [0;1;39mWait for Network to be Configured[0m.
[KSee 'systemctl status systemd-networkd-wait-online.service' for details.
         Starting [0;1;39mInitial cloud-ini� (metadata service crawler)[0m...
         Stopping [0;1;39mNetwork Configuration[0m...
[[0;32m  OK  [0m] Stopped [0;1;39mNetwork Configuration[0m.
         Starting [0;1;39mNetwork Configuration[0m...
[[0;32m  OK  [0m] Started [0;1;39mNetwork Configuration[0m.
[[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.
[[0;32m  OK  [0m] Started [0;1;39mDaily Cleanup of Temporary Directories[0m.
[  349.228328] cloud-init[586]: [2024-02-19 13:38:24] Cloud-init v. 22.2-144-g3e35fb84-1~bddeb running 'init' at Mon, 19 Feb 2024 13:38:24 +0000. Up 221.04 seconds.
[[0;32m  OK  [0m] Started [0;1;39mDownload data for �ailed at package install time[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mPath Units[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mcloud-init hotplug hook socket[0m.
[  349.233609] cloud-init[586]: [2024-02-19 13:38:24] ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[[0;32m  OK  [0m] Listening on [0;1;39mD-Bus System Message Bus Socket[0m.
[[0;32m  OK  [0m] Listening on [0;1;39mOpen-iSCSI iscsid Socket[0m.
[  349.237086] cloud-init[586]: [2024-02-19 13:38:24] ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[  349.238965] cloud-init[586]: [2024-02-19 13:38:24] ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
[  349.239892] cloud-init[586]: [2024-02-19 13:38:24] ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[  349.240823] cloud-init[586]: [2024-02-19 13:38:24] ci-info: |  eth0  | False |     .     |     .     |   .   | aa:0a:9b:4c:25:13 |
[  349.241752] cloud-init[586]: [2024-02-19 13:38:24] ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |  host |         .         |
[  349.242677] cloud-init[586]: [2024-02-19 13:38:24] ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
[  349.243585] cloud-init[586]: [2024-02-19 13:38:24] ci-info: +--------+-------+-----------+-----------+-------+-------------------+

In order to investigate issue, I tried to boot from the same omi the capi image is based on (ami-a3ca408c) and I find out that its image has cloud-init v 23.3.3 installed, whereas capi-image installs a specific cloud-init package based on different version (Cloud-init v. 22.2-144) which is packaged by Outscale and deployed with its provider role here so it could have an inconsistent state because two versions of cloud-init are installed.

VM log output of ubuntu 22.04 omi
[...]
         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] 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.
[[0;32m  OK  [0m] Finished [0;1;39mWait for Network to be Configured[0m.
         Starting [0;1;39mInitial cloud-ini� (metadata service crawler)[0m...
[   16.680845] cloud-init[568]: Cloud-init v. 23.3.3-0ubuntu0~22.04.1 running 'init' at Mon, 19 Feb 2024 13:14:37 +0000. Up 16.65 seconds.
[   16.689805] cloud-init[568]: ci-info: +++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
[   16.690963] cloud-init[568]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
[   16.692061] cloud-init[568]: ci-info: | Device |  Up  |           Address            |      Mask     | Scope  |     Hw-Address    |
[   16.693148] cloud-init[568]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
[   16.694204] cloud-init[568]: ci-info: |  eth0  | True |          10.9.18.37          | 255.255.255.0 | global | aa:94:33:ae:fc:f0 |
[   16.695249] cloud-init[568]: ci-info: |  eth0  | True | fe80::a894:33ff:feae:fcf0/64 |       .       |  link  | aa:94:33:ae:fc:f0 |
[   16.696436] cloud-init[568]: ci-info: |   lo   | True |          127.0.0.1           |   255.0.0.0   |  host  |         .         |
[   16.697494] cloud-init[568]: ci-info: |   lo   | True |           ::1/128            |       .       |  host  |         .         |
[   16.698543] cloud-init[568]: ci-info: +--------+------+------------------------------+---------------+--------+-------------------+
[   16.699585] cloud-init[568]: ci-info: ++++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++++
## Anything else you would like to add?

/kind bug

Thanks for the report @DvdChe

Are you able to attempt to build an image without the tasks in outscale.yml? I suspect it's no longer needed with the new AMI. If that's the case we can update the default image_name and remove those tasks from image-builder.

Heello, @AverageMarcus, tahnks for your reply

I had the same Idea just after opened the issue. I commented the package installation step and i succeeded to reach VM. Network configuration was well.

I opened this PR to fix the issue