juju default config string value of 'null' produces an error

Bug #1101607 reported by Andrew Glen-Young
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pyjuju
Triaged
Low
Unassigned

Bug Description

I was creating a new config option for a charm and wanted to have a default string option of 'null' (without the quotes) as documented on 'service-config' page[1] on the juju site.

This results in juju telling me that I have an invalid option.

Either the documentation needs to be updated or there is a regression?

Example config.yaml:

  default-roles:
    default: null
    type: string
    description: |
      Comma separated list of roles to create (other than admin-role).

Snippet of the config on the juju site:

  options:
      blog-roll:
          default: null
          description: List of URLs which will be included as the blog roll

Error message:

2013-01-18 23:18:27,875 WARNING Charm 'keystone~' has an error: ServiceConfigError() Error processing '/home/a
gy/tmp/charms/precise/keystone~/config.yaml': Invalid options specification: options.default-roles.default: expected string, got None

System information:

$ dpkg-query --show juju
juju 0.6.0.1+bzr608-0juju2~precise1

[1]: https://juju.ubuntu.com/docs/drafts/service-config.html

Revision history for this message
Javier López (javier-lopez) wrote :

From http://irclogs.ubuntu.com/2011/12/06/%23juju.html#t20:08

It seems the 'null' in the documentation should be replaced with ""

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

not sure that's an error. 'null' is the yaml serialization of None/nil .. and the validation is for a string type. we could transparently substitute an empty string as the default value in this case without changing the semantics though.

Revision history for this message
Javier López (javier-lopez) wrote :

Yeah, I think it would be cool to use the correct semantic 'null' and replace "" for it, however right now (and since 2011), if you want to have a blank option "" is the only way to go =/

Curtis Hovey (sinzui)
Changed in juju:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.