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

Bug 1820401: daemon: better way to find installed kernel-rt packages on host #1612

Merged
merged 1 commit into from Apr 3, 2020

Conversation

sinnykumari
Copy link
Contributor

@sinnykumari sinnykumari commented Apr 3, 2020

Initially we were relying on fixed set of kernel-rt
sub-packages which will be installed on the system. This can cause
issues when machine-os-content ships additional kernel-rt
sub-packages.

To solve this, we now query host with
rpm-ostree status --json and look for requested-local-packages
in the 0th index from available deployments list.

Fixes bug - https://bugzilla.redhat.com/show_bug.cgi?id=1820401

@sinnykumari
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 3, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 3, 2020
@sinnykumari sinnykumari force-pushed the master branch 2 times, most recently from 35d5999 to 9dd6816 Compare April 3, 2020 13:03
@sinnykumari sinnykumari changed the title [WIP] daemon: better way to find installed kernel-rt packages on host Bug 1820401: daemon: better way to find installed kernel-rt packages on host Apr 3, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2020
@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Bugzilla bug 1820401, 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.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1820401: daemon: better way to find installed kernel-rt packages on host

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-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 3, 2020
@sinnykumari
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2020
pkg/daemon/update.go Outdated Show resolved Hide resolved
@runcom
Copy link
Member

runcom commented Apr 3, 2020

Just a nit @cgwalters ptal as well if you have some time

/approve

@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Bugzilla bug 1820401, which is valid.

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

In response to this:

Bug 1820401: daemon: better way to find installed kernel-rt packages on host

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.

pkg/daemon/update.go Outdated Show resolved Hide resolved
Initially we were relying on fixed set of kernel-rt
sub-packages which will be installed on the system. This can cause
issues when machine-os-content ships additional kernel-rt
sub-packages.

To solve this, we now query host with
`rpm-ostree status --json` and look for requested-local-packages
in the 0th index from available deployments list.

Fixes: RHBZ#1820401
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Overall this is fine to merge as is if it's fixing CI. But, a few comments that could be done as followup.
Nice work on this!


rtRegex := regexp.MustCompile("kernel-rt-.*")
for _, localPkg := range rpms.Deployments[0].RequestedLocalPkgs {
if rtRegex.MatchString(localPkg) {
Copy link
Member

Choose a reason for hiding this comment

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

This could just be strings.HasPrefix(localPkg, "kernel-rt-"). But fine as is too.

@@ -50,6 +50,38 @@ const (
realtimeKernelType = "realtime"
)

// HostInfo contains information of an OSTree based system
type HostInfo struct {
Copy link
Member

Choose a reason for hiding this comment

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

We already have rpmOstreeState in rpm-ostree.go; would be good to share code there.

@sinnykumari
Copy link
Contributor Author

Thanks Colin for review! Agree with you to unblock the CI test first. Will address the review comments in follow-up PR

@sinnykumari
Copy link
Contributor Author

/retest

1 similar comment
@sinnykumari
Copy link
Contributor Author

/retest

@sinnykumari
Copy link
Contributor Author

ugh, these failing ci tests

@sinnykumari
Copy link
Contributor Author

/retest

1 similar comment
@sinnykumari
Copy link
Contributor Author

/retest

@runcom
Copy link
Member

runcom commented Apr 3, 2020

/lgtm

let's address Colin's address in a follow up!

@runcom
Copy link
Member

runcom commented Apr 3, 2020

maybe...

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2020
@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, runcom, sinnykumari

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:
  • OWNERS [cgwalters,runcom,sinnykumari]

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

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 3, 2020

@sinnykumari: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 3c70e22 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@runcom
Copy link
Member

runcom commented Apr 3, 2020

/skip

@sinnykumari
Copy link
Contributor Author

Checked into live cluster from e2e-gcp-op CI test run, kernelType test went fine. e2-gcp-op test should finish fine

@openshift-merge-robot openshift-merge-robot merged commit 0ce063b into openshift:master Apr 3, 2020
@openshift-ci-robot
Copy link
Contributor

@sinnykumari: All pull requests linked via external trackers have merged: openshift/machine-config-operator#1612. Bugzilla bug 1820401 has been moved to the MODIFIED state.

In response to this:

Bug 1820401: daemon: better way to find installed kernel-rt packages on host

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.

sinnykumari added a commit to sinnykumari/machine-config-operator that referenced this pull request Apr 15, 2020
… info

Make GetBootedDeployment() function from rpm-ostree.go public
so that it can be reused. Also update test accordingly.

Follow-up from PR openshift#1612
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/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.

None yet

6 participants