Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

fleetctl: get statuses (and restart) of the global unit #1559

Closed
kayrus opened this issue Apr 19, 2016 · 6 comments
Closed

fleetctl: get statuses (and restart) of the global unit #1559

kayrus opened this issue Apr 19, 2016 · 6 comments

Comments

@kayrus
Copy link
Contributor

kayrus commented Apr 19, 2016

At the moment it is not possible to get status of the global unit. fleetctl returns Unable to determine status of global unit global.service. error message. The workaround it to use fleetctl ssh 6abfab3268cf6bb745b0aaf5da9b0cad systemctl status global.service, which is too tricky.

I suggest to get all machines where global unit is executed and iterate through them. This will potentially create a long running process when you have thousands of machines in the cluster, and that is why we have to implement machineid/hostname/machineIP filter.

This solution will allow us to restart global units as well (we will use same code as in fleetctl/status.go). And we can resolve #975. fleetctl ssh <whatever> sudo systemctl restart <whatever> looks too tricky. When you need to restart several units, you'll have to write something like:

for u in "unit1 unit2 unit3"; do fleetctl ssh $u sudo systemctl restart $u; done

I don't like the solution provided in #961, because it can create several simultaneous ssh connections when you will trigger batch of units and you can not limit amount of connections. The most bug-free and simple solution is to use status.go code.

/cc @antrik @jonboulle @tixxdz does it sound reasonable for you?

@dongsupark
Copy link
Contributor

+1 for the thought that fleetctl restart would be a nice feature. There must be a better way than "fleetctl ssh <whatever> sudo systemctl restart", which is indeed tricky. Maybe after the milestone v0.13, we could work on it.

@antrik
Copy link
Contributor

antrik commented Apr 21, 2016

@kayrus I still think the approach I proposed for restart is more appropriate. (And I'd love to implement it if I'm given permission.)

I don't have much of an opinion on using systemctl status... In what situations would you use it?

@antrik
Copy link
Contributor

antrik commented Apr 21, 2016

Eh, the last bit was bogus. I don't know though how fleetctl status works right now, and what the problem is with showing the status for global units... Would have to investigate first before I can give a useful answer.

@tixxdz
Copy link
Contributor

tixxdz commented Apr 22, 2016

@kayrus I still think the approach I proposed for restart is more appropriate. (And I'd love to implement it if I'm given permission.)

Please go ahead there are no such permissions, just code the feature if you think that your solution is the best, or show something.

@dongsupark
Copy link
Contributor

I just added this PR to milestone v1.0, as it has been requested since quite a long time. We need to somehow add this stuff.

@dongsupark
Copy link
Contributor

Closed via #1624

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

No branches or pull requests

4 participants