canonical / canonical/cloud-init
Invalid write_files format doesn't make the cloud-init fail
- 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: #1867933](https://bugs.launchpad.net/cloud-init/+bug/1867933)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2020-03-18T14:25:16.396575+00:00
date_fix_committed = None
date_fix_released = None
id = 1867933
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1867933
milestone = None
owner = boillodmanuel
owner_name = manuel
private = False
status = confirmed
submitter = boillodmanuel
submitter_name = manuel
tags = []
duplicates = []
_Launchpad user **manuel(boillodmanuel)** wrote on 2020-03-18T14:25:16.396575+00:00_
If the cloud config file format is not correct (see example below), the write_files module fails, but the cloud-init status is done
Cloud-config file:
```
#cloud-config
write_files:
- content: |
line below is badly indented
ouch!
path: /tmp/cloud-init-file.txt
```
Extract of cloud-init-output.log
```
2020-03-18 13:54:05,321 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 6 column 1: "while scanning a simple key
in "", line 6, column 1:
ouch!
^
could not found expected ':'
in "", line 8, column 9:
path: /tmp/cloud-init-file.txt
^"
2020-03-18 13:54:05,337 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 6 column 1: "while scanning a simple key
in "", line 6, column 1:
ouch!
^
could not found expected ':'
in "", line 8, column 9:
path: /tmp/cloud-init-file.txt
^"
2020-03-18 13:54:05,337 - util.py[WARNING]: Failed at merging in cloud config part from part-001
```
cloud-init status:
```
status: done
```
Contributor guide
Assessment
This issue has not been assessed yet.