mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-24 19:57:24 +00:00
bug: Ensure data source is ready during reset (#1310)
Signed-off-by: mudler <mudler@c3os.io>
This commit is contained in:
committed by
Itxaka
parent
936b538cca
commit
e5e595be4c
@@ -64,6 +64,8 @@ func Reset(dir ...string) error {
|
||||
lock.Lock()
|
||||
args := []string{"reset"}
|
||||
|
||||
ensureDataSourceReady()
|
||||
|
||||
bus.Manager.Publish(sdk.EventBeforeReset, sdk.EventPayload{}) //nolint:errcheck
|
||||
|
||||
optsArgs := optsToArgs(options)
|
||||
@@ -96,7 +98,9 @@ func Reset(dir ...string) error {
|
||||
|
||||
bus.Manager.Publish(sdk.EventAfterReset, sdk.EventPayload{}) //nolint:errcheck
|
||||
|
||||
pterm.Info.Println("Rebooting in 60 seconds, press Enter to abort...")
|
||||
if !agentConfig.Fast {
|
||||
pterm.Info.Println("Rebooting in 60 seconds, press Enter to abort...")
|
||||
}
|
||||
|
||||
// We don't close the lock, as none of the following actions are expected to return
|
||||
lock2 := sync.Mutex{}
|
||||
|
Reference in New Issue
Block a user