Merge lp:~thumper/juju-core/container-address into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1733 |
Proposed branch: | lp:~thumper/juju-core/container-address |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
184 lines (+44/-22) 8 files modified
container/lxc/lxc.go (+4/-0) juju/osenv/vars.go (+1/-0) provider/local/export_test.go (+2/-1) provider/local/net.go (+3/-19) provider/maas/environ.go (+2/-0) provider/maas/environprovider.go (+9/-0) utils/network.go (+20/-0) worker/deployer/simple.go (+3/-2) |
To merge this branch: | bzr merge lp:~thumper/juju-core/container-address |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+182271@code.launchpad.net |
Commit message
Get the address correctly from the container.
This is kind of messy, but it does work.
This uses an extra environment variable from the upstart
script to identify the type of container. MAAS then uses
this when trying to work out the hostname of the machine.
We do need a nicer way to get this done. We also want to
move the environment variables from the upstart script
into the agent config, but this will be a follow up branch.
Description of the change
Get the address correctly from the container.
This is kind of messy, but it does work.
This uses an extra environment variable from the upstart
script to identify the type of container. MAAS then uses
this when trying to work out the hostname of the machine.
We do need a nicer way to get this done. We also want to
move the environment variables from the upstart script
into the agent config, but this will be a follow up branch.
Reviewers: mp+182271_ code.launchpad. net,
Message:
Please take a look.
Description:
Get the address correctly from the container.
This is kind of messy, but it does work.
This uses an extra environment variable from the upstart
script to identify the type of container. MAAS then uses
this when trying to work out the hostname of the machine.
We do need a nicer way to get this done. We also want to
move the environment variables from the upstart script
into the agent config, but this will be a follow up branch.
https:/ /code.launchpad .net/~thumper/ juju-core/ container- address/ +merge/ 182271
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13261044/
Affected files: lxc/lxc. go local/export_ test.go local/net. go maas/environpro vider.go deployer/ simple. go
A [revision details]
M container/
M juju/osenv/vars.go
M provider/
M provider/
M provider/
M utils/network.go
M worker/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: container/ lxc/lxc. go lxc/lxc. go' lxc/lxc. go 2013-08-21 05:38:38 +0000 lxc/lxc. go 2013-08-27 04:29:03 +0000 net/juju- core/environs/ cloudinit" net/juju- core/environs/ config" net/juju- core/instance" net/juju- core/juju/ osenv" net/juju- core/names" net/juju- core/state" net/juju- core/state/ api" FinishMachineCo nfig(machineCon fig, environConfig, Value{} ); err != nil { MachineEnvironm ent[osenv. JujuContainerTy pe] = instance. LXC) New(machineConf ig)
=== modified file 'container/
--- container/
+++ container/
@@ -19,6 +19,7 @@
"launchpad.
"launchpad.
"launchpad.
+ "launchpad.
"launchpad.
"launchpad.
"launchpad.
@@ -339,6 +340,7 @@
if err := environs.
constraints.
return nil, err
}
+ machineConfig.
string(
cloudConfig, err := cloudinit.
if err != nil {
return nil, err
Index: juju/osenv/vars.go vars.go' TYPE" _TYPE" orageDir = "JUJU_SHARED_ STORAGE_ DIR"
=== modified file 'juju/osenv/
--- juju/osenv/vars.go 2013-07-31 05:16:47 +0000
+++ juju/osenv/vars.go 2013-08-01 01:13:46 +0000
@@ -9,6 +9,7 @@
JujuRepository = "JUJU_REPOSITORY"
JujuLxcBridge = "JUJU_LXC_BRIDGE"
JujuProviderType = "JUJU_PROVIDER_
+ JujuContainerType = "JUJU_CONTAINER
JujuStorageDir = "JUJU_STORAGE_DIR"
JujuStorageAddr = "JUJU_STORAGE_ADDR"
JujuSharedSt
Index: provider/ local/export_ test.go local/export_ test.go' local/export_ test.go 2013-07-17 05:09:42 +0000 local/export_ test.go 2013-08-01 01:13:46 +0000 net/gocheck"
=== modified file 'provider/
--- provider/
+++ provider/
@@ -6,6 +6,7 @@
gc "launchpad.
"launchpad. net/juju- core/environs/ config" net/juju- core/utils"
+ "launchpad.
)
var ( terface = getAddressForIn terfaceImpl terface = utils.GetAddres sForInterface
@@ -62,6 +63,6 @@
return "127.0.0.1", nil
}
return func() {
- getAddressForIn
+ getAddressForIn
}
}
Index: provider/ local/net. go local/net. g...
=== modified file 'provider/