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

Issue 10447045: Add machine instance metadata to state (Closed)

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

Description

Add machine instance metadata to state When a machine is provisioned, it is assigned an instance id and also has characteristics like mem, cores etc. This branch allows for this metadata to be stored in state in a new machineMetadata document. The machineMetadata and machine document share the same primary key. The InstanceId and Nonce attributes are pulled off machine and stored with the rest of the instance metadata. Backwards comnpatibility is retained until schema upgrades are possible. https://code.launchpad.net/~wallyworld/juju-core/instance-metadata-in-state/+merge/170740 Requires: https://code.launchpad.net/~wallyworld/juju-core/tweak-instance-metadata-api/+merge/170483 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 39

Patch Set 2 : Add machine instance metadata to state #

Total comments: 2

Patch Set 3 : Add machine instance metadata to state #

Total comments: 24

Patch Set 4 : Add machine instance metadata to state #

Total comments: 37

Patch Set 5 : Add machine instance metadata to state #

Total comments: 2

Patch Set 6 : Add machine instance metadata to state #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+440 lines, -153 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/ssh.go View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M cmd/juju/ssh_test.go View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M cmd/juju/status.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M cmd/juju/status_test.go View 1 3 chunks +6 lines, -6 lines 0 comments Download
M cmd/jujud/bootstrap_test.go View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M environs/jujutest/livetests.go View 1 2 3 4 5 5 chunks +11 lines, -9 lines 0 comments Download
M state/apiserver/client/api_test.go View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M state/apiserver/client/client.go View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M state/apiserver/client/client_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/server_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M state/export_test.go View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M state/machine.go View 1 2 3 4 5 9 chunks +120 lines, -19 lines 1 comment Download
M state/machine_test.go View 1 2 3 4 5 9 chunks +64 lines, -31 lines 0 comments Download
M state/megawatcher.go View 1 2 3 3 chunks +13 lines, -3 lines 0 comments Download
M state/megawatcher_internal_test.go View 1 2 3 5 chunks +7 lines, -5 lines 0 comments Download
M state/open.go View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M state/state.go View 1 2 3 4 5 8 chunks +32 lines, -9 lines 2 comments Download
M state/state_test.go View 1 2 3 4 5 7 chunks +39 lines, -7 lines 0 comments Download
M state/unit.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M state/unit_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M state/watcher.go View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M worker/deployer/deployer_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M worker/firewaller/firewaller.go View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M worker/firewaller/firewaller_test.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M worker/provisioner/provisioner_task.go View 1 2 3 4 5 6 chunks +16 lines, -7 lines 0 comments Download
M worker/provisioner/provisioner_test.go View 1 2 3 4 5 21 chunks +74 lines, -26 lines 0 comments Download
M worker/uniter/filter_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M worker/uniter/uniter_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20
wallyworld
Please take a look.
10 years, 10 months ago (2013-06-21 06:09:23 UTC) #1
fwereade
Not there yet, I think -- let me know your thoughts on the below. https://codereview.appspot.com/10447045/diff/1/state/machine.go ...
10 years, 10 months ago (2013-06-21 11:14:52 UTC) #2
wallyworld
I'd very much like to keep InstanceId and Nonce off machine and bundled with the ...
10 years, 10 months ago (2013-06-25 01:28:48 UTC) #3
thumper
https://codereview.appspot.com/10447045/diff/1/state/machine.go File state/machine.go (left): https://codereview.appspot.com/10447045/diff/1/state/machine.go#oldcode66 state/machine.go:66: Clean bool If we are moving Nonce and InstanceId ...
10 years, 10 months ago (2013-06-25 01:46:25 UTC) #4
wallyworld
Please take a look. https://codereview.appspot.com/10447045/diff/1/state/machine.go File state/machine.go (left): https://codereview.appspot.com/10447045/diff/1/state/machine.go#oldcode66 state/machine.go:66: Clean bool On 2013/06/25 01:46:25, ...
10 years, 10 months ago (2013-06-26 04:57:21 UTC) #5
fwereade
I'm still cutting up rough about the field move I'm afraid. Might be up lateish ...
10 years, 10 months ago (2013-06-26 16:56:31 UTC) #6
fwereade
whoops, one more comment I forgot to make https://codereview.appspot.com/10447045/diff/10001/state/watcher.go File state/watcher.go (right): https://codereview.appspot.com/10447045/diff/10001/state/watcher.go#newcode1062 state/watcher.go:1062: return ...
10 years, 10 months ago (2013-06-26 16:58:36 UTC) #7
wallyworld
https://codereview.appspot.com/10447045/diff/10001/state/watcher.go File state/watcher.go (right): https://codereview.appspot.com/10447045/diff/10001/state/watcher.go#newcode1062 state/watcher.go:1062: return newEntityWatcher(m.st, m.st.instanceData.Name, m.doc.Id, txnRevNo), nil On 2013/06/26 16:58:36, ...
10 years, 10 months ago (2013-06-26 23:12:55 UTC) #8
wallyworld
> > https://codereview.appspot.com/10447045/diff/1/state/machine.go#newcode120 > state/machine.go:120: TxnRevno int64 `bson:"txn-revno"` > On 2013/06/25 01:28:48, wallyworld wrote: > ...
10 years, 10 months ago (2013-06-27 04:02:39 UTC) #9
wallyworld
Something has screwed up the diffs and comments (some of my earlier comments are missing). ...
10 years, 10 months ago (2013-06-27 04:04:51 UTC) #10
wallyworld
Please take a look.
10 years, 10 months ago (2013-06-27 04:16:24 UTC) #11
fwereade
Very close, let me know what you think about these... https://codereview.appspot.com/10447045/diff/19001/cmd/juju/ssh.go File cmd/juju/ssh.go (right): https://codereview.appspot.com/10447045/diff/19001/cmd/juju/ssh.go#newcode119 ...
10 years, 10 months ago (2013-06-27 10:25:25 UTC) #12
wallyworld
Please take a look. https://codereview.appspot.com/10447045/diff/19001/cmd/juju/ssh.go File cmd/juju/ssh.go (right): https://codereview.appspot.com/10447045/diff/19001/cmd/juju/ssh.go#newcode119 cmd/juju/ssh.go:119: // https://bugs.launchpad.net/juju-core/+bug/1130051 On 2013/06/27 10:25:26, ...
10 years, 10 months ago (2013-06-27 13:43:07 UTC) #13
fwereade
Sorry, more nitpicking; thank you for putting up with all this. The only really critical ...
10 years, 10 months ago (2013-06-27 23:14:56 UTC) #14
thumper
All niggles, but nothing that will block landing once William is happy. LGTM https://codereview.appspot.com/10447045/diff/27001/cmd/juju/ssh.go File ...
10 years, 10 months ago (2013-06-28 05:07:33 UTC) #15
wallyworld
Please take a look. https://codereview.appspot.com/10447045/diff/27001/cmd/juju/ssh.go File cmd/juju/ssh.go (right): https://codereview.appspot.com/10447045/diff/27001/cmd/juju/ssh.go#newcode114 cmd/juju/ssh.go:114: } else if !state.IsNotProvisionedError(err) { ...
10 years, 10 months ago (2013-06-28 05:51:21 UTC) #16
fwereade
https://codereview.appspot.com/10447045/diff/27001/cmd/jujud/machine_test.go File cmd/jujud/machine_test.go (right): https://codereview.appspot.com/10447045/diff/27001/cmd/jujud/machine_test.go#newcode251 cmd/jujud/machine_test.go:251: c.Check(err, FitsTypeOf, notProvisionedError) On 2013/06/28 05:51:21, wallyworld wrote: > ...
10 years, 10 months ago (2013-06-28 08:07:50 UTC) #17
wallyworld
Please take a look. https://codereview.appspot.com/10447045/diff/27001/cmd/jujud/machine_test.go File cmd/jujud/machine_test.go (right): https://codereview.appspot.com/10447045/diff/27001/cmd/jujud/machine_test.go#newcode251 cmd/jujud/machine_test.go:251: c.Check(err, FitsTypeOf, notProvisionedError) On 2013/06/28 ...
10 years, 10 months ago (2013-06-28 12:49:05 UTC) #18
fwereade
LGTM with the below fixes https://codereview.appspot.com/10447045/diff/37002/state/machine.go File state/machine.go (right): https://codereview.appspot.com/10447045/diff/37002/state/machine.go#newcode610 state/machine.go:610: return m.doc.Nonce == nonce ...
10 years, 10 months ago (2013-06-28 13:08:58 UTC) #19
wallyworld
10 years, 10 months ago (2013-06-30 23:34:59 UTC) #20
https://codereview.appspot.com/10447045/diff/37002/state/state.go
File state/state.go (right):

https://codereview.appspot.com/10447045/diff/37002/state/state.go#newcode362
state/state.go:362: Series: params.Series,
On 2013/06/28 13:08:58, fwereade wrote:
> This needs InstanceId as well for compatibility, I think.

I realise looking at this code that despite what was done when it was first
written, instanceId isn't needed here. InstanceId is used by InjectMachine when
setting up the bootstrap node in state, but isn't needed when creating a new
parent machine for a new container. Similarly, instanceId isn't needed when
creating a new container machine doc below. The above is true for current use
cases. If this ever changes, we will already be at the point where the new
instance metadata is in use.
Sign in to reply to this message.

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