-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow Restart of Containers #606
Comments
Hi @corbs9
I think I'd prefer the latter, but it would be much more work. Keen to hear others' thoughts here (also contributions would be most welcome 😄 ) |
Hi @rnorth, I thought initially about just restarting the containers, but it seems that port mapping info, for example, is created once at container creation and wouldn't be updated when a docker restart is issued. I have forked the project and plan to do the following:
What are your thoughts on this? Oli |
Hi @corbs9, Sounds like a good idea in general. The changes in In addition to the |
HI @kiview, WRT differing docker semantics, renaming the Good mention on the ResourceReaper. I will perhaps add a method which signifies that this is a graceful operation as opposed to the default kill command. WRT the Oli |
@corbs9 Seems nice for some resilience test scenarios, especially for system tests. |
Another use case is simulating an out of service condition in integration service: Start containers |
Hey @behrangsa, you are right, that's also the use case I was explaining above. |
@kiview docker has a built in pause command too. So the pause method added to testcontainers api can call that instead of issuing docker stop. |
Of course, just look at the discussion in this issue :)
Behrang <[email protected]> schrieb am Fr., 30. März 2018, 07:37:
… @kiview <https://github.com/kiview> docker has a built in pause command
<https://docs.docker.com/engine/reference/commandline/pause/> too. So the
pause method added to testcontainers api can call that instead of issuing
docker stop.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#606 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2jaAjIXeyWVpz1ZfVB-B1_H8buZz3pks5tjcSvgaJpZM4SpIvA>
.
|
Hi,
Let me know your thoughts? |
Hey @chungngoops, thanks for your input. Regarding Also we must keep in mind, that we want to submit a stop container command, instead of the kill container command that is currently issued in Regarding starting in We should also try to keep close to Docker semantics when introducing changes. We are currently not really aligned (our |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
Not stale - PR pending. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case. |
not stale - I am working on the PR. |
I use
to pause and unpause container |
What happened to this issue - did you end up adding restart command to GenericContainer? I can't seem to find one. |
@asafm since restarting the container would cause it to re-assign the ports and a few other things, we decided to not have this functionality for now. What's your use case? |
Well, I have a small java-agent I wrote couple of years ago - jmx2graphite - which spits out the MBeans to Graphite. It had a known issue I wanted to fix but couldn't find the time: When ever Graphite server got restarted, writes after a while started failing on Broken pipe. So I wanted to simulate it, by restarting the Graphite container:
Unfortunately, it didn't work, since I couldn't get that broken pipe I wanted. Long story short, restart won't help my use case :) |
A possible solution to restart a container : |
Currently, test containers does not allow you to restart a running container without stopping it and removing it completely, followed by a start.
Allowing the functionality to restart a running container which issues a docker restart ensures the testability of a container in a multitude of other ways.
Such an example could relate to custom initialisation scripts which create data, and issuing a restart to the container ensures that this data isn't created twice.
The text was updated successfully, but these errors were encountered: