Merge lp:~thumper/juju-core/local-default-root-dir into lp:~go-bot/juju-core/trunk
Proposed by
Tim Penhey
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1466 |
Proposed branch: | lp:~thumper/juju-core/local-default-root-dir |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~thumper/juju-core/local-sudo-caller |
Diff against target: |
152 lines (+19/-22) 5 files modified
environs/local/config_test.go (+2/-2) environs/local/environ.go (+5/-0) environs/local/environ_test.go (+6/-13) environs/local/environprovider.go (+3/-3) environs/local/environprovider_test.go (+3/-4) |
To merge this branch: | bzr merge lp:~thumper/juju-core/local-default-root-dir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+174908@code.launchpad.net |
Commit message
Change the default root-dir to be in $HOME
Instead of having the root-dir in /usr/lib/juju, make it
in ~/.juju (well, $JUJU_HOME) by default. The root dir
is now the environment name under the ~/.juju dir.
Description of the change
Change the default root-dir to be in $HOME
Instead of having the root-dir in /usr/lib/juju, make it
in ~/.juju (well, $JUJU_HOME) by default. The root dir
is now the environment name under the ~/.juju dir.
To post a comment you must log in.
Reviewers: mp+174908_ code.launchpad. net,
Message:
Please take a look.
Description:
Change the default root-dir to be in $HOME
Instead of having the root-dir in /usr/lib/juju, make it
in ~/.juju (well, $JUJU_HOME) by default. The root dir
is now the environment name under the ~/.juju dir.
https:/ /code.launchpad .net/~thumper/ juju-core/ local-default- root-dir/ +merge/ 174908
Requires: /code.launchpad .net/~thumper/ juju-core/ local-sudo- caller/ +merge/ 174904
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/11319044/
Affected files: local/config_ test.go local/environ. go local/environ_ test.go local/environpr ovider. go local/environpr ovider_ test.go
A [revision details]
M environs/
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: environs/ local/config_ test.go local/config_ test.go' local/config_ test.go 2013-07-16 02:54:50 +0000 local/config_ test.go 2013-07-16 03:23:32 +0000 Validate( testConfig, nil)
=== modified file 'environs/
--- environs/
+++ environs/
@@ -59,7 +59,7 @@
valid, err := local.Provider.
c.Assert(err, gc.IsNil)
- expectedRootDir := filepath. Join(environs. DataDir, "tester-test") Join(os. Getenv( "HOME") , ".juju", "test") trs() unknownAttrs[ "root-dir" ], gc.Equals, expectedRootDir)
+ expectedRootDir := filepath.
unknownAttrs := valid.UnknownAt
c.Assert(
}
Index: environs/ local/environ. go local/environ. go' local/environ. go 2013-07-05 03:50:29 +0000 local/environ. go 2013-07-12 01:53:18 +0000 Unlock( ) createDirs( ); err != nil { eListener, err := ageListener( config. sharedStorageDi r())
=== modified file 'environs/
--- environs/
+++ environs/
@@ -75,6 +75,11 @@
defer env.localMutex.
env.config = config
env.name = config.Name()
+
+ if err := config.
+ return err
+ }
+
sharedStorag
createLocalStor
if err != nil {
return err
Index: environs/ local/environ_ test.go local/environ_ test.go' local/environ_ test.go 2013-07-15 02:58:47 +0000 local/environ_ test.go 2013-07-16 03:23:32 +0000 net/juju- core/environs" net/juju- core/environs/ jujutest" net/juju- core/environs/ local" net/juju- core/testing/ checkers"
=== modified file 'environs/
--- environs/
+++ environs/
@@ -9,7 +9,6 @@
"launchpad.
"launchpad.
"launchpad.
- jc "launchpad.
)
type environSuite struct {
@@ -20,20 +19,18 @@
func (*environSuite) TestOpenFailsWi thoutDirs( c *gc.C) { Apply(map[ string] interface{ }{
testConfig := minimalConfig(c)
+ testConfig, err := testConfig.
+ "root-dir": "/usr/lib/juju",
+ })
+ c.Assert(err, gc.IsNil)
environ, err := local.Provider. Open(testConfig ) environ, gc.IsNil)
- c.Assert(err, gc.ErrorMatches, "storage directory .* does not exist,
bootstrap first")
+ c.Assert(err, gc.ErrorMatches, "mkdir .* permission denied")
c.Assert(
}
func (s *environSuite) TestNameAndStor age(c *gc.C) {
- c.Logf("root: %s", environs.DataDir)
- c.Asser...