← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1867933] [NEW] Invalid write_files format doesn't make the cloud-init fail

 

Public bug reported:

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 "<unicode string>", line 6, column 1:
    ouch!
    ^
could not found expected ':'
  in "<unicode string>", 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 "<unicode string>", line 6, column 1:
    ouch!
    ^
could not found expected ':'
  in "<unicode string>", 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
```

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1867933

Title:
  Invalid write_files format doesn't make the cloud-init fail

Status in cloud-init:
  New

Bug description:
  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 "<unicode string>", line 6, column 1:
      ouch!
      ^
  could not found expected ':'
    in "<unicode string>", 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 "<unicode string>", line 6, column 1:
      ouch!
      ^
  could not found expected ':'
    in "<unicode string>", 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
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1867933/+subscriptions


Follow ups