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 1918440: daemon: add check before updating kernelArgs #2349

Merged
merged 2 commits into from Jan 21, 2021

Conversation

sinnykumari
Copy link
Contributor

@sinnykumari sinnykumari commented Jan 20, 2021

Today we are unnecessarily calling updateKernelArguments() even when there is no kargs to apply. This doesn't fixes bug 1916169 but discovered in https://bugzilla.redhat.com/show_bug.cgi?id=1916169#c8.
If needed, can file a new bug but for now getting it in as part of BZ#1916169

Update: Created a new bug to track it separately.

@sinnykumari sinnykumari changed the title daemon: add check before updating kernelArgs Bug 1916169: daemon: add check before updating kernelArgs Jan 20, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Bugzilla bug 1916169, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

Bug 1916169: daemon: add check before updating kernelArgs

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Bugzilla bug 1916169, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

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

In response to this:

Bug 1916169: daemon: add check before updating kernelArgs

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.

@@ -451,8 +451,10 @@ func (dn *Daemon) applyOSChanges(oldConfig, newConfig *mcfgv1.MachineConfig) (re
}()

// Apply kargs
if err := dn.updateKernelArguments(oldConfig, newConfig); err != nil {
return err
if mcDiff.kargs {
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't dn.updateKerenlArguments do a check already?

diff := generateKargsCommand(oldConfig, newConfig)
if len(diff) == 0 {
return nil
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, generateKargsCommand() function just deletes all kargs available in old Rendered MC and append all from new rendered MC. variable name is a bit misleading, perhaps it is hanging around from our earlier implementation. We have simplified kargs logic over time due to various bugs we hit, see https://github.com/openshift/machine-config-operator/pull/2014/files . I will update variable name so that we don't get confused

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, okay.... let me know when you're ready for another review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor

@darkmuggle darkmuggle left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: darkmuggle, 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 [darkmuggle,sinnykumari]

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

@sinnykumari sinnykumari changed the title Bug 1916169: daemon: add check before updating kernelArgs Bug 1918440: daemon: add check before updating kernelArgs Jan 20, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-low Referenced Bugzilla bug's severity is low 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. and removed bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. labels Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1918440: daemon: add check before updating kernelArgs

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 removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jan 20, 2021
@openshift-ci-robot
Copy link
Contributor

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.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 1918440: daemon: add check before updating kernelArgs

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 40d8e4f into openshift:master Jan 21, 2021
@openshift-ci-robot
Copy link
Contributor

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

Bugzilla bug 1918440 has been moved to the MODIFIED state.

In response to this:

Bug 1918440: daemon: add check before updating kernelArgs

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
Copy link
Contributor Author

/cherry-pick release-4.6

@openshift-cherrypick-robot

@sinnykumari: #2349 failed to apply on top of branch "release-4.6":

Applying: daemon: add check before updating kernelArgs
Applying: daemon: make kargs variable and function logical to confusion
Using index info to reconstruct a base tree...
M	pkg/daemon/update.go
M	pkg/daemon/update_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/daemon/update_test.go
Auto-merging pkg/daemon/update.go
CONFLICT (content): Merge conflict in pkg/daemon/update.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 daemon: make kargs variable and function logical to confusion
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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 Aug 18, 2021
Also, make kargs variable and function name logical to
avoid confusion.

Cherry-pick of openshift#2349
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-low Referenced Bugzilla bug's severity is low 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.

None yet

6 participants