-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(cmd/influxd): prevent panic on upgrade with V1 users and no V1 conf #20548
Conversation
98788c7
to
600d580
Compare
|
||
// This command is executed multiple times by test code. Initialization can happen only once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade process doesn't use flux, I think this was bad copy-pasta
600d580
to
15ac25d
Compare
@@ -361,8 +361,9 @@ func runUpgradeE(cmd *cobra.Command, options *options, verbose bool) error { | |||
} | |||
} | |||
|
|||
var v1Config *configV1 | |||
v1Config := &configV1{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (making sure v1Config
isn't nil
) is the fix for the panic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The panic was occurring on this line (nil
dereference on !v1Config.Http.AuthEnabled
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
a47cf85
to
633d93c
Compare
Closes #20545
I reworked our existing e2e test for
influxd upgrade
to actually cover the main body of the command.