Merge lp:~thumper/juju-core/apiserver-knows-logdir into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2564 |
Proposed branch: | lp:~thumper/juju-core/apiserver-knows-logdir |
Merge into: | lp:~go-bot/juju-core/trunk |
Prerequisite: | lp:~thumper/juju-core/tailer-tweaks |
Diff against target: |
111 lines (+16/-5) 6 files modified
cmd/jujud/machine.go (+3/-1) juju/testing/conn.go (+3/-0) provider/dummy/environs.go (+2/-1) state/apiserver/apiserver.go (+3/-1) state/apiserver/login_test.go (+1/-1) state/apiserver/server_test.go (+4/-1) |
To merge this branch: | bzr merge lp:~thumper/juju-core/apiserver-knows-logdir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+214155@code.launchpad.net |
Commit message
Have the apiserver know the logdir
The agent config now knows the logdir. In some places
the entire agent config is passed through, but in order
to keep the changes small(ish), we only pass through
the logdir (additionally).
This did require a few tweaks to tests, and in particular
the addition of LogDir to the base ConnSuite.
This logdir is used by the upcoming debug-log api.
Description of the change
Have the apiserver know the logdir
The agent config now knows the logdir. In some places
the entire agent config is passed through, but in order
to keep the changes small(ish), we only pass through
the logdir (additionally).
This did require a few tweaks to tests, and in particular
the addition of LogDir to the base ConnSuite.
This logdir is used by the upcoming debug-log api.
Reviewers: mp+214155_ code.launchpad. net,
Message:
Please take a look.
Description:
Have the apiserver know the logdir
The agent config now knows the logdir. In some places
the entire agent config is passed through, but in order
to keep the changes small(ish), we only pass through
the logdir (additionally).
This did require a few tweaks to tests, and in particular
the addition of LogDir to the base ConnSuite.
This logdir is used by the upcoming debug-log api.
https:/ /code.launchpad .net/~thumper/ juju-core/ apiserver- knows-logdir/ +merge/ 214155
Requires: /code.launchpad .net/~thumper/ juju-core/ tailer- tweaks/ +merge/ 214150
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/84350043/
Affected files (+18, -5 lines): machine. go conn.go dummy/environs. go /apiserver. go /login_ test.go /server_ test.go
A [revision details]
M cmd/jujud/
M juju/testing/
M provider/
M state/apiserver
M state/apiserver
M state/apiserver
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/jujud/ machine. go machine. go' machine. go 2014-04-02 12:52:25 +0000 machine. go 2014-04-04 03:48:49 +0000 "configuration does not have state server DataDir( ) NewServer( st, fmt.Sprintf(":%d", port), cert, key, LogDir( ) NewServer( startWorkerAfte rUpgrade( runner, "cleaner", func() (worker.Worker, NewCleaner( st), nil
=== modified file 'cmd/jujud/
--- cmd/jujud/
+++ cmd/jujud/
@@ -381,7 +381,9 @@
return nil, &fatalError{
cert/key"}
}
dataDir := agentConfig.
- return apiserver.
dataDir)
+ logDir := agentConfig.
+ return apiserver.
+ st, fmt.Sprintf(":%d", port), cert, key, dataDir, logDir)
})
a.
error) {
return cleaner.
Index: juju/testing/ conn.go conn.go' conn.go 2014-04-02 01:59:59 +0000 conn.go 2014-04-04 03:48:49 +0000 environ. Name(), gc.Equals, "dummyenv") (&dummy. DataDir, s.DataDir()) &dummy. LogDir, s.LogDir)
=== modified file 'juju/testing/
--- juju/testing/
+++ juju/testing/
@@ -60,6 +60,7 @@
ConfigStore configstore.Storage
BackingState *state.State // The State being used by the API server
RootDir string // The faked-up root directory.
+ LogDir string
oldHome string
oldJujuHome string
environ environs.Environ
@@ -211,6 +212,8 @@
// sanity check we've got the correct environment.
c.Assert(
s.PatchValue
+ s.LogDir = c.MkDir()
+ s.PatchValue(
versions := PreferredDefaul tVersions( environ. Config( ), version.Current)
versions = append(versions, version.Current)
Index: provider/ dummy/environs. go dummy/environs. go' dummy/environs. go 2014-04-03 04:46:51 +0000 dummy/environs. go 2014-04-04 03:48:49 +0000
=== modified file 'provider/
--- provider/
+++ provider/
@@ -501,6 +501,7 @@
// Override for testing - the data directory with which the state api
server is initialised.
var DataDir = ""
+var LogDir = ""
func (e *environ) ecfg() *environCo...