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

Issue 57600043: Add a worker to keep disk files up to date

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by thumper
Modified:
10 years, 3 months ago
Reviewers:
mp+203460, wallyworld
Visibility:
Public.

Description

Add a worker to keep disk files up to date Added the machine environment worker which watches the environment config and will write changes to the disk as needed. A new end point was added on the client and server side that is just called "Environment", which provies the common environment watcher. The only gotcha in this is that if the worker is running on machine 0 for a local provider, it shouldn't attempt to modify system files. There are tests for this. The two files on disk that are currently being kept up to date with this are: /home/ubuntu/.juju-proxy /etc/apt/apt.conf.d/42-juju-proxy-settings https://code.launchpad.net/~thumper/juju-core/machine-worker/+merge/203460 Requires: https://code.launchpad.net/~thumper/juju-core/fix-uniter-proxy-env-vars/+merge/203459 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 18

Patch Set 2 : Add a worker to keep disk files up to date #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+642 lines, -1 line) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine.go View 2 chunks +4 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 4 chunks +45 lines, -0 lines 1 comment Download
M environs/cloudinit/cloudinit.go View 1 chunk +1 line, -1 line 0 comments Download
A state/api/environment/environment.go View 1 chunk +23 lines, -0 lines 0 comments Download
A state/api/environment/environment_test.go View 1 chunk +30 lines, -0 lines 0 comments Download
A state/api/environment/package_test.go View 1 chunk +14 lines, -0 lines 0 comments Download
M state/api/state.go View 2 chunks +6 lines, -0 lines 0 comments Download
A state/apiserver/environment/environment.go View 1 chunk +25 lines, -0 lines 0 comments Download
A state/apiserver/environment/environment_test.go View 1 chunk +53 lines, -0 lines 0 comments Download
A state/apiserver/environment/package_test.go View 1 chunk +14 lines, -0 lines 0 comments Download
M state/apiserver/root.go View 2 chunks +12 lines, -0 lines 0 comments Download
M utils/apt.go View 1 chunk +4 lines, -0 lines 0 comments Download
A worker/machineenvironmentworker/machineenvironmentworker.go View 1 1 chunk +173 lines, -0 lines 0 comments Download
A worker/machineenvironmentworker/machineenvironmentworker_test.go View 1 chunk +222 lines, -0 lines 0 comments Download
A worker/machineenvironmentworker/package_test.go View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 4
thumper
Please take a look.
10 years, 3 months ago (2014-01-28 04:00:26 UTC) #1
wallyworld
Looks pretty good but we need a juju/machine_test to test that the jujud has started ...
10 years, 3 months ago (2014-01-28 04:44:50 UTC) #2
thumper
Please take a look. https://codereview.appspot.com/57600043/diff/1/worker/machineenvironmentworker/machineenvironmentworker.go File worker/machineenvironmentworker/machineenvironmentworker.go (right): https://codereview.appspot.com/57600043/diff/1/worker/machineenvironmentworker/machineenvironmentworker.go#newcode30 worker/machineenvironmentworker/machineenvironmentworker.go:30: ProxyDirectory = "/home/ubuntu" On 2014/01/28 ...
10 years, 3 months ago (2014-01-29 03:27:41 UTC) #3
wallyworld
10 years, 3 months ago (2014-01-29 03:35:56 UTC) #4
LGTM, thanks for the extra code comments, especially for first. Makes it much
clearer for the casual reader.

https://codereview.appspot.com/57600043/diff/20001/cmd/jujud/machine_test.go
File cmd/jujud/machine_test.go (right):

https://codereview.appspot.com/57600043/diff/20001/cmd/jujud/machine_test.go#...
cmd/jujud/machine_test.go:80: s.PatchValue(&utils.AptConfFile,
filepath.Join(s.proxyDir, "juju-apt-proxy"))
Small nitpick, feel free to ignore - these set up steps are only for one
specific test and not for the tests in general. My preference would be just to
have them in the one test that needs them.
Sign in to reply to this message.

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