juju config shows newlines in settings values when none exist

Bug #1673614 reported by Jay R. Wren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

If I configure a charm value with a long enough string:

    juju config blah value='la di da di da'

then show the config value, there is a newline.

    juju config blah value
    'la di da di
    da'

For example:

stg-cdo-jujucharms@wendigo:~$ juju config jc-squidrev log_format='%>a %ui %un [%tl] "%rm %>ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh'
WARNING the configuration setting "log_format" already has the value "%>a %ui %un [%tl] \"%rm %>ru HTTP/%rv\" %>Hs %<st \"%{Referer}>h\" \"%{User-Agent}>h\" %Ss:%Sh"
stg-cdo-jujucharms@wendigo:~$ juju config jc-squidrev log_format --format json
'%>a %ui %un [%tl] "%rm %>ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h"
  %Ss:%Sh'
stg-cdo-jujucharms@wendigo:~$ juju config jc-squidrev log_format='%>a %ui %un [%tl] "%rm %>ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh'
WARNING the configuration setting "log_format" already has the value "%>a %ui %un [%tl] \"%rm %>ru HTTP/%rv\" %>Hs %<st \"%{Referer}>h\" \"%{User-Agent}>h\" %Ss:%Sh"
stg-cdo-jujucharms@wendigo:~$ juju config jc-squidrev log_format
'%>a %ui %un [%tl] "%rm %>ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h"
  %Ss:%Sh'

This seems a pretty terrible bug to line wrap a value, EVER, when it does not contain a newline. Its confusing and worrying.

I wanted to make sure this is a real bug and not something fixed already as the above was done with 2.0.2.

I needed to use juju-2.2-alpha1 for something else, anyway, so I built that.

This is the result of set and get using juju-2.2-alpha1:

    $ juju config apache2 vhost_template_vars='The quick brown fox jumps over the lazy dog. "The quick brown fox jumps over the lazy dog" "The quick brown fox jumps over the lazy dog" '
    $ juju config apache2 vhost_template_vars
The quick brown fox jumps over the lazy dog. "The quick brown fox jumps over the lazy
  dog" "The quick brown fox jumps over the lazy dog"

A newline was inserted in the middle of the config value.

Tags: usability
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: usability
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I am marking this as a duplicate of more recent bug # 1780711

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.