juju does not handle empty configuration variables

Bug #1337370 reported by Matt Bruzek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Triaged
Medium
Unassigned

Bug Description

I was performing a test on the current version of Juju (1.19.4) and I found an error with setting a configuration variable to the empty string.

I ran a script that attempted to set a configuration variable to the empty string
juju set cassandra apt-repo-spec=""

And got the following error.
ubuntu@stilson-01:~$ mbruzek/deploy_cassandra.sh
+ juju deploy --repository=/home/ubuntu/charms local:trusty/cassandra
Added charm "local:trusty/cassandra-5" to the environment.
+ juju set cassandra apt-repo-spec=
panic: runtime error: index out of range

goroutine 1 [running]:
main.Run.pN15_main.SetCommand
        /build/buildd/juju-core-1.19.4/src/github.com/juju/juju/cmd/juju/set.go:92
github.com_juju_juju_cmd_envcmd.Run.N53_github.com_juju_juju_cmd_envcmd.environCommandWrapper
        /build/buildd/juju-core-1.19.4/src/github.com/juju/juju/cmd/envcmd/environmentcommand.go:102
main.Run.N18_main.envCmdWrapper
        /build/buildd/juju-core-1.19.4/src/github.com/juju/juju/cmd/juju/main.go:153
github.com_juju_cmd.Run.pN32_github.com_juju_cmd.SuperCommand
        /build/buildd/juju-core-1.19.4/src/github.com/juju/cmd/supercommand.go:321
github.com_juju_cmd.Main
        /build/buildd/juju-core-1.19.4/src/github.com/juju/cmd/cmd.go:247
main.Main
        /build/buildd/juju-core-1.19.4/src/github.com/juju/juju/cmd/juju/main.go:77
main.main
        /build/buildd/juju-core-1.19.4/src/github.com/juju/juju/cmd/juju/main.go:173

goroutine 3 [syscall]:
        goroutine in C code; stack unavailable
+ juju add-unit -n 2 cassandra
ubuntu@stilson-01:~$ juju --version
1.19.4-trusty-ppc64

I can reproduce this problem by setting other variables to empty string.

Tags: config set
Curtis Hovey (sinzui)
tags: added: config
Matt Bruzek (mbruzek)
affects: juju-core → goyaml
Curtis Hovey (sinzui)
affects: goyaml → juju-core
tags: added: set
Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
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.