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

Infiniband network devices not configured correctly on Ubuntu #3461

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

Comments

@ubuntu-server-builder
Copy link
Collaborator

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

Launchpad details
affected_projects = []
assignee = darren-birkett
assignee_name = Darren Birkett
date_closed = 2019-12-19T22:58:58.518050+00:00
date_created = 2019-10-07T15:30:30.950150+00:00
date_fix_committed = 2019-10-21T16:17:12.452003+00:00
date_fix_released = 2019-12-19T22:58:58.518050+00:00
id = 1847114
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1847114
milestone = None
owner = darren-birkett
owner_name = Darren Birkett
private = False
status = fix_released
submitter = darren-birkett
submitter_name = Darren Birkett
tags = []
duplicates = []

Launchpad user Darren Birkett(darren-birkett) wrote on 2019-10-07T15:30:30.950150+00:00

In commit e7b0e5f (included in release 18.4), support was added for configuring infiniband network devices. This only works on centos (using the sysconfig renderer), and in testing on ubuntu the following issues were encountered (using the eni renderer) (logs pasted here for completeness):

I think this will be a relatively trivial change to cloudinit/net/eni.py

dpkg -l cloud-init

ii cloud-init 19.2-36-g059d049c-0ubuntu1~18. all

from cloud-init.log:

2019-10-07 11:47:00,828 - util.py[WARNING]: failed stage init-local
2019-10-07 11:47:00,828 - util.py[DEBUG]: failed stage init-local
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 653, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 362, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 676, in apply_network_config
netcfg, src = self._find_networking_config()
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 641, in _find_networking_config
if self.datasource and hasattr(self.datasource, 'network_config'):
File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py", line 152, in network_config
self.network_json, known_macs=self.known_macs)
File "/usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py", line 669, in convert_net_json
raise ValueError("Unable to find a system nic for %s" % d)
ValueError: Unable to find a system nic for {'type': 'physical', 'mtu': 9000, 'subnets': [{'type': 'static', 'netmask': '255.255.255.0', 'routes': [], 'address': '192.168.202.26', 'ipv4': True}], 'mac_address': 'aa:aa:aa:aa:aa:aa'}

from stdout when cloud init run manually:

root@iband1# cloud-init --debug init --local
2019-10-07 12:38:09,527 - handlers.py[DEBUG]: start: init-local: searching for local datasources
2019-10-07 12:38:09,527 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2019-10-07 12:38:09,527 - util.py[DEBUG]: Read 17 bytes from /proc/uptime
2019-10-07 12:38:09,528 - util.py[DEBUG]: Attempting to remove /run/cloud-init/status.json
2019-10-07 12:38:09,528 - util.py[DEBUG]: Attempting to remove /run/cloud-init/result.json
2019-10-07 12:38:09,528 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/status.json
2019-10-07 12:38:09,528 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/data/result.json
2019-10-07 12:38:09,528 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpmm2igkqk) - w: [644] 469 bytes/chars
2019-10-07 12:38:09,528 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/status.json' => '../../var/lib/cloud/data/status.json'
2019-10-07 12:38:09,528 - util.py[DEBUG]: Running command ['systemd-detect-virt', '--quiet', '--container'] with allowed return codes [0] (shell=False, capture=True)
2019-10-07 12:38:09,532 - util.py[DEBUG]: Running command ['running-in-container'] with allowed return codes [0] (shell=False, capture=True)
2019-10-07 12:38:09,535 - util.py[DEBUG]: Running command ['lxc-is-container'] with allowed return codes [0] (shell=False, capture=True)
2019-10-07 12:38:09,537 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2019-10-07 12:38:09,537 - util.py[DEBUG]: Read 187 bytes from /proc/1/environ
2019-10-07 12:38:09,537 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2019-10-07 12:38:09,538 - util.py[DEBUG]: Read 1313 bytes from /proc/self/status
2019-10-07 12:38:09,538 - util.py[DEBUG]: Reading from /proc/cmdline (quiet=False)
2019-10-07 12:38:09,538 - util.py[DEBUG]: Read 126 bytes from /proc/cmdline
2019-10-07 12:38:09,538 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2019-10-07 12:38:09,538 - util.py[DEBUG]: Read 17 bytes from /proc/uptime
2019-10-07 12:38:09,538 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2019-10-07 12:38:09,538 - util.py[DEBUG]: Read 3169 bytes from /etc/cloud/cloud.cfg
2019-10-07 12:38:09,538 - util.py[DEBUG]: Attempting to load yaml from string of length 3169 with allowed root types (<class 'dict'>,)
2019-10-07 12:38:09,547 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/90_dpkg.cfg (quiet=False)
2019-10-07 12:38:09,547 - util.py[DEBUG]: Read 114 bytes from /etc/cloud/cloud.cfg.d/90_dpkg.cfg
2019-10-07 12:38:09,547 - util.py[DEBUG]: Attempting to load yaml from string of length 114 with allowed root types (<class 'dict'>,)
2019-10-07 12:38:09,548 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2019-10-07 12:38:09,548 - util.py[DEBUG]: Read 2057 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2019-10-07 12:38:09,548 - util.py[DEBUG]: Attempting to load yaml from string of length 2057 with allowed root types (<class 'dict'>,)
2019-10-07 12:38:09,551 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2019-10-07 12:38:09,551 - util.py[DEBUG]: Read 39 bytes from /run/cloud-init/cloud.cfg
2019-10-07 12:38:09,551 - util.py[DEBUG]: Attempting to load yaml from string of length 39 with allowed root types (<class 'dict'>,)
2019-10-07 12:38:09,551 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2019-10-07 12:38:09,551 - util.py[DEBUG]: loaded blob returned None, returning default.
2019-10-07 12:38:09,552 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='' mode='w' encoding='UTF-8'> to | tee -a /var/log/cloud-init-output.log
2019-10-07 12:38:09,554 - util.py[DEBUG]: Redirecting <_io.TextIOWrapper name='' mode='w' encoding='UTF-8'> to | tee -a /var/log/cloud-init-output.log
2019-10-07 12:38:09,554 - main.py[DEBUG]: Logging being reset, this logger may no longer be active shortly
Cloud-init v. 19.2-36-g059d049c-0ubuntu1~18.04.1 running 'init-local' at Mon, 07 Oct 2019 12:38:09 +0000. Up 3130.80 seconds.
2019-10-07 12:38:09,684 - util.py[WARNING]: failed stage init-local
failed run of stage init-local

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 653, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 362, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 706, in apply_network_config
return self.distro.apply_network_config(netcfg, bring_up=bring_up)
File "/usr/lib/python3/dist-packages/cloudinit/distros/init.py", line 178, in apply_network_config
dev_names = self._write_network_config(netconfig)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 114, in _write_network_config
return self._supported_write_network_config(netconfig)
File "/usr/lib/python3/dist-packages/cloudinit/distros/init.py", line 93, in _supported_write_network_config
renderer.render_network_config(network_config)
File "/usr/lib/python3/dist-packages/cloudinit/net/renderer.py", line 56, in render_network_config
templates=templates, target=target)
File "/usr/lib/python3/dist-packages/cloudinit/net/eni.py", line 494, in render_network_state
util.write_file(fpeni, header + self._render_interfaces(network_state))
File "/usr/lib/python3/dist-packages/cloudinit/net/eni.py", line 478, in _render_interfaces
key=lambda k: (order[k['type']], k['name'])):
File "/usr/lib/python3/dist-packages/cloudinit/net/eni.py", line 478, in
key=lambda k: (order[k['type']], k['name'])):
KeyError: 'infiniband'

@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 Darren Birkett(darren-birkett) wrote on 2019-10-07T15:30:30.950150+00:00

Launchpad attachments: cloud-init ubuntu-bug output

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Server Team CI bot(server-team-bot) wrote on 2019-10-21T16:17:10.679859+00:00

This bug is fixed with commit 02c8214 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=02c8214e

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2019-12-19T22:58:59.781436+00:00

This bug is believed to be fixed in cloud-init in version 19.2-65. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

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