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

Ubuntu 18.04 wrong parsing of instance-data.json generating network config #4083

Closed
ubuntu-server-builder opened this issue May 12, 2023 · 5 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #2008772

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2023-03-02T15:08:07.699836+00:00
date_created = 2023-02-28T10:04:38.670156+00:00
date_fix_committed = None
date_fix_released = None
id = 2008772
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/2008772
milestone = None
owner = vgobja
owner_name = Vadim Gobja
private = False
status = invalid
submitter = vgobja
submitter_name = Vadim Gobja
tags = []
duplicates = []

Launchpad user Vadim Gobja(vgobja) wrote on 2023-02-28T10:04:38.670156+00:00

Hello,

We have an cloud service based on Openstack, we have provide IPv4 (dhcp) and IPv6 (static),
on ubuntu 18.04 we detected that when is parsed instance-data.json it take info only for IPv4 and not get static records for IPv6. And related to this it not generate config for IPv6 we tested with netplan and ENI (ifupdown), all data in instance-data.json are present in the file.

2023-02-28 09:21:42,649 - util.py[DEBUG]: Reading from /sys/class/net/ens3/type (quiet=False)
2023-02-28 09:21:42,650 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/ens3/type
2023-02-28 09:21:42,650 - networking.py[DEBUG]: net: all expected physical devices present
2023-02-28 09:21:42,650 - stages.py[DEBUG]: applying net config names for {'ethernets': {'ens3': {'dhcp4': True, 'set-name': 'ens3', 'match': {'macaddress': 'fa:16:3e:00:3c:33'}}}, 'version': 2}
2023-02-28 09:21:42,650 - util.py[DEBUG]: Reading from /sys/class/net/ens3/device/device (quiet=False)
2023-02-28 09:21:42,650 - util.py[DEBUG]: Read 7 bytes from /sys/class/net/ens3/device/device

On ubuntu 20.04 this problem not persist.
2023-02-27 14:36:40,755 - util.py[DEBUG]: Reading from /sys/class/net/lo/type (quiet=False)
2023-02-27 14:36:40,755 - util.py[DEBUG]: Read 4 bytes from /sys/class/net/lo/type
2023-02-27 14:36:40,755 - networking.py[DEBUG]: net: all expected physical devices present
2023-02-27 14:36:40,755 - stages.py[DEBUG]: applying net config names for {'version': 1, 'config': [{'type': 'physical', 'mtu': 1500, 'accept-ra': False, 'subnets': [{'type': 'dhcp4'}, {'type': 'static6', 'netmask': 'ffff:ffff:ffff:ffff::', 'routes': [{'network': '::', 'netmask': '::', 'gateway': '2a10:c941:12:1::1'}], 'address': '2a10:c941:12:1::10f', 'ipv6': True}], 'mac_address': 'fa:16:3e:f3:d9:ad', 'name': 'ens3'}, {'type': 'nameserver', 'address': '8.8.8.8'}, {'type': 'nameserver', 'address': '1.1.1.1'}]}
2023-02-27 14:36:40,756 - util.py[DEBUG]: Reading from /sys/class/net/ens3/device/device (quiet=False)
2023-02-27 14:36:40,756 - util.py[DEBUG]: Read 7 bytes from /sys/class/net/ens3/device/device

cloud-init version: 22.4.2-0ubuntu0~18.04.1

we tried and older version but it work same

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 12, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Vadim Gobja(vgobja) wrote on 2023-02-28T10:07:41.215022+00:00

Launchpad attachments: Ubuntu 20.04 collect log

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Vadim Gobja(vgobja) wrote on 2023-02-28T10:08:12.191100+00:00

Launchpad attachments: Ubuntu 18.04 collect log

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Vadim Gobja(vgobja) wrote on 2023-02-28T10:09:07.854874+00:00

Attached and the collected logs from Ubuntu 18.04 and 20.04.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2023-03-02T15:07:54.443595+00:00

This is expected behavior. On Ubuntu 18.04, on Openstack, the network was configured using the fallback network interface only. In Ubuntu 20.04, it was updated to use network_data.json. Since changing this behavior would have resulted in backwards incompatibly, it is not default behavior on 18.04.

To enable this behavior on 18.04, you can add the following to /etc/cloud/cloud.cfg or a file in /etc/cloud/cloud.cfg.d/

datasource:
OpenStack:
apply_network_config: true

Since this is expected behavior, I'm going to set this bug status to Invalid, but if I have missed something, please do set it back to New and add more context.

See the following links for context:
https://bugs.launchpad.net/cloud-init/+bug/1749717
cd1de5f
https://github.com/canonical/cloud-init/blob/ubuntu/bionic/debian/patches/openstack-no-network-config.patch/

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Vadim Gobja(vgobja) wrote on 2023-03-03T08:21:48.369371+00:00

Thank for reply, missed this in documentation.

@ubuntu-server-builder ubuntu-server-builder closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant