I'm testing an upgrade path from 1.18 to 1.22 (or 1.24, which ever seems to work). As I fail to upgrade directly, I am using 1.20 as intermittent step.
Here is how I was doing it:
ubuntu@mariosplivalo-bastion:~$ sudo apt-get install juju-core=1.18.1-0ubuntu1
ubuntu@mariosplivalo-bastion:~$ juju deploy ubuntu -n5
ubuntu@mariosplivalo-bastion:~$ juju upgrade-juju
(The full paste of executed commands is here: http://pastebin.ubuntu.com/11855933/)
But, this leave some of my agents in 'down' state (see attached juju.status.txt).
I'm also attaching machine.log from the failed unit (machine-1.log).
If I restart the unit, jujud for machine won't start. Here is what happens if I try to start it manually:
root@juju-mariosplivalo-machine-1:~# /var/lib/juju/tools/machine-1/jujud machine --data-dir '/var/lib/juju' --machine-id 1 --debug
2015-07-10 13:34:41 INFO juju.cmd supercommand.go:37 running jujud [1.20.14-trusty-i386 gc]
2015-07-10 13:34:41 INFO juju.cmd.jujud machine.go:158 machine agent machine-1 start (1.20.14-trusty-i386 [gc])
2015-07-10 13:34:41 DEBUG juju.agent agent.go:377 read agent config, format "1.18"
2015-07-10 13:34:41 INFO juju.cmd.jujud machine.go:169 no upgrade steps required or upgrade steps for 1.20.14 have already been run.
2015-07-10 13:34:41 INFO juju.worker runner.go:260 start "api"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x1 pc=0x80bedda]
goroutine 7 [running]:
runtime.panic(0x87cc1e0, 0x94cc4c8)
/usr/lib/go/src/pkg/runtime/panic.c:266 +0xac
github.com/juju/juju/agent.(*configInternal).APIInfo(0x19877620, 0x198bb298)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/agent/agent.go:611 +0xaa
main.openAPIState(0xb750a7f8, 0x19877620, 0xb750a988, 0x198a23c0, 0x0, ...)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/agent.go:212 +0x7f
main.(*MachineAgent).APIWorker(0x198a23c0, 0x8, 0xb7436f5c, 0x1, 0x1)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/machine.go:247 +0xdc
main.*MachineAgent.APIWorker·fm(0x0, 0x0, 0x0, 0x0)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/machine.go:179 +0x4a
github.com/juju/juju/worker.(*runner).runWorker(0x198aa930, 0x0, 0x0, 0x8878020, 0x3, ...)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:261 +0x2ab
created by github.com/juju/juju/worker.(*runner).run
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:177 +0x2d7
goroutine 1 [select]:
github.com/juju/juju/worker.(*runner).StartWorker(0x198aa930, 0x88a7f18, 0xb, 0x8a1e1ac, 0x0, ...)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:100 +0xee
main.(*MachineAgent).Run(0x198a23c0, 0x198aa3c0, 0x0, 0x0)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/machine.go:183 +0x5dc
github.com/juju/cmd.(*SuperCommand).Run(0x198a4540, 0x198aa3c0, 0x198aa3c0, 0x0)
/build/buildd/juju-core-1.20.14/src/github.com/juju/cmd/supercommand.go:321 +0x299
github.com/juju/cmd.Main(0xb750a490, 0x198a4540, 0x198aa3c0, 0x1980a008, 0x6, ...)
/build/buildd/juju-core-1.20.14/src/github.com/juju/cmd/cmd.go:247 +0x1bf
main.jujuDMain(0x1980a000, 0x7, 0x7, 0x198aa3c0, 0x1981c501, ...)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/main.go:107 +0x1f9
main.Main(0x1980a000, 0x7, 0x7)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/main.go:122 +0x186
main.main()
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/cmd/jujud/main.go:139 +0x3e
goroutine 3 [syscall]:
os/signal.loop()
/usr/lib/go/src/pkg/os/signal/signal_unix.go:21 +0x21
created by os/signal.init·1
/usr/lib/go/src/pkg/os/signal/signal_unix.go:27 +0x34
goroutine 6 [runnable]:
github.com/juju/juju/worker.(*runner).run(0x198aa930, 0x806cc50, 0x806cc60)
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:160 +0x811
github.com/juju/juju/worker.func·004()
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:84 +0x4e
created by github.com/juju/juju/worker.NewRunner
/build/buildd/juju-core-1.20.14/src/github.com/juju/juju/worker/runner.go:85 +0x12e
root@juju-mariosplivalo-machine-1:~#
Checking the agent.conf file, inside /var/lib/juju/agents/machine-1 I see that there is no mention of apiaddress nor apipassword. On the working unit those are present.
This could be a duplicate of bug 1444912