Merge lp:~thumper/juju-core/local-provider-machine-0 into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1472 |
Proposed branch: | lp:~thumper/juju-core/local-provider-machine-0 |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~thumper/juju-core/find-jujud |
Diff against target: |
213 lines (+72/-15) 5 files modified
cmd/juju/bootstrap.go (+4/-1) environs/local/config.go (+5/-0) environs/local/environ.go (+60/-11) environs/local/environprovider.go (+2/-2) environs/local/instance.go (+1/-1) |
To merge this branch: | bzr merge lp:~thumper/juju-core/local-provider-machine-0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email:
|
Commit message
Machine agent for local provider bootstrap
If you are using a local provider, always upload tools.
This uses the standard mechanism for getting tools into
the local provider storage.
From there the tools are unpacked the same way as an
agent would normally do it, although we do cheat and go
directly to the file on disk so we don't have to pretend
to download it somewhere else.
Description of the change
Machine agent for local provider bootstrap
If you are using a local provider, alway upload tools.
This uses the standard mechanism for getting tools into
the local provider storage.
From there the tools are unpacked the same way as an
agent would normally do it, although we do cheat and go
directly to the file on disk so we don't have to pretend
to download it somewhere else.
I changed the error message for the not implemented errors
so I could see which thing was failing and needed to be
implemented to get the next step working.
Reviewers: mp+174921_ code.launchpad. net,
Message:
Please take a look.
Description:
Machine agent for local provider bootstrap
If you are using a local provider, alway upload tools.
This uses the standard mechanism for getting tools into
the local provider storage.
From there the tools are unpacked the same way as an
agent would normally do it, although we do cheat and go
directly to the file on disk so we don't have to pretend
to download it somewhere else.
I changed the error message for the not implemented errors
so I could see which thing was failing and needed to be
implemented to get the next step working.
https:/ /code.launchpad .net/~thumper/ juju-core/ local-provider- machine- 0/+merge/ 174921
Requires: /code.launchpad .net/~thumper/ juju-core/ find-jujud/ +merge/ 174918
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/11327043/
Affected files: bootstrap. go local/config. go local/environ. go local/environpr ovider. go local/instance. go
A [revision details]
M cmd/juju/
M environs/
M environs/
M environs/
M environs/
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: cmd/juju/ bootstrap. go bootstrap. go' bootstrap. go 2013-05-02 15:55:42 +0000 bootstrap. go 2013-07-14 21:51:24 +0000 Config( ).Type( ) == "local" { and).
=== modified file 'cmd/juju/
--- cmd/juju/
+++ cmd/juju/
@@ -68,7 +68,10 @@
if err != nil {
return err
}
-
+ // If we are using a local provider, always upload tools.
+ if environ.
+ c.UploadTools = true
+ }
if c.UploadTools {
// Force version.Current, for consistency with subsequent upgrade-juju
// (see UpgradeJujuComm
Index: environs/ local/config. go local/config. go' local/config. go 2013-07-09 02:28:22 +0000 local/config. go 2013-07-14 23:07:24 +0000 Join(c. rootDir( ), "db")
=== modified file 'environs/
--- environs/
+++ environs/
@@ -73,6 +73,10 @@
return filepath.
}
+func (c *environConfig) logDir() string { Join(c. rootDir( ), "log") Join(c. rootDir( ), filename) rageDir( ), Tracef( "creating directory %s", dirname) dirname, 0755); err != nil {
+ return filepath.
+}
+
func (c *environConfig) configFile(filename string) string {
return filepath.
}
@@ -107,6 +111,7 @@
c.sharedSto
c.storageDir(),
c.mongoDir(),
+ c.logDir(),
} {
logger.
if err := os.MkdirAll(
Index: environs/ local/environ. go local/environ. go' local/environ. go 2013-07-12 02:08:36 +0000 local/environ. go 2013-07-14 23:07:24 +0000 net/juju- core/state/ api" net/juju- core/upstart" net/juju- core/utils" net/juju- core/version"
=== modified file 'environs/
--- environs/
+++ environs/
@@ -7,6 +7,7 @@
"fmt"
"io/ioutil"
"net"
+ "net/url"
"os"
"path/filepath"
"sync"
@@ -22,6 +23,7 @@
"launchpad.
"launchpad.
"launchpad.
+ "launchpad.
)
// lxcBridgeName is the name of the network interface that the local
provider
@@ -64,6 +66,10 @@
return "juju-db-" + env.config.names...