fix: allow crictl config to create a missing explicit file#2144
fix: allow crictl config to create a missing explicit file#2144immanuwell wants to merge 1 commit into
Conversation
|
Welcome @immanuwell! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: immanuwell The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
So the scenario is downloading crictl, and use config set commands to set all properties? I wonder if we need a new command that creates an empty config file instead. I think the |
dff3b53 to
9d13c99
Compare
|
@SergeyKanzhelev addressed your suggestions, please take a look |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes a small but real
crictl configpaper cut.If you pass a custom
--configpath and the file is missing,config --setdies in startup before theconfigcommand can create the file. That makes the bootstrap flow kinda busted.This patch lets
config --setand the positionalconfig key valuepath create the missing file, and keepsconfig --getandconfig --listread-only.Repro:
Before this PR, that fails with a
get server configerror.Which issue(s) this PR fixes:
Fixes #2143
Special notes for your reviewer:
Checked with the built
crictlbinary and the existingcrictl: confige2e suite. This bug is easy to hit in normal local CLI use, no weird limits or edge conditions needed.Does this PR introduce a user-facing change?