Public bug reported: On Ubuntu 22.04 (and also tested on 20.04 and 24.04), I'm seeing the following error from cloud-init when building from MAAS:
2025-03-05 12:17:21,950 - log_util.py[WARNING]: Failed fetching metadata from url http://maas.ip:5248/MAAS/metadata/ 2025-03-05 12:17:21,954 - log_util.py[DEBUG]: Failed fetching metadata from url http://maas.ip:5248/MAAS/metadata/ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceMAAS.py", line 93, in _get_data read_maas_seed_url( File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceMAAS.py", line 240, in read_maas_seed_url resp = read_file_or_url( File "/usr/lib/python3/dist-packages/cloudinit/url_helper.py", line 1097, in readurl return self._wrapped(readurl, args, kwargs) File "/usr/lib/python3/dist-packages/cloudinit/url_helper.py", line 1091, in _wrapped return wrapped_func(*args, **kwargs) File "/usr/lib/python3/dist-packages/cloudinit/url_helper.py", line 601, in readurl response_sleep_time = _handle_error( File "/usr/lib/python3/dist-packages/cloudinit/url_helper.py", line 431, in _handle_error if exception_cb and exception_cb(error): TypeError: OauthUrlHelper._exception_cb() missing 1 required positional argument: 'exception' 2025-03-05 12:17:21,957 - performance.py[DEBUG]: Getting metadata took 0.252 seconds 2025-03-05 12:17:21,957 - sources[DEBUG]: Datasource DataSourceMAAS [None] not updated for events: boot-new-instance 2025-03-05 12:17:21,957 - handlers.py[DEBUG]: finish: init-network/search-MAAS: SUCCESS: no network data found from DataSourceMAAS 2025-03-05 12:17:21,957 - handlers.py[DEBUG]: Queuing POST to http://maas.ip:5248/MAAS/metadata/status/7mafpm, data: {'name': 'init-network/search-MAAS', 'description': 'no network data fo und from DataSourceMAAS', 'event_type': 'finish', 'origin': 'cloudinit', 'timestamp': 1741177041.9575922, 'result': 'SUCCESS'} 2025-03-05 12:17:21,957 - log_util.py[WARNING]: No instance datasource found! Likely bad things to come! 2025-03-05 12:17:21,962 - log_util.py[DEBUG]: No instance datasource found! Likely bad things to come! Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 518, in main_init init.fetch(existing=existing) File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 552, in fetch return self._get_data_source(existing=existing) File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 403, in _get_data_source raise e File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 390, in _get_data_source ds, dsname = sources.find_source( File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 1089, in find_source raise DataSourceNotFoundException(msg) cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: (DataSourceMAAS) I determined this package version to be faulty: 24.4.1-0ubuntu0~22.04.1 (dated Feb 4) But the previous one was working: 24.4-0ubuntu1~22.04.1 Further investigation found this bug report: https://github.com/canonical/cloud-init/issues/6065 And this merged pull request fixing it: https://github.com/canonical/cloud-init/pull/6067 I applied that patch against 24.4.1-0ubuntu0~22.04.1 and confirmed that it fixed the problem. Could this change be backported to the Ubuntu packages please? ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2100963 Title: cloud-init fails with MAAS since Feb 4 update To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2100963/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
