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-19018: use $CPE_NAME to find the OS major version #2003

Merged
merged 1 commit into from Sep 21, 2023

Conversation

derekhiggins
Copy link
Contributor

RHEL_VERSION isn't present in scos

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 14, 2023
@openshift-ci-robot
Copy link
Contributor

@derekhiggins: This pull request references Jira Issue OCPBUGS-19018, which is invalid:

  • expected the bug to target the "4.15.0" version, but it targets "4.15" 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:

RHEL_VERSION isn't present in scos

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.

@LorbusChris
Copy link
Member

Maybe it'd be a bit clearer to separate the rhcos and scos cases here, OTOH it probably doesn't matter.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2023
@LorbusChris
Copy link
Member

/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 Sep 14, 2023
@openshift-ci-robot
Copy link
Contributor

@LorbusChris: This pull request references Jira Issue OCPBUGS-19018, 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.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

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 kubernetes/test-infra repository.

@derekhiggins
Copy link
Contributor Author

/retest-required
/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Sep 15, 2023
@trozet
Copy link
Contributor

trozet commented Sep 15, 2023

@derekhiggins what does scos mean? What is the CPE_NAME variable?

@LorbusChris
Copy link
Member

SCOS == CentOS Stream CoreOS
CPE == Common Platform Enumeration (i.e. a stable tag)

The CPE_NAME is from /usr/lib/os-release, i.e. on SCOS it's CPE_NAME="cpe:/o:centos:centos:9::coreos"

I wouldn't mind using the CPE_NAME only on SCOS, and leaving the RHCOS case as-is.

@derekhiggins
Copy link
Contributor Author

I wouldn't mind using the CPE_NAME only on SCOS, and leaving the RHCOS case as-is.

I can do this, but it would require that I duplicate the sed line to remove the minor version

   rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')

I know the minor version isn't in this part of the CPE but it was in the past https://access.redhat.com/solutions/6564691

Copy link
Contributor

@trozet trozet left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2023
@@ -39,6 +39,8 @@ data:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
IFS=':' read -ra parts <<< "$CPE_NAME"
Copy link
Member

Choose a reason for hiding this comment

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

probably a non-issue but should this be

Suggested change
IFS=':' read -ra parts <<< "$CPE_NAME"
local IFS=':' read -ra parts <<< "$CPE_NAME"

so the changed IFS doesn't leak?

Copy link
Member

Choose a reason for hiding this comment

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

Quoting @trozet:

probably, and should probably be in its own function

Let's address this
/hold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, I didn't think it would leak because its being set inline, but may IFS is special, either way I could just use

echo $CPE_NAME | cut -f 4 -d :

like the lines below

Copy link
Member

Choose a reason for hiding this comment

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

I think you may be right about the inline setting of IFS here.

Nonetheless, I personally find using cut easier to understand. Mind 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.

Done, I'd have used cut in the first place if I noticed the pattern already being used in the file...

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 19, 2023
@LorbusChris
Copy link
Member

/lgtm cancel

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2023
RHEL_VERSION isn't present in scos, but $CPE_NAME
is present in /etc/os-release on both distros.
@LorbusChris
Copy link
Member

/lgtm

I'll leave it to @trozet to lift the hold

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekhiggins, LorbusChris, trozet

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

@derekhiggins
Copy link
Contributor Author

/retest-required

@LorbusChris
Copy link
Member

/cherrypick release-4.14

@openshift-cherrypick-robot

@LorbusChris: once the present PR merges, I will cherry-pick it on top of release-4.14 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.14

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.

@LorbusChris
Copy link
Member

I've got the green light from Tim
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 20, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5d189ed and 2 for PR HEAD 9f83883 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 46a89bf and 1 for PR HEAD 9f83883 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 21, 2023

@derekhiggins: 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-ovn-hybrid-step-registry 9f83883 link false /test e2e-ovn-hybrid-step-registry
ci/prow/e2e-vsphere-ovn 9f83883 link false /test e2e-vsphere-ovn
ci/prow/e2e-aws-ovn-single-node 9f83883 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-ovn-step-registry 9f83883 link false /test e2e-ovn-step-registry
ci/prow/e2e-network-mtu-migration-sdn-ipv4 9f83883 link false /test e2e-network-mtu-migration-sdn-ipv4
ci/prow/e2e-azure-ovn 9f83883 link false /test e2e-azure-ovn
ci/prow/e2e-network-mtu-migration-ovn-ipv6 9f83883 link false /test e2e-network-mtu-migration-ovn-ipv6
ci/prow/e2e-aws-hypershift-ovn-kubevirt 9f83883 link false /test e2e-aws-hypershift-ovn-kubevirt
ci/prow/e2e-aws-ovn-serial 9f83883 link false /test e2e-aws-ovn-serial
ci/prow/e2e-openstack-sdn 9f83883 link false /test e2e-openstack-sdn
ci/prow/e2e-vsphere-ovn-dualstack 9f83883 link false /test e2e-vsphere-ovn-dualstack
ci/prow/e2e-metal-ipi-ovn-ipv6-ipsec 9f83883 link false /test e2e-metal-ipi-ovn-ipv6-ipsec
ci/prow/e2e-aws-ovn-shared-to-local-gateway-mode-migration-periodic 9f83883 link false /test e2e-aws-ovn-shared-to-local-gateway-mode-migration-periodic
ci/prow/e2e-network-mtu-migration-ovn-ipv4 9f83883 link false /test e2e-network-mtu-migration-ovn-ipv4
ci/prow/e2e-aws-sdn-upgrade 9f83883 link false /test e2e-aws-sdn-upgrade
ci/prow/e2e-ovn-ipsec-step-registry 9f83883 link false /test e2e-ovn-ipsec-step-registry
ci/prow/e2e-openstack-ovn 9f83883 link false /test e2e-openstack-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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 6888ace into openshift:master Sep 21, 2023
16 of 33 checks passed
@openshift-ci-robot
Copy link
Contributor

@derekhiggins: Jira Issue OCPBUGS-19018: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-19018 has been moved to the MODIFIED state.

In response to this:

RHEL_VERSION isn't present in scos

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.

@openshift-cherrypick-robot

@LorbusChris: new pull request created: #2017

In response to this:

/cherrypick release-4.14

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.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.15.0-0.nightly-2023-09-27-073353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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.

None yet

6 participants