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

USHIFT-5381: Check microshift.service for all healthchecks #4538

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

Conversation

pmtk
Copy link
Member

@pmtk pmtk commented Feb 12, 2025

If microshift optional RPMs were installed, but microshift is not enabled, primary healthcheck will exit early without an error.

This doesn't hold for other healthchecks - there's no check if microshift.service is enabled, it just proceeds to querying the API server.

Result is that optional healthchecks fail greenboot even if MicroShift is disabled.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 12, 2025

@pmtk: This pull request references USHIFT-5381 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.

In response to this:

If microshift optional RPMs were installed, but microshift is not enabled, primary healthcheck will exit early without an error.

This doesn't hold for other healthchecks - there's no check if microshift.service is enabled, it just proceeds to querying the API server.

Result is that optional healthchecks fail greenboot even if MicroShift is disabled.

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/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 12, 2025
@openshift-ci openshift-ci bot requested review from jogeo and vanhalenar February 12, 2025 07:42
Copy link
Contributor

openshift-ci bot commented Feb 12, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pmtk

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 12, 2025
@ggiguash
Copy link
Contributor

@pmtk , should we add a test for this in the optionals suite?

@pmtk pmtk force-pushed the check-service-for-all-healthchecks branch from 4ce8bc9 to 858a6bf Compare February 13, 2025 11:00
Copy link
Contributor

openshift-ci bot commented Feb 13, 2025

@pmtk: all tests passed!

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.

[Setup] Disable MicroShift
${before}= Get Current Date
${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command
... /etc/greenboot/check/required.d/41_microshift_running_check_multus.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do this for all the scripts in that directory except the main one?

Should Contain ${stderr} microshift.service is not enabled
${diff}= Subtract Date From Date ${after} ${before}
# Verify that the command returned very quickly - it didn't waste time trying to access API Server.
Should Be True ${diff} < 5 Multus healthcheck script took too long to finish
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the time check? Is getting the right error message not enough?

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-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants