-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure pod and manifest have a UUID in apiserver #345
Conversation
@@ -96,7 +100,7 @@ func (storage *ControllerRegistryStorage) Update(obj interface{}) (<-chan interf | |||
if !ok { | |||
return nil, fmt.Errorf("not a replication controller: %#v", obj) | |||
} | |||
if controller.ID == "" { | |||
if len(controller.ID) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care which way it is, but only change this if you think it's clearer; don't do it as an optimization... http://stackoverflow.com/questions/18594330/the-best-way-to-test-for-an-empty-string-in-go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was just cleaning the file as I went. I saw len() and it seemed more broadly used.
Aside from a few comments, this LGTM. Thanks for this change, it should go a long ways towards making our IDs sensible! |
Thanks for the PR! LGTM, modulo Daniel's comments. |
I have a small request: Would you please run the race detector first? Or could we wait for #348 getting merged? I'm sorry, after fixing data races for two days, I think it might be better to make sure the code could pass the race detector before merging it. |
@monnand no additional data races reported (other than the existing one in TestWatchControllers) |
I'm unclear on what exactly JSONBase.ID is supposed to represent. Is it a globally unique ID for each api-managed object? Is it a transaction ID? Something in-between? I'm also finding it hard to think about this change because I am still mulling the other discussion about the different forms of name and ID. It feels weird that ID is in JSONBase for some objects and not others. I'm not blocking this change at this point, but I feel like I don't quite get it yet. Something somewhere has not clicked for me :) |
I intended ID to be a unique GUID that identifies a particular type of resource in the system. So all Pods should have unique ID, all replication controllers should have unique ID (though a replication controller and a pod might have the same id, since they're in different namespaces) as far as I intended, it is not a transaction ID, except in the case of an ServerOp, and even their it is a GUID, its just a GUID for an object that represents a transaction. I think its different than the name of a container inside a pod, for example, since that is a semantic construct used for identifying (and possibly for DNS allocation, etc), but will never be used by the API itself to reference to anything. For a while, I actually had ID (GUID) and Name (semantic identifier) but that actually got too confusing, so I ripped out Name... |
Should we use JSONBase.ID instead of structure-specific IDs with Or put another way, the ContainerManifest does not include JSONBase. On Thu, Jul 3, 2014 at 2:25 PM, brendandburns notifications@github.com
|
This implies to me that ContainerManifest should not have an ID - it was a temporary issue that the presence of a pod uuid resolves, so I marked it as deprecated in the latest commit. Now, if ContainerManifest becomes an API resource as commented in another issue, I think we would want to make it a JSON base. |
Yeah, we have some confusion between what is a pod and what is a manifest. Brendan and I were discussing separating the objects based on point-of-view Got time to do a hangout this week maybe? On Sat, Jul 5, 2014 at 10:35 AM, Clayton Coleman notifications@github.com
|
Sure - I had started to take a stab at what it would take to abstract the kubelet from a direct etcd dependency in #356 and noted the same thing. Would be good to go over the options in a hangout. |
You're east-coast time, right? Tuesday afternoon (your time, after 11:00a California time) is open for For anyone else, this is not a private meeting, but we would like to focus On Sun, Jul 6, 2014 at 8:53 PM, Clayton Coleman notifications@github.com
|
I'd be down to join a hangout, though I'm not sure how much I have to contribute at this point |
Let's try 2pm EDT on Tuesday |
I will post a hangout link on this thread. Proposed topics: API structure split: master vs slave On Mon, Jul 7, 2014 at 6:29 AM, Clayton Coleman notifications@github.com
|
https://plus.google.com/hangouts/_/grkrl7elarpergdg6ksepxjclea I hope this works - never set up a public hangout before. On Mon, Jul 7, 2014 at 11:35 AM, Tim Hockin thockin@google.com wrote:
|
Link says the party is over |
try https://plus.google.com/hangouts/_/g6eqprge2izsz3xmvubuajky2ua On Tue, Jul 8, 2014 at 11:01 AM, Tony Worm notifications@github.com wrote:
|
Notes from this discussion:
We all agreed in general that we should differentiate top-level API Google will find someone to work on this issue.
We all agreed in general that we need to start versioning the APIs and Nobody volunteered to work on this, so Google will find someone if possible
We agreed on the following:
We did not discuss, but previously agreed on:
We agreed to not have the following:
I'll write this up more fully in PR #349. Clayton is working on this. Thanks everyone. way faster than email. Tim On Mon, Jul 7, 2014 at 11:35 AM, Tim Hockin thockin@google.com wrote:
|
For the purposes of this pull, I think the change here fits within the agreed direction and is merely an incremental step towards it (accordingly I marked ContainerManifest.ID as deprecated). Disagreement? If no could use a final rereview and merge. |
LGTM - resolve conflicts or whatever is causing "We can’t automatically merge this pull request" |
* Fixes implication #2 in docs/identifiers.md * Replication controller lets the apiserver set the pod ID
@thockin ptal |
Ensure pod and manifest have a UUID in apiserver
Added HTTP Auth and HTTP Digest authentication kubernetes#302
Format Node Component, Scheduling, and API Machinery sections.
…r-scheduler-plugin bug 1874920: Revert "bug 1874919: UPSTREAM: 94423: debugger scheduler plugin"
Also has replication controller allow apiserver to automatically assign a UUID
Continues #253 and #199