Skip to content
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

Removing units #25

Closed
KillingSpark opened this issue Feb 11, 2020 · 3 comments
Closed

Removing units #25

KillingSpark opened this issue Feb 11, 2020 · 3 comments

Comments

@KillingSpark
Copy link
Owner

There should be a call to the control interface like this: {"method": "disable", "params": ["test.service", "test.socket"]}. This should remove all units that reference these units too.

After that a simple {"method": "reload"} should be enough to reload the (possibly changed) unit files. Then the units need to be restarted. For a first start manual reactivation should be fine, a command like {"method": "activate-all-new"} would be nice to have though.

@KillingSpark
Copy link
Owner Author

With 05b0393 there is some support for removing units. It seems to work kinda. After reloading and restarting the test units there seems to be quite a lot of issues though.

It seems more related to handling panicing services though. For now it would be best not to use this feature.

@KillingSpark
Copy link
Owner Author

In general this and this issue about reloading units can be solved by implementing a few (but a bit complicated) operations on unit sets.

  1. Basically a query: If I want to remove units {a,b,c} is the set still valid? (Or even better, which units do I need to remove additionally to make it a valid set again?)
  2. Which of these units are still running (and thus need to be stopped before removal)?
  3. And an actual update with a set of Ids to remove. This needs to make sure it removes all mentions of these units in every part of rustysd.

This should also work for adding new units. How to handle changed units is still not entirely clear to me. Some of this already exists but I plan on making this more in style of a transaction on the set of units.

@KillingSpark
Copy link
Owner Author

I think this issue is fixed. To refactor/redesign the internal handling should be tracked in another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant