Skip to content

Bug 1449908 - Group replica sets by owner reference #1553

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

Merged
merged 1 commit into from
May 18, 2017

Conversation

spadgett
Copy link
Member

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1449908

Use owner references to decide if a replica set is owned by a deployment. Change maps to use deployment UID instead of deployment name. This avoids problems when a deployment is deleted and another is created with the same name.

openshift web console 2017-05-17 12-09-50

@@ -1195,13 +1197,13 @@ function OverviewController($scope,
group: "extensions",
resource: "deployments"
}, context, function(deploymentData) {
overview.deployments = deploymentData.by('metadata.name');
overview.deploymentsByUID = deploymentData.by('metadata.uid');
Copy link
Member

Choose a reason for hiding this comment

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

this isnt new, but were we not sorting deployments before? how is it being ordered when you are looking at the by Resource Type view?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like an oversight and they weren't sorted.

Copy link
Member

Choose a reason for hiding this comment

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

can you open an issue for this so we dont lose track of it

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened #1555

groupByControllerUID: function(apiObjects) {
return _.groupBy(apiObjects, function(apiObject) {
var ownerRefs = getOwnerReferences(apiObject);
var controllerRef = _.find(ownerRefs, { controller: true });
Copy link
Member

Choose a reason for hiding this comment

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

is it possible (in theory) for more than one controller to claim ownership, if that were the case you would want the item to appear under each group and not just the first one you find. Would be curious if the API prevents you from having more than one ownerRef with controller true. Could try manually adding an ownerRef on a pod that points to a random controller that exists.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1449908

Use owner references to decide if a replica set is owned by a
deployment. Change maps to use deployment UID instead of deployment
name. This avoids problems when a deployment is deleted and another is
created with the same name.
@spadgett spadgett force-pushed the replica-set-owner-refs branch from 12aab5d to f4abfc2 Compare May 18, 2017 13:52
@spadgett
Copy link
Member Author

@jwforres updated

@jwforres
Copy link
Member

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to f4abfc2

@openshift-bot
Copy link

openshift-bot commented May 18, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1378/) (Base Commit: 6f33bb4)

@openshift-bot openshift-bot merged commit 33acb3c into openshift:master May 18, 2017
@spadgett spadgett deleted the replica-set-owner-refs branch May 18, 2017 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants