juju get shows default value true

Bug #1392544 reported by Jay R. Wren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Status tracked in Trunk
1.21
Fix Released
High
Dimiter Naydenov
Trunk
Fix Released
High
Dimiter Naydenov

Bug Description

juju get shows default: true for every config option.

$ juju version
1.21-beta1-utopic-amd64

config.yaml snip for this charm:
  nagios_context:
    default: "juju"
    type: string
    description: |
      Used by the nrpe subordinate charms.
      A string that will be prepended to instance name to set the host name
      in nagios. So for instance the hostname would be something like:
         juju-myservice-0
      If you're running multiple environments with the same services in them
      this allows you to differentiate between them.
  nagios_servicegroups:
    default: ""
    type: string
    description: |
      A comma-separated list of nagios servicegroups.
      If left empty, the nagios_context will be used as the servicegroup.
  ingestion-mode:
    type: string
    default: "legacy"
    description: |
      How to run the charms and bundles ingestion in order to populate the
      database for this charm store. Possible values are:
      - none: charms/bundle ingestion is disabled;
      - legacy: all the charms/bundles revisions are synced with the legacy
        charmworlds and charm store;
      - launchpad: charms and bundles are ingested from Launchpad.
      Ingestion, if enabled, is run once the charmstore service is successfully
      related to elasticsearch and mongodb.
  ingestion-interval:
    type: int
    default: 15
    description: |
      The interval in minutes on which the ingestion is run, and new
      charms/bundles are imported into the charm store. Note that, if a
      previous ingestion job is still running, the current one is skipped.
      The default is used if the given value is <= 0.
  ingestion-concurrency:
    type: int
    default: 1
    description: |
      How many parallel processors must be used to run the ingestion.
      The default is used if the given value is <= 0.
  ingestion-loglevel:
    type: string
    default: "INFO"
    description: |
      The logging configuration to use when ingesting charms/bundles.
      For instance, to debug the ingestion process it is safe to set this
      value to "DEBUG". The log file can be found in
      /var/log/charmstore/charmload.log (in the charmstore units).
  ingestion-match:
    type: string
    default: ""
    description: |
      Only ingest charms whose IDs match the regular expression.
      By default all the charms and bundles are imported.

juju get for this charm:

$ juju get charmstore
charm: charmstore
service: charmstore
settings:
  ingestion-concurrency:
    default: true
    description: 'How many parallel processors must be used to run the ingestion.

      The default is used if the given value is <= 0.

'
    type: int
    value: 1
  ingestion-interval:
    default: true
    description: 'The interval in minutes on which the ingestion is run, and new

      charms/bundles are imported into the charm store. Note that, if a

      previous ingestion job is still running, the current one is skipped.

      The default is used if the given value is <= 0.

'
    type: int
    value: 15
  ingestion-loglevel:
    default: true
    description: 'The logging configuration to use when ingesting charms/bundles.

      For instance, to debug the ingestion process it is safe to set this

      value to "DEBUG". The log file can be found in

      /var/log/charmstore/charmload.log (in the charmstore units).

'
    type: string
    value: INFO
  ingestion-match:
    default: true
    description: 'Only ingest charms whose IDs match the regular expression.

      By default all the charms and bundles are imported.

'
    type: string
    value: ""
  ingestion-mode:
    default: true
    description: "How to run the charms and bundles ingestion in order to populate
      the\ndatabase for this charm store. Possible values are:\n- none: charms/bundle
      ingestion is disabled;\n- legacy: all the charms/bundles revisions are synced
      with the legacy\n charmworlds and charm store;\n- launchpad: charms and bundles
      are ingested from Launchpad.\nIngestion, if enabled, is run once the charmstore
      service is successfully\nrelated to elasticsearch and mongodb.\n"
    type: string
    value: legacy
  listen-port:
    default: true
    description: This is the tcp port on which the charmstore server will listen for
      connections.
    type: int
    value: 8080
  nagios_context:
    default: true
    description: "Used by the nrpe subordinate charms.\nA string that will be prepended
      to instance name to set the host name\nin nagios. So for instance the hostname
      would be something like:\n juju-myservice-0\nIf you're running multiple environments
      with the same services in them\nthis allows you to differentiate between them.\n"
    type: string
    value: juju
  nagios_servicegroups:
    default: true
    description: 'A comma-separated list of nagios servicegroups.

      If left empty, the nagios_context will be used as the servicegroup.

'
    type: string
    value: ""

Abel Deuring (adeuring)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
tags: added: regression
Curtis Hovey (sinzui)
tags: added: charms config
Changed in juju-core:
importance: Medium → Critical
milestone: none → 1.21-beta2
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.21-beta2 → 1.21
importance: Critical → High
Domas Monkus (tasdomas)
Changed in juju-core:
assignee: nobody → Domas Monkus (tasdomas)
status: Triaged → Fix Committed
Domas Monkus (tasdomas)
Changed in juju-core:
assignee: Domas Monkus (tasdomas) → nobody
status: Fix Committed → Confirmed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Confirmed → Triaged
status: Triaged → Fix Committed
status: Fix Committed → Triaged
John A Meinel (jameinel)
Changed in juju-core:
assignee: nobody → Dimiter Naydenov (dimitern)
Revision history for this message
John A Meinel (jameinel) wrote :

So this was discussed in IRC, a rough summary is:

This has actually been the behavior for a long time. "default" in "juju get" actually means "is the value currently set the default value, or is it a user specified value". It isn't intended to report the value in config.

We're discussing changing this (to something like 'is-default') in the future command "juju service get" when the CLI is changed to use subcommand syntax.

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

After investigating with 1.21 and looking back to the history of "juju get" implementation changes, I can confirm this behavior is by design, ever since pyjuju. It's unfortunate the name "default" was chosen, rather than "is-default" or something, to make it obvious it's a boolean flag, and not the same as the "default" field in the service config. I'll propose a fix which updates the juju get help information to explain the output of the command.

Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Improved help documentation for "get" landed in 1.21 (https://github.com/juju/juju/pull/1166) and master (https://github.com/juju/juju/pull/1167).

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: removed: regression
tags: added: docs
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.