Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2977)

Issue 8772043: environs/maas: fix provider config (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by dimitern
Modified:
11 years ago
Reviewers:
mp+158961
Visibility:
Public.

Description

environs/maas: fix provider config [Note: this was originally proposed as lp:~rvb/juju-core/fix-maas-pvd-conf in the following MP: https://code.launchpad.net/~rvb/juju-core/fix-maas-pvd-conf/+merge/158938 Due to issues with lbox, rvba asked me to submit this for him. No changes made, except merging latest trunk.] This branch fixes a problem we saw happening in the MAAS lab while testing the MAAS provider. The symptom was that, after having installed the bootstrap node ok, Juju was unable to deploy any service. The error found in the bootstrap node's logs: http://paste.ubuntu.com/5709878/. The problem is that, from this code in cmd/jujud/upgrade.go: http://paste.ubuntu.com/5710182/, environs/maas/environ.go:SetConfig ends up being called on a nil object. After investigating the problem, I found that environs/maas/environprovider.go:Open(), when the config is invalid, returns a interface that has a nil value but a non-nil type (http://golang.org/doc/faq#nil_error) and thus, in cmd/jujud/upgrade.go (see snippet above), 'environ.SetConfig(cfg)' gets called on a nil 'environ'. https://code.launchpad.net/~dimitern/juju-core/fix-maas-pvd-conf/+merge/158961 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs/maas: fix provider config #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/maas/environprovider.go View 1 chunk +5 lines, -1 line 0 comments Download
M environs/maas/environprovider_test.go View 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 3
dimitern
Please take a look.
11 years ago (2013-04-15 15:46:06 UTC) #1
dimitern
LGTM'ed already as https://code.launchpad.net/~rvb/juju-core/fix-maas-pvd-conf/+merge/158938, so I'm just going to submit it.
11 years ago (2013-04-15 15:49:28 UTC) #2
dimitern
11 years ago (2013-04-15 15:51:45 UTC) #3
*** Submitted:

environs/maas: fix provider config

[Note: this was originally proposed as lp:~rvb/juju-core/fix-maas-pvd-conf in
the following MP:
https://code.launchpad.net/~rvb/juju-core/fix-maas-pvd-conf/+merge/158938
Due to issues with lbox, rvba asked me to submit this for him. No changes made,
except
merging latest trunk.]

This branch fixes a problem we saw happening in the MAAS lab while testing the
MAAS provider. The symptom was that, after having installed the bootstrap node
ok, Juju was unable to deploy any service. The error found in the bootstrap
node's logs: http://paste.ubuntu.com/5709878/.

The problem is that, from this code in cmd/jujud/upgrade.go:
http://paste.ubuntu.com/5710182/, environs/maas/environ.go:SetConfig ends up
being called on a nil object. After investigating the problem, I found that
environs/maas/environprovider.go:Open(), when the config is invalid, returns a
interface that has a nil value but a non-nil type
(http://golang.org/doc/faq#nil_error) and thus, in cmd/jujud/upgrade.go (see
snippet above), 'environ.SetConfig(cfg)' gets called on a nil 'environ'.

R=
CC=
https://codereview.appspot.com/8772043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b