Open christophermaier opened 6 years ago
What's the actual use case?
I get the theoretical one - has anyone ever had a real issue with this? The benefit of not allowing multiple instances of a given service is pretty high, imho.
We have an actual use case for this right now. Chris and I just got off a call with one of our teams, which led to this issue.
Probably non-trivial to describe the exact use case in writing, and also potentially sensitive, but happy to jump on a call with you to run you through the thinking - Chris and I may have missed an elegant solution.
@adamhjk Basically what @Atalanta and @gggiroux said... we've got a workaround for how the Supervisor currently behaves, but I thought it might be good to hash out whether or not we would ultimately want the Supervisor to support something like this natively.
Would the services run with the same group in the identified use cases? If not then the fs could include it?
This would be really nice feature for the :bear:metal folks - just like you said @christophermaier. We have a service where we would apply a certain runtime configuration and then we would like to stand up that same service but with a different runtime configuration.
On the exact same piece of physical hardware, without virtualization or containerization?
If I put my brain in the way-back machine, I remember running things like dev/qa farms with services on different ports to squeeze more efficiency. Is that what we're talking about? To me, this adds a bunch of complexity and possible footguns if you aren't careful.
If we wanted to make this change, then yes, the way you would do it os to have each service start writing itself to /hab/svc/{service}.{group} rather than just {service}.
Yes, multiple instances of the same service, sometimes a slightly different version of the service, running on the same (very powerful) hardware, without virtualisation/containerisation to isolate it.
I'm pretty sure we should just do what y'all want. The pedant in me struggles, though, because it's so much more repeatable and safe to isolate it at the system level. Pretty sure that doesn't override your need. 👍
I would say it’s not that I want to run one supervisor with many services under it. I want each service to have its own supervisor. And to a certain point that @atalanta is saying, we would be running our services on powerful machines. No virtualization or containerization.
@bdangit you can ahve that today
--override-name
and set the listen ports to different ports.
@adamhjk There are some pretty significant downsides to using --override-name
right now; see #4975
Adding a comment on this one. I'm currently facing the issue on my own machine (personal server).
I have a service that simply serves a given directory with a better index.
In my opinion, it does make sense to run the service multiple times, once for each root, on different port/ip address (https://github.com/rsertelon/rsertelon-plans/blob/master/h5ai/default.toml).
It's been a long time this issue has been opened, is there something that can be done? How could I help if so?
Another solution would be to create multiple packages, but I'd rather not do that if possible.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
I would still be interested in a solution to that issue personally.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.
Some deployments may need to run multiple instances of a package on a single supervisor / machine. (This applies to bare-metal Supervisors, and situations where Docker is not being used).
Due to how the Supervisor's filesystem is set up (see #4975), about the only practical way to achieve this right now is to have a separate package (and thus service name) for each instance of the service you want to run. This is unnecessarily profligate, and could potentially be addressed by allowing users to specify a service name override at service load time, effectively decoupling a package from a service.