-
Notifications
You must be signed in to change notification settings - Fork 548
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
talosctl shutdown doesn't error if no talosconfig is passed. #7900
Comments
you probably have a default
|
No, I don't, and this is still an error that the CLI should handle, no matter what the cause!
This is actually an issue in the CLI - no context should always return an error, not silently fail! Please reopen. |
yep, looks like error reporting is broken there |
@utkuozdemir I think something is wrong here talos/cmd/talosctl/pkg/talos/action/tracker.go Lines 210 to 213 in ef50561
and many commands using this code path are broken same way |
@smira Yes, seems like it. I'll submit a fix. |
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command. This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution. But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors. This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed. Closes siderolabs#7900. Signed-off-by: Utku Ozdemir <[email protected]>
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command. This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution. But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors. This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed. Closes siderolabs#7900. Signed-off-by: Utku Ozdemir <[email protected]>
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command. This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution. But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors. This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed. Closes siderolabs#7900. Signed-off-by: Utku Ozdemir <[email protected]> (cherry picked from commit 5dff164)
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command. This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution. But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors. This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed. Closes siderolabs#7900. Signed-off-by: Utku Ozdemir <[email protected]> (cherry picked from commit 5dff164)
Before we started a reboot/shutdown/reset/upgrade action with the action tracker (`--wait`), we were setting a flag to prevent cobra from printing the returned error from the command. This was to prevent the error from being printed twice, as the reporter of the action tracker already prints any errors occurred during the action execution. But if the error happens too early - i.e. before we even started the status printer goroutine, then that error wouldn't be printed at all, as we have suppressed the errors. This PR moves the suppression flag to be set after the status printer is started - so we still do not double-print the errors, but neither do we suppress any early-stage error from being printed. Closes siderolabs#7900. Signed-off-by: Utku Ozdemir <[email protected]> (cherry picked from commit 5dff164)
Bug Report
I ended up in a terminal where I hadn't exported
TALOSCONFIG
and issued atalosctl shutdown
command and nothing happened. I assumed it was an async command and waited... and waited.Description
There should be an error message if you issue a
talosctl shutdown
command without either an explicit--talosconfig
or aTALOSCONFIG
env var.Logs
(no output seen on shutdown command)
Environment
talosctl version --nodes <problematic nodes>
] 1.5.4kubectl version --short
] v1.28.2The text was updated successfully, but these errors were encountered: