cannot destroy-environment with 1.17.4 of a trunk bootstrapped env "ftp-proxy"

Bug #1291967 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Tim Penhey

Bug Description

I just bootstrapped with Juju trunk, and then tried to destroy-environment with 1.17.4:

$ juju destroy-environment amz-jam
ERROR empty apt-https-proxy in environment configuration
$ juju destroy-environment amz-jam --force
ERROR empty ftp-proxy in environment configuration

This may not actually be Critical, but it seems bad that we would break tool compatibility for something as important as "destroy-environment".
It is possible that 1.17.4 is just complaining because it sees an empty string, and it would be fine if we just didn't have the field.
Could we just omit empty fields?

This has much bigger implications that we won't be able to use "juju-1.16 destroy-environment" for an environment that was bootstrapped with 1.18.

steps to reproduce:
go install launchpad.net/juju-core/...
$GOPATH/bin/juju bootstrap -e local
/usr/bin/juju destroy-environment local
ERROR empty apt-https-proxy in environment configuration

Tags: regression

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :
Download full text (8.0 KiB)

Note I just can "juju-1.17.4 status" and it gave a Panic with traceback:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x534ff1]

goroutine 9 [running]:
runtime.panic(0xc30780, 0x18626e8)
 /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
launchpad.net/juju-core/environs/config.(*Config).mustString(0x0, 0xd5fee0, 0x4, 0xc210067858, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/environs/config/config.go:382 +0x31
launchpad.net/juju-core/environs/config.(*Config).Type(0x0, 0xc210067840, 0x42f67f)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/environs/config/config.go:402 +0x3b
launchpad.net/juju-core/environs.New(0x0, 0xc210118600, 0x0, 0x7f05c92b5e01, 0xc21012a150)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/environs/open.go:142 +0x27
launchpad.net/juju-core/juju.apiConfigConnect(0x7f05c92be1a8, 0xc21008c620, 0xc2100fc860, 0x7fff6721e28c, 0x7, ...)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/juju/api.go:268 +0x108
launchpad.net/juju-core/juju.func·003(0xc210118600, 0x0, 0x0, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/juju/api.go:175 +0x5f
launchpad.net/juju-core/utils/parallel.func·005()
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/utils/parallel/try.go:135 +0x41
created by launchpad.net/juju-core/utils/parallel.(*Try).loop
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/utils/parallel/try.go:86 +0x9f

goroutine 1 [chan receive]:
launchpad.net/tomb.(*Tomb).Wait(0xc21008c460, 0xc2100fd360, 0xc21009bd00)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/tomb/tomb.go:110 +0x42
launchpad.net/juju-core/utils/parallel.(*Try).Result(0xc21008c460, 0xc2100ff480, 0x0, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/utils/parallel/try.go:192 +0x2e
launchpad.net/juju-core/juju.newAPIFromName(0x7fff6721e28c, 0x7, 0x7f05c92bdf98, 0xc2100eb280, 0x0, ...)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/juju/api.go:178 +0x38b
launchpad.net/juju-core/juju.newAPIClient(0x7fff6721e28c, 0x7, 0xc2100c5c40, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/juju/api.go:108 +0x89
launchpad.net/juju-core/juju.NewAPIClientFromName(0x7fff6721e28c, 0x7, 0x0, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/juju/api.go:86 +0x31
main.(*StatusCommand).Run(0xc2100d99c0, 0xc2100d9dc0, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/cmd/juju/status.go:86 +0xb7
main.envCmdWrapper.Run(0x7f05c92bcb68, 0xc2100d99c0, 0xc2100d9dc0, 0x0, 0x477325)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/cmd/juju/main.go:151 +0x48
main.(*envCmdWrapper).Run(0xc2100a0df0, 0xc2100d9dc0, 0x0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/cmd/juju/addmachine.go:1 +0x9a
launchpad.net/juju-core/cmd.(*SuperCommand).Run(0xc210111400, 0xc2100d9dc0, 0xc2100d9dc0, 0x0)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juju-core/cmd/supercommand.go:291 +0x323
launchpad.net/juju-core/cmd.Main(0x7f05c92bdda0, 0xc210111400, 0xc2100d9dc0, 0xc21000a010, 0x3, ...)
 /build/buildd/juju-core-1.17.4/src/launchpad.net/juj...

Read more...

John A Meinel (jameinel)
description: updated
Revision history for this message
Martin Packman (gz) wrote :

Using 1.16.5 juju destroy-environment from archive seems to work okay, just spammily:

$ juju version
1.16.5-raring-amd64
$ juju destroy-environment
WARNING unknown config field "apt-ftp-proxy"
WARNING unknown config field "http-proxy"
WARNING unknown config field "bootstrap-addresses-delay"
WARNING unknown config field "ftp-proxy"
WARNING unknown config field "https-proxy"
WARNING unknown config field "image-stream"
WARNING unknown config field "no-proxy"
WARNING unknown config field "apt-https-proxy"
WARNING unknown config field "bootstrap-timeout"
WARNING unknown config field "syslog-port"
WARNING unknown config field "test-mode"
WARNING unknown config field "charm-store-auth"
WARNING unknown config field "network"
WARNING unknown config field "use-default-secgroup"
WARNING unknown config field "apt-http-proxy"
WARNING unknown config field "tools-metadata-url"
WARNING unknown config field "bootstrap-retry-delay"
WARNING: this command will destroy the "ci" environment (type: openstack)
This includes all machines, services, data and other resources.

Continue [y/N]? y

Mark Ramm (mark-ramm)
Changed in juju-core:
milestone: 1.17.5 → 1.18.0
Revision history for this message
Tim Penhey (thumper) wrote :

A key problem here, and the reason I set the default to "" rather than Omit was there is no way to "unset" any of the proxy values if we do that.

Tim Penhey (thumper)
Changed in juju-core:
assignee: nobody → Tim Penhey (thumper)
status: Triaged → In Progress
Tim Penhey (thumper)
Changed in juju-core:
status: In Progress → Fix Committed
milestone: 1.18.0 → 1.17.5
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.