-
Notifications
You must be signed in to change notification settings - Fork 309
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
Provide error handling for Reboot() call #387
Comments
invidian
added a commit
to flatcar/flatcar-linux-update-operator
that referenced
this issue
Jan 6, 2022
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream. The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step. See coreos/go-systemd#387 for more details. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Good idea, a |
Can't promise I find time to do so, but will try :) |
Ah, just found out there is more general issue for this: #326, not sure if it make sense to address each method individually or should we handle all of them at once. |
invidian
added a commit
to flatcar/flatcar-linux-update-operator
that referenced
this issue
Jan 6, 2022
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream. The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step. See coreos/go-systemd#387 for more details. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to flatcar/flatcar-linux-update-operator
that referenced
this issue
Jan 6, 2022
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream. The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step. See coreos/go-systemd#387 for more details. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to flatcar/flatcar-linux-update-operator
that referenced
this issue
Jan 6, 2022
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream. The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step. See coreos/go-systemd#387 for more details. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to flatcar/flatcar-linux-update-operator
that referenced
this issue
Jan 6, 2022
This commit adds login1 package, which is a small subset of github.com/coreos/go-systemd/v22/login1 package with ability to use shared D-Bus connection and with proper error handling for Reboot method call, which is not yet provided by the upstream. The idea is to use this package in favor of github.com/coreos/go-systemd in agent code responsible for rebooting the node. However, this requires tests in agent code, so it will be done in the next step. See coreos/go-systemd#387 for more details. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to kinvolk/go-systemd
that referenced
this issue
Jan 10, 2022
Existing Reboot() method does not allow using context not inspecting D-Bus call errors, which makes it difficult to debug and use. This commit adds new RebootWithContext() method which addresses those shortcomings. Closes coreos#387 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to kinvolk/go-systemd
that referenced
this issue
Jan 10, 2022
Existing Reboot() method does not allow using context not inspecting D-Bus call errors, which makes it difficult to debug and use. This commit adds new RebootWithContext() method which addresses those shortcomings. Closes coreos#387 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to kinvolk/go-systemd
that referenced
this issue
Jan 10, 2022
Existing Reboot() method does not allow using context not inspecting D-Bus call errors, which makes it difficult to debug and use. This commit adds new RebootWithContext() method which addresses those shortcomings. Closes coreos#387 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Created #390 to address this. |
invidian
added a commit
to kinvolk/go-systemd
that referenced
this issue
Jan 10, 2022
Existing Reboot() method does not allow using context not inspecting D-Bus call errors, which makes it difficult to debug and use. This commit adds new RebootWithContext() method which addresses those shortcomings. Closes coreos#387 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
invidian
added a commit
to kinvolk/go-systemd
that referenced
this issue
Jan 10, 2022
Existing Reboot() method does not allow using context not inspecting D-Bus call errors, which makes it difficult to debug and use. This commit adds new RebootWithContext() method which addresses those shortcomings. Closes coreos#387 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now user has no way of knowing if calling
Reboot()
succeeds or not, as no error is returned from a call. E.g. if user calling it has no permissions to do so, the call will silently fail.This could be improved, e.g. together with accepting the context for operation in new function.
The text was updated successfully, but these errors were encountered: