canonical / canonical/cloud-init

Azure data source assumes network is driven via dhcpclient

Open
#3,451 3 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1845252](https://bugs.launchpad.net/cloud-init/+bug/1845252)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2019-09-24T20:16:02.686593+00:00
date_fix_committed = None
date_fix_released = None
id = 1845252
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1845252
milestone = None
owner = rjschwei
owner_name = Robert Schweikert
private = False
status = triaged
submitter = rjschwei
submitter_name = Robert Schweikert
tags = []
duplicates = []

_Launchpad user **Robert Schweikert(rjschwei)** wrote on 2019-09-24T20:16:02.686593+00:00_

The Azure data source assumes that the network is set up by dhcpclient. During cloud-init initialization the following traceback is generated:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceAzure.py", line 668, in _negotiate
fabric_data = metadata_func()
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 36, in impl
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 458, in get_metadata_from_fabric
return shim.register_with_azure_and_fetch_data(pubkey_info=pubkey_info)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 36, in impl
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 393, in register_with_azure_and_fetch_data
'http://{0}/machine/?comp=goalstate'.format(self.endpoint))
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 272, in endpoint
self.dhcpoptions)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 36, in impl
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 374, in find_endpoint
fallback_lease_file)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 36, in impl
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/azure.py", line 300, in _get_value_from_leases_file
content = util.load_file(fallback_lease_file)
File "/usr/lib/python3.6/site-packages/cloudinit/util.py", line 1359, in load_file
with open(fname, 'rb') as ifh:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/dhcp/dhclient.eth0.leases'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.