start-os icon indicating copy to clipboard operation
start-os copied to clipboard

[feat]: Put service in "restarting" status when user saves config, as on 0.2

Open chrisguida opened this issue 3 years ago • 10 comments

Prerequisites

  • [X] I have searched for existing issues that already suggest this feature, without success.

Describe the Feature Request

Put service in "restarting" status when user saves config, as on 0.2

Describe the Use Case

Currently in 0.3, when the user saves a config, the service does not indicate to the user that it is restarting. This can lead to confusion if, for example, bitcoind takes a long time to restart because it is flushing the utxo cache to disk. The service simply appears to lose all functionality, while the package details page shows that everything is fine.

Describe Preferred Solution

Put service in "restarting" status when user saves config, as on 0.2

Describe Alternatives

No response

Anything else?

No response

chrisguida avatar Dec 16 '21 00:12 chrisguida

given that this is non-trivial, I would like to mark as p2 and punt to 0.3.1. @MattDHill please advise

dr-bonez avatar Dec 16 '21 21:12 dr-bonez

It might help to implement a "suppress notifications" feature: https://github.com/Start9Labs/bitcoind-wrapper/issues/27#issuecomment-996158563 to have a "restarting" backend status

chrisguida avatar Dec 16 '21 22:12 chrisguida

Can you catch me up on how suppressing notifications in certain circumstances is an alternative solution to implementing a "restarting" status for services?

MattDHill avatar Dec 17 '21 00:12 MattDHill

It's not an alternate solution, it might help in the implementation. If the backend can see that a service is restarting, it will know when to suppress notifications.

chrisguida avatar Dec 17 '21 01:12 chrisguida

Is the original ask then to suppress notifications or is the status itself important in its own right?

ProofOfKeags avatar Dec 17 '21 20:12 ProofOfKeags

we should not suppress notifications. but it should be possible to have a status for when the app is running but it is between its most recent exit and its next restart

dr-bonez avatar Dec 17 '21 20:12 dr-bonez

@ProofOfKeags the original ask is to implement the restarting status, as seen on 0.2.x. If you go to 0.2.x and save a config, you will see this behavior. On 030, in contrast, the service simply appears to be running. This is very confusing.

The notification suppression feature is a bad idea, I retract it. We should instead catch bitcoind shutting down in the manager and not propagate this to the OS. As such, that comment is not relevant to this feature request.

chrisguida avatar Dec 17 '21 21:12 chrisguida

connected to #1304, would like to add a configuring status

dr-bonez avatar Mar 13 '22 01:03 dr-bonez

#1304

@dr-bonez Is this status still relevant with the emergence of JS procedures?

elvece avatar Jun 02 '22 22:06 elvece

@dr-bonez Also, are we going to cascade stop / start dependent services? In other words, what is the proposed solution for the slew of notifications that will happen upon restarting a service with many higher dependents eg. bitcoind)

elvece avatar Jun 02 '22 22:06 elvece

Can this be closed @dr-bonez ?

MattDHill avatar Mar 14 '23 02:03 MattDHill

This is addressed in refactor/gut-config which hasn't been merged

dr-bonez avatar Mar 14 '23 03:03 dr-bonez

addressed in 035, service will enter stopping, then starting

MattDHill avatar Sep 28 '23 21:09 MattDHill