canonical / canonical/cloud-init

CloudStack: cloud-init at sles and ubuntu depends on wget but does not seem to validate this causing late runtime error

Open
#3,798 2 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: #1901054](https://bugs.launchpad.net/cloud-init/+bug/1901054)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2020-10-22T15:51:09.953541+00:00
date_fix_committed = None
date_fix_released = None
id = 1901054
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1901054
milestone = None
owner = jdoe666
owner_name = Peter M.
private = False
status = triaged
submitter = jdoe666
submitter_name = Peter M.
tags = []
duplicates = []

_Launchpad user **Peter M.(jdoe666)** wrote on 2020-10-22T15:51:09.953541+00:00_

This might be a subtle error which is neither a direct package dependency nor explicitedly an error in the cloud-init software, but this in fact leads to problems. Also, it does not seem to be a distro-specific problem.

Scenario:

1. User of cloud-init is not aware it will use wget to download meta-data
2. There is no direct dependency in the cloud-init package to wget (checked for Ubuntu and SLES 15)
3. Cloud-init will not work properly as wget is missing

Error output from /etc/cloud-init.log (observed with lastest patch level for version 19.4 on SLES 15)

2020-10-22 14:08:05,095 - util.py[DEBUG]: Running command ['wget', '--quiet', '--tries', '3', '--timeout', '20', '--output-document', '-', '--header', 'DomU_Request: send_my_password', '192.168.1.1:8080'] with allowed return codes [0] (shell=False, capture=True)
FileNotFoundError: [Errno 2] No such file or directory: b'wget': b'wget'
Command: ['wget', '--quiet', '--tries', '3', '--timeout', '20', '--output-document', '-', '--header', 'DomU_Request: send_my_password', '192.168.1.1:8080']
Reason: [Errno 2] No such file or directory: b'wget': b'wget'

Suggestion: possibly, cloud-init should exit immediately if wget not detected in the system, and/or have it as a dependency in distro packages?

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.