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

Issue 8247045: add MachineNonce to agent.Conf and MachineConfig (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by dimitern
Modified:
11 years ago
Reviewers:
mp+157422
Visibility:
Public.

Description

add MachineNonce to agent.Conf and MachineConfig This is the first step towards several incoming CLs about making sure the provisioned machines match the actual instances they're running on. First a MachineNonce is introduced, which will be set be the provisioner and checked by the agents. Here we only add it to a few places, mostly in agent.Conf and MachineConfig (as fields). There are a few TODOs about using fake values for now, until we start using them in the upcoming CLs. https://code.launchpad.net/~dimitern/juju-core/025-add-machinenonce-to-agent-conf-and-machine-config/+merge/157422 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 10

Patch Set 2 : add MachineNonce to agent.Conf and MachineConfig #

Total comments: 4

Patch Set 3 : add MachineNonce to agent.Conf and MachineConfig #

Patch Set 4 : add MachineNonce to agent.Conf and MachineConfig #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -19 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M environs/agent/agent.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M environs/agent/agent_test.go View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 3 chunks +8 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 6 chunks +11 lines, -5 lines 0 comments Download
M environs/ec2/ec2.go View 1 chunk +7 lines, -5 lines 0 comments Download
M environs/openstack/provider.go View 1 chunk +7 lines, -5 lines 0 comments Download
M worker/environ.go View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
dimitern
Please take a look.
11 years ago (2013-04-05 16:03:49 UTC) #1
fwereade
LGTM with a load of deletions :) https://codereview.appspot.com/8247045/diff/1/cmd/jujud/agent_test.go File cmd/jujud/agent_test.go (right): https://codereview.appspot.com/8247045/diff/1/cmd/jujud/agent_test.go#newcode269 cmd/jujud/agent_test.go:269: MachineNonce: "FAKE_NONCE", ...
11 years ago (2013-04-05 17:06:00 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/8247045/diff/1/cmd/jujud/agent_test.go File cmd/jujud/agent_test.go (right): https://codereview.appspot.com/8247045/diff/1/cmd/jujud/agent_test.go#newcode269 cmd/jujud/agent_test.go:269: MachineNonce: "FAKE_NONCE", On 2013/04/05 17:06:00, ...
11 years ago (2013-04-08 09:56:52 UTC) #3
rog
LGTM with a couple of minor points addressed below. https://codereview.appspot.com/8247045/diff/7001/environs/agent/agent_test.go File environs/agent/agent_test.go (right): https://codereview.appspot.com/8247045/diff/7001/environs/agent/agent_test.go#newcode33 environs/agent/agent_test.go:33: ...
11 years ago (2013-04-08 10:40:51 UTC) #4
dimitern
11 years ago (2013-04-08 12:20:58 UTC) #5
*** Submitted:

add MachineNonce to agent.Conf and MachineConfig

This is the first step towards several incoming
CLs about making sure the provisioned machines
match the actual instances they're running on.

First a MachineNonce is introduced, which will
be set be the provisioner and checked by the
agents.

Here we only add it to a few places, mostly in
agent.Conf and MachineConfig (as fields).
There are a few TODOs about using fake values
for now, until we start using them in the
upcoming CLs.

R=fwereade, rog
CC=
https://codereview.appspot.com/8247045

https://codereview.appspot.com/8247045/diff/7001/environs/agent/agent_test.go
File environs/agent/agent_test.go (right):

https://codereview.appspot.com/8247045/diff/7001/environs/agent/agent_test.go...
environs/agent/agent_test.go:33: MachineNonce: "dummy",
On 2013/04/08 10:40:52, rog wrote:
> i think you can omit MachineNonce from most of the below configurations, as
> MongoPort is omitted, for example. i think we probably only need one extra
test
> case to test an extra field, which means less maintenance later if we choose
to
> change MachineNonce.

I removed it from all but the first case, to make sure it passes with it.

https://codereview.appspot.com/8247045/diff/7001/worker/environ.go
File worker/environ.go (right):

https://codereview.appspot.com/8247045/diff/7001/worker/environ.go#newcode12
worker/environ.go:12: var ErrTerminateAgent = errors.New("agent entity should be
terminated")
On 2013/04/08 10:40:52, rog wrote:
> s/entity //

Done.
Sign in to reply to this message.

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