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

OCPBUGS-50534: Fix error messages in available IP code #9503

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rna-afk
Copy link
Contributor

@rna-afk rna-afk commented Feb 20, 2025

Fixing the error messages in the check for available IPs. The error message is always empty since there was no error but there are no IPs available.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 20, 2025
@openshift-ci-robot
Copy link
Contributor

@rna-afk: This pull request references Jira Issue OCPBUGS-50534, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Fixing the error messages in the check for available IPs. The error message is always empty since there was no error but there are no IPs available.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Feb 20, 2025
@openshift-ci openshift-ci bot requested review from jhixson74 and mtulio February 20, 2025 13:55
@@ -296,5 +296,5 @@ func getNextAvailableIP(ctx context.Context, installConfig *installconfig.Instal
}
}
}
return "", fmt.Errorf("failed to get available IP in given machine network: %w", err)
return "", fmt.Errorf("failed to get available IP in given machine network")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we include a reason, for example, no available IP (i.e. same for line 286 above)?

I feel like failed to ... alone could mean some unknown internal error, which might not be descriptive enough :D

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for line 299.
Currently, installer seems always running into line 286 when lack of permissions, maybe add reason what Patrick suggested for line 271?

@rna-afk rna-afk force-pushed the fix_available_ip_error_msg branch from babd7d5 to 759b731 Compare February 24, 2025 08:13
@patrickdillon
Copy link
Contributor

The shared vpc job is permafailing until we have openshift/release#61374, so the silver lining is we can see these changes in the ci test results!

/approve

Copy link
Contributor

openshift-ci bot commented Feb 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

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

The pull request process is described here

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 Feb 24, 2025
@rna-afk
Copy link
Contributor Author

rna-afk commented Feb 24, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 24, 2025
@openshift-ci-robot
Copy link
Contributor

@rna-afk: This pull request references Jira Issue OCPBUGS-50534, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @jinyunma

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from jinyunma February 24, 2025 18:03
@@ -296,5 +296,5 @@ func getNextAvailableIP(ctx context.Context, installConfig *installconfig.Instal
}
}
}
return "", fmt.Errorf("failed to get available IP in given machine network: %w", err)
return "", fmt.Errorf("failed to get available IP in given machine network: this error may be caused by lack of necessary permissions")
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I think here *ipAvail.AvailableIPAddresses is non-empty and we could not find any suitable IP right? How about no available IP or similar?

Copy link
Contributor Author

@rna-afk rna-afk Feb 26, 2025

Choose a reason for hiding this comment

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

There is IP available but at this stage there's no Ip that we can use that's in the machine network so I think it's fine but I am really bad at error messages or commenting so.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, what do you think of using what you just wrote as error message instead (i.e. that is There is IP available but at this stage there's no Ip that we can use that's in the machine network)? Otherwise, LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

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

I realized the wordings in my original question was kinda odd. Your latest commit looks great! 👏🏼

Fixing the error messages in the check for available IPs.
The error message is always empty since there was no error
but there are no IPs available.
@rna-afk rna-afk force-pushed the fix_available_ip_error_msg branch from 759b731 to be7f5b5 Compare February 26, 2025 10:02
@tthvo
Copy link
Contributor

tthvo commented Feb 26, 2025

/lgtm ^-^

Copy link
Contributor

openshift-ci bot commented Feb 26, 2025

@rna-afk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azurestack be7f5b5 link false /test e2e-azurestack
ci/prow/artifacts-images be7f5b5 link true /test artifacts-images
ci/prow/azure-ovn-marketplace-images be7f5b5 link false /test azure-ovn-marketplace-images
ci/prow/e2e-vsphere-static-ovn be7f5b5 link false /test e2e-vsphere-static-ovn
ci/prow/okd-scos-e2e-aws-ovn be7f5b5 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-vsphere-ovn-multi-network be7f5b5 link false /test e2e-vsphere-ovn-multi-network
ci/prow/e2e-azure-ovn be7f5b5 link true /test e2e-azure-ovn

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@tthvo
Copy link
Contributor

tthvo commented Feb 26, 2025

/lgtm
/retest-required

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2025
@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-50534, which is valid.

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

Requesting review from QA contact:
/cc @jinyunma

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

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 openshift-eng/jira-lifecycle-plugin repository.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants