Skip to content

Conversation

@ardaguclu
Copy link
Member

To extract pod's host IP address, CBO tries to list pods in here

podList, err := podClient.Pods(targetNamespace).List(context.Background(), listOptions)

However, CBO does not have allowance to list pods. This PR adds this.

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

@openshift-ci openshift-ci bot requested review from andfasano and sadasu December 23, 2021 10:59
@ardaguclu ardaguclu changed the title Add pod listing permission to extract pod host IP Bug 2035239: Add pod listing permission to extract pod host IP Dec 23, 2021
@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Dec 23, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 23, 2021

@ardaguclu: This pull request references Bugzilla bug 2035239, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (augol@redhat.com), skipping review request.

Details

In response to this:

Bug 2035239: Add pod listing permission to extract pod host IP

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@andfasano
Copy link
Contributor

/test e2e-metal-ipi-virtualmedia

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

func getPodHostIP(podClient coreclientv1.PodsGetter, targetNamespace string) (string, error) {
listOptions := metav1.ListOptions{
LabelSelector: metal3AppName,
FieldSelector: "status.hostIP",
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this because it failed with;

 invalid selector: 'status.hostIP'; can't understand 'status.hostIP'" "name"="provisioning-configuration"

Maybe it is because of lack of get permission but I did this change for a quick fix

Copy link
Contributor

Choose a reason for hiding this comment

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

As an additional safety measure, can you please also verify that len(podList.Items) == 1 instead of > 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you think for the latest version @andfasano ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, it seems ok, let's see the virtualmedia job

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

1 similar comment
@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

@ardaguclu
Copy link
Member Author

/test e2e-agnostic

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi

@ardaguclu
Copy link
Member Author

/test e2e-agnostic

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-virtualmedia

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 24, 2021

@ardaguclu: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@andfasano
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 24, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano, ardaguclu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 24, 2021
@elfosardo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 24, 2021
@openshift-merge-robot openshift-merge-robot merged commit 7f9a818 into openshift:master Dec 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 24, 2021

@ardaguclu: All pull requests linked via external trackers have merged:

Bugzilla bug 2035239 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2035239: Add pod listing permission to extract pod host IP

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

zaneb added a commit to zaneb/cluster-baremetal-operator that referenced this pull request Jan 7, 2022
Even if there is no metal3 Pod up and therefore we cannot find its IP
address, we still want to create the image-customization-controller with
an empty ironic IP address.

This is documented in a comment at the site where getPodHostIP() is
called, but not in the implementation, so it was inadvertently broken
by openshift#225.
@ardaguclu ardaguclu deleted the add-pods-list-rbac branch January 25, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants