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 2012838: fix override storage options from storage.conf #5423

Merged
merged 1 commit into from Nov 4, 2021

Conversation

QiWang19
Copy link
Contributor

Fix https://bugzilla.redhat.com/show_bug.cgi?id=2012838

Merge in the storage_option from drop-in crio.conf to the storage.conf, do not override the configs from storage.conf.
The override leads to configuration of containerruntimeconfig not working.

Signed-off-by: Qi Wang qiwan@redhat.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

https://bugzilla.redhat.com/show_bug.cgi?id=2012838
The storage_option from /etc/crio/crio.conf.d/00-default overrides the configurations from /etc/containers/storage.conf.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Merge storage_option from drop-in files to sttorage_option from storage.conf

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Oct 25, 2021
@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #5423 (8daa903) into main (b5002c4) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5423      +/-   ##
==========================================
+ Coverage   43.48%   43.52%   +0.04%     
==========================================
  Files         118      118              
  Lines       11848    11864      +16     
==========================================
+ Hits         5152     5164      +12     
- Misses       6204     6207       +3     
- Partials      492      493       +1     

@haircommander
Copy link
Member

I like this, nice and clean

I have two general questions: if there are duplicate entries in the storage options, what happens? Then, if the duplicate entries are handled by choosing the last one (as I assume it does), do you think we should have storage options first, then the crio specific ones? that way, the crio ones will override the default ones, but if they're not defined in crio's config, we'll inherit the storage ones

@haircommander
Copy link
Member

we could also add a simple test in test/config.bats that calls crio-status config to check the correct values are inherited

@QiWang19 QiWang19 force-pushed the storage-opts branch 3 times, most recently from de6bad3 to 7e2f19f Compare October 27, 2021 02:16
@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests

// keeps the storage options from storage.conf and merge it to crio config
var storageOpts []string
storageOpts = append(storageOpts, c.StorageOptions...)

data, err := ioutil.ReadFile(path)
Copy link

Choose a reason for hiding this comment

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

G304: Potential file inclusion via variable
(at-me in a reply with help or ignore)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sonatype-lift help

Copy link

Choose a reason for hiding this comment

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

I’m LiftBot and I automatically analyze new code in code review, and comment when I find potential bugs. I also accept comments as commands. Just @sonatype-lift followed by the command: ignore to mark as false positive, unignore to undo, and help to see this message. Click here to add LiftBot to another repo.

@QiWang19 QiWang19 force-pushed the storage-opts branch 2 times, most recently from dfc897d to 4ec7adc Compare October 27, 2021 19:26
@QiWang19
Copy link
Contributor Author

/test critest_fedora

@QiWang19
Copy link
Contributor Author

@cri-o/cri-o-maintainers PTAL

@haircommander
Copy link
Member

/approve
/retest

LGTM

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2021
@QiWang19
Copy link
Contributor Author

QiWang19 commented Nov 2, 2021

@cri-o/cri-o-maintainers PTAL

@haircommander
Copy link
Member

one issue with this approach is when we run
crio -c crio.conf config > crio2.conf && mv crio2.conf crio.conf then I believe we would get an ever growing list. we may want to consider option deduplication

@haircommander
Copy link
Member

(by that I don't mean checking each key, but each key=value option pair)
another thing to think about is what is the correct behavior here:
["option=value1", "option=value2", "option=value1"]

my intuition would be the resulting list should be
["option=value2", "option=value1"]

@QiWang19
Copy link
Contributor Author

QiWang19 commented Nov 3, 2021

/test kata-containers

@QiWang19
Copy link
Contributor Author

QiWang19 commented Nov 3, 2021

Removed the duplicates and keeps the last appearance in the list.

@QiWang19
Copy link
Contributor Author

QiWang19 commented Nov 3, 2021

@cri-o/cri-o-maintainers PTAL

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, QiWang19, saschagrunert

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 [haircommander,saschagrunert]

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

@openshift-bot
Copy link

/retest-required

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

10 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2021

@QiWang19: 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/openshift-jenkins/integration_crun_cgroupv2 8daa903 link false /test integration_cgroupv2
ci/openshift-jenkins/e2e_crun_cgroupv2 8daa903 link false /test e2e_cgroupv2

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

/retest-required

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

5 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit 3943334 into cri-o:main Nov 4, 2021
@QiWang19
Copy link
Contributor Author

QiWang19 commented Nov 4, 2021

/cherry-pick release-1.21

@openshift-cherrypick-robot

@QiWang19: new pull request created: #5436

In response to this:

/cherry-pick release-1.21

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.

@haircommander
Copy link
Member

/cherry-pick release-1.22

@openshift-cherrypick-robot

@haircommander: new pull request created: #5437

In response to this:

/cherry-pick release-1.22

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants