canonical / canonical/cloud-init

cloud-init.service has no timeout

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

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2019-08-27T16:36:51.273562+00:00
date_fix_committed = None
date_fix_released = None
id = 1841631
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1841631
milestone = None
owner = paride
owner_name = Paride Legovini
private = False
status = triaged
submitter = paride
submitter_name = Paride Legovini
tags = []
duplicates = []

_Launchpad user **Paride Legovini(paride)** wrote on 2019-08-27T16:36:51.273562+00:00_

cloud-init's systemd service file (cloud-init.service) currently has not timeout; it explicitly sets:

TimeoutSec=0

which, while not explicitly documented in systemd-service(5), appears to disable the timeout logic. This may cause the boot process to get stuck, while the system could possibly reach a useful state even if cloud-init failed.

We hit this on a headless server: cloud-init got stuck and this prevented systemd to reach the point where systemd-getty-generator would have spawned a getty on the serial line, allowing the server to be accessed remotely. As a result we've got locked out of the server, which had to re rebooted in single-user mode. A cloud-init timeout would have prevented this.

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.