-
Notifications
You must be signed in to change notification settings - Fork 54
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
Configurable restart command #1577
Configurable restart command #1577
Conversation
eff3923
to
8a82e39
Compare
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.
Nice to have reduce to one the number of functions with test/no-test versions.
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/general_manager.rs
Outdated
Show resolved
Hide resolved
let mut sync_command = std::process::Command::new(SUDO); | ||
sync_command.arg(SYNC); |
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.
I wonder if this sync
command can be part of the user configuration.
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.
Nice. However, the tests need to be fixed (you failed to revert there the change making config.init
optional).
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.
Quickly reviewed (going to do more later). I am not convinced to move system_services
directory to /crates/common/tedge_config
. It is definitely not tedge_config, which is related to our tedge config ...
command. My suggestion is to move directly /crates/common
.
crates/common/tedge_config/src/system_services/managers/general_manager.rs
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
fa75244
to
cabebd9
Compare
I agree that moving code related to system config into |
Having one larger crate makes sense. However, how the
|
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
crates/common/tedge_config/src/system_services/managers/config.rs
Outdated
Show resolved
Hide resolved
85d161c
to
116c9fd
Compare
It's a good idea to add a |
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.
Approved
Signed-off-by: alexandru solomes <solo@softwareag.com>
Allows one to query config for `system.toml` in other components, not just in `tedge`. Signed-off-by: alexandru solomes <solo@softwareag.com>
Signed-off-by: alexandru solomes <solo@softwareag.com>
Signed-off-by: alexandru solomes <solo@softwareag.com>
116c9fd
to
e0a14d7
Compare
Proposed changes
This PR makes the restart command configurable.
This is the current status of the PR:
tedge
totedge_config
)tedge_agent
For some reason the restart feature does not work on my laptop. Running
sudo -u tedge init 6
fails to restart, stating that the device can not be restarted since there are users logged in. The suggestion is to usesystemctl reboot -i
. I am not sure if this is only for my laptop or not. I tried also making a debian package for tedge agent and the error there is slightly different:Types of changes
Paste Link to the issue
#1017
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments