← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1749696] Re: Excessively vague error while parsing yaml: RuntimeError: Unable to shellify type dict which is not a list or string

 

[Expired for cloud-init because there has been no activity for 60 days.]

** Changed in: cloud-init
       Status: Incomplete => 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/1749696

Title:
  Excessively vague error while parsing yaml: RuntimeError: Unable to
  shellify type dict which is not a list or string

Status in cloud-init:
  Expired

Bug description:
  We are currently trying to debug a sudden unexpected failure of a
  cloud-init v17.1-46 script in Ubuntu v16.04, which fails as below, and
  we're hampered by an excessively vague error message as follows:

  2018-02-15 11:58:22,627 - util.py[WARNING]: Failed to shellify bootcmd
  2018-02-15 11:58:22,634 - util.py[DEBUG]: Failed to shellify bootcmd
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_bootcmd.py", line 54, in handle
      content = util.shellify(cfg["bootcmd"])
    File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1847, in shellify
      % (type_utils.obj_name(args)))
  RuntimeError: Unable to shellify type dict which is not a list or string

  At warning level we have the error "Failed to shellify bootcmd", which
  tells us that cloud-init could not continue, but refuses to tell us
  why cloud-init could not continue, leaving us to guess.

  At debug level we have the underlying exception from python. Here we
  get the error "Unable to shellify type dict which is not a list or
  string", which gives us the hint that we have a syntax error, but it
  doesn't tell us what line the syntax error is on, or any context for
  the error.

  The error is invisible by inspection, and various yaml linters tell us
  our yaml is formatted correctly, although this is too imprecise to
  tell us what has gone wrong.

  To fix this bug, the error "Failed to shellify bootcmd" needs to be
  extended with the reason for the error, and the reason for the error
  needs to tell us on what line the error has occurred.

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


References