← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/3627

** Bug watch added: github.com/canonical/cloud-init/issues #3627
   https://github.com/canonical/cloud-init/issues/3627

** Changed in: cloud-init
       Status: Confirmed => Expired

-- 
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:
  Expired

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



References