Skip to content
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

Refactor internal API for Pods to match v1beta3 #2097

Merged
merged 1 commit into from
Nov 18, 2014

Conversation

markturansky
Copy link
Contributor

No description provided.

@smarterclayton
Copy link
Contributor

Extracted from #1600

@markturansky markturansky changed the title WIP: Refactor internal API for Pods to match v1beta3 Refactor internal API for Pods to match v1beta3 Nov 3, 2014
@markturansky markturansky changed the title Refactor internal API for Pods to match v1beta3 WIP: Refactor internal API for Pods to match v1beta3 Nov 3, 2014
@bgrant0607
Copy link
Member

Please see #2102 and rebase. Metadata was inlined in the internal object representation, in part in order to make this kind of thing somewhat easier.

@markturansky
Copy link
Contributor Author

@bgrant0607 on it. this pull is a work in progress.

@markturansky
Copy link
Contributor Author

@bgrant0607 pull #2086 is part of the same overall v1beta3 refactor, if you wouldn't mind reviewing it for me.

@markturansky markturansky force-pushed the v1beta3_podrefactor branch 3 times, most recently from a9a3493 to 811288b Compare November 3, 2014 22:15
@bgrant0607
Copy link
Member

#2086 has been merged. Please rebase this.

@smarterclayton
Copy link
Contributor

I'm going to handle replication controllers and pod templates - so you should be able to just focus on the pod aspect.

@smarterclayton
Copy link
Contributor

Also, I'm going to have to deal with a chunk of pod spec conversion so if you hold up a bit on this refactor you'll get some stuff for free. Maybe work on the other objects beyond pod and repl controller?

@smarterclayton
Copy link
Contributor

Watch #2195 for changes to validation and types added (and some roundtrip cleanup).

@markturansky
Copy link
Contributor Author

After yesterday's PodStatus->PodCondition refactor, I was going to tackle pods today. I have much of it done already. Perhaps it will come together quickly for me this morning and be ready for you shortly.

@markturansky markturansky force-pushed the v1beta3_podrefactor branch 6 times, most recently from fb1a781 to 640a57c Compare November 11, 2014 04:27
@markturansky markturansky force-pushed the v1beta3_podrefactor branch 6 times, most recently from f646a09 to 0ff6480 Compare November 13, 2014 17:28
}
pod.DesiredState.Manifest.ID = pod.Name
pod.UID = pod.Name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong and should be removed. FillObjectMetaSystemFields sets UID, you shouldn't be changing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 100 above removed.

@markturansky markturansky force-pushed the v1beta3_podrefactor branch 3 times, most recently from 5904e0e to c3eb248 Compare November 17, 2014 23:16
@@ -92,11 +91,12 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
if !api.ValidNamespace(ctx, &pod.ObjectMeta) {
return nil, errors.NewConflict("pod", pod.Namespace, fmt.Errorf("Pod.Namespace does not match the provided context"))
}
pod.DesiredState.Manifest.UUID = util.NewUUID().String()
api.FillObjectMetaSystemFields(ctx, &pod.ObjectMeta)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was called already on line 104. Please remove that call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Pushed. Rebuilding.

@markturansky markturansky force-pushed the v1beta3_podrefactor branch 2 times, most recently from 88b51fd to fcf27f1 Compare November 18, 2014 00:08
@markturansky
Copy link
Contributor Author

All changes made. Green light.

@smarterclayton
Copy link
Contributor

Did you get a local e2e run?

On Nov 17, 2014, at 7:19 PM, Mark Turansky notifications@github.com wrote:

All changes made. Green light.


Reply to this email directly or view it on GitHub.

@markturansky
Copy link
Contributor Author

It just finished and it just failed:

2014/11/17 19:33:40 Passed tests: [basic.sh goe2e.sh guestbook.sh]
2014/11/17 19:33:40 Failed tests: [services.sh update.sh]

I'll look into it.

@smarterclayton
Copy link
Contributor

Those tend to fail for me in vagrant. If you have a gce account (the free one should cover you) you may want to try that.

On Nov 17, 2014, at 7:34 PM, Mark Turansky notifications@github.com wrote:

It just finished and it just failed:

2014/11/17 19:33:40 Passed tests: [basic.sh goe2e.sh guestbook.sh]
2014/11/17 19:33:40 Failed tests: [services.sh update.sh]
I'll look into it.


Reply to this email directly or view it on GitHub.

@markturansky
Copy link
Contributor Author

David Eads cannot run e2e either. He's running against master and gets the same errors. I don't think the failure above is from me.

@smarterclayton
Copy link
Contributor

LGTM I'll look to merge this today after Brian signs off on it.

On Nov 18, 2014, at 8:31 AM, Mark Turansky notifications@github.com wrote:

David Eads cannot run e2e either. He's running against master and gets the same errors. I don't think the failure above is from me.


Reply to this email directly or view it on GitHub.

@markturansky
Copy link
Contributor Author

Rebased, retested, and rebuilt. Good to go.

@bgrant0607
Copy link
Member

Thanks. LGTM, but my eyes are glazing over. I think we should go ahead and deal with fallout, if any.

@bgrant0607 bgrant0607 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 18, 2014
@markturansky
Copy link
Contributor Author

same here @bgrant0607.

I'm standing by to fix any errors that may arise.

smarterclayton added a commit that referenced this pull request Nov 18, 2014
Refactor internal API for Pods to match v1beta3
@smarterclayton smarterclayton merged commit 1c52460 into kubernetes:master Nov 18, 2014
@smarterclayton
Copy link
Contributor

Incoming

@markturansky
Copy link
Contributor Author

@bgrant0607 @abhgupta I am on it.

@markturansky
Copy link
Contributor Author

see #2503

@smarterclayton
Copy link
Contributor

I'm not sure we want to change these yet, since v1beta3 isn't public. Watch field names should be versioned just like fields (validation errors too, but that's not a short term goal).

----- Original Message -----

@abhgupta pointed out that we missed something:

https://github.com/GoogleCloudPlatform/kubernetes/blob/master/plugin/pkg/scheduler/factory/factory.go#L135
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/plugin/pkg/scheduler/factory/factory.go#L153
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/plugin/pkg/scheduler/factory/factory_test.go#L62
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/plugin/pkg/scheduler/factory/factory_test.go#L67


Reply to this email directly or view it on GitHub:
#2097 (comment)

JoelSpeed pushed a commit to JoelSpeed/kubernetes that referenced this pull request Nov 22, 2024
…erry-pick-2095-to-release-4.17

[release-4.17] OCPBUGS-42427: UPSTREAM: 125398: Fix issue with scheduler failing on hostname mismatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants