-
Notifications
You must be signed in to change notification settings - Fork 134
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
Sending a signal to the process inside the container #504
Comments
@tgross Could you please help? |
Hello @vrenjith, without being able to look an example Nomad job definition, Dockerfile, and/or ContainerPilot configuration, it's hard to completely recommend a solution. But I take it you're referencing Nomad's This might step outside ContainerPilot's existing use case as it is normally used by itself to render configuration templates not unlike how Nomad is achieving this same functionality using IMHO Nomad supersedes ContainerPilot as it shares many of the same features. |
@vrenjith what signals can your application accept? ContainerPilot can run any executable you want, and that can include |
As @misterbisson duly noted in an offline chat, #195 contains much of the existing thought around our lack of signals in ContainerPilot v3.x. That said, I'm still interested in exploring/defining features and use cases around this, of which I'm looking into now with signal processing. |
The app can accept any signal and we can code for it. The key part is that
container pilot will receive a signal from docker and I am not sure how can
we write an event to act on it and forward it to our app by running a kill.
--
Regards,
Renjith
|
I was trying to follow the suggestion from @cheapRoc and reading through https://github.com/autopilotpattern/nats/blob/master/etc/containerpilot.json5. I got a question regarding the way |
I want to make sure that the current behavior is being described accurately to you: currently ContainerPilot handles That being said:
This really feels like something is off with this approach. Why is the scheduler reaching inside the container to update things on disk? Can you describe this in more detail?
This sounds like an unrelated issue. But using blocking calls is proposed in #461 but the current behavior is to poll. |
Having researched this a bit further, I don't believe we can easily handle something like I'm now interested in how Nomad and ContainerPilot both utilize Consul and whether or not the template could be generated under ContainerPilot itself, as I first alluded to. |
I opened #505 for a feature that came to mind after my last comment. We'll keep this issue going for the Nomad discussion (as that is quite valuable). |
To simplify the discussion, I'll enumerate communication channels that a normal Docker container can receive. It should be noted that these are primarily applicable to a Docker host not a Docker container running on Triton (which are more decentralized and distributed).
|
I think we're trying to tackle a general case, but it just so happens I'm looking into setting up a Nomad cluster with jobs that use the Instead, I'd run |
@vrenjith can you share more background on the use case you have in mind? As @cheapRoc points out, there are some aspects of Nomad that are duplicative of ContainerPilot, but I assume you're using Nomad on your host to run the Docker containers, and ContainerPilot in the container as well. Perhaps you've got a volume mapped into the container for the config files? This also may related to a proposal in #506 to have ContainerPilot watch a key in Consul for the use case that the config files or templates for the app are stored as the value of that key. That's another path to injecting config info into the container, but doesn't involve any dependency on the host. |
@vrenjith If you're still looking for a solution here, We're also looking into #506 which may/may not help as well. I'm going to close this issue by end of week if there are no other updates. |
UNIX signal events are released in 3.6.0. |
That's awesome. Thank you so much. I will check out the signal events
feature.
--
Regards,
Renjith
|
We are looking at receiving a signal for the process started by containerpilot (this is in the context of
nomad
re-rendering a template inside the docker image and sends CP a signal of our choice. We need to inform the process somehow about this).I read through #283 and related ones, but was unable to find a clear way to achieve this. Any hints on how to go about doing this?
The text was updated successfully, but these errors were encountered: