Skip to content
This repository has been archived by the owner on Jul 29, 2018. It is now read-only.

Consider using '--rm' option when running the OpenShift image #25

Open
hferentschik opened this issue Feb 15, 2016 · 4 comments
Open

Consider using '--rm' option when running the OpenShift image #25

hferentschik opened this issue Feb 15, 2016 · 4 comments
Assignees
Milestone

Comments

@hferentschik
Copy link
Contributor

This would allow to clean out some the code which deals with removal of existed container. Stopping the container would automatically remove it.

Only drawback might be that it one cannot inspect a failing container after exit, but that's really a very advanced use case.

@LalatenduMohanty LalatenduMohanty added this to the ADB 2.0 GA milestone Feb 18, 2016
@praveenkumar praveenkumar self-assigned this Feb 22, 2016
@praveenkumar
Copy link
Contributor

@hferentschik Are you talking about https://github.com/projectatomic/adb-utils/blob/master/services/openshift/scripts/openshift#L50? if yes then we can't do because this function we use once with daemon mode to create config files (https://github.com/projectatomic/adb-utils/blob/master/services/openshift/scripts/openshift#L109) and second time to run openshift in non-daemon mode. --rm and -d can't use simultaneously (https://docs.docker.com/engine/reference/run/#detached-d).

If I misunderstood then please let me know what specific change are you looking.

@hferentschik
Copy link
Contributor Author

Hmm, the question here is really why you use the -d option here at all. In fact it seems wrong. Without the -d we could just wait for the process/container to exit which happens once the creation of the config files is complete. This way we can also skip the whole wait_for_config_files which I am not so confident in either. This would be a great win imo.

So not only should we investigate to add --rm, we should also get rid of -d and wait_for_config_files. There might be a reason for the daemon mode, but atm I don't see one. After all, the scripts from openshift-vagrant were never supposed to be used as systemd setup scripts. I fully expected to make changes to harden the config.

@praveenkumar could you please try removing the daemon mode for creating the config files?

@praveenkumar
Copy link
Contributor

@praveenkumar could you please try removing the daemon mode for creating the config files?

@hferentschik In past I tried that and it was failing but since now I have little more context so will try again and find reason if that occur again. I didn't know that origin process complete and exit once config files are generated. Thanks for clarify it.

@hferentschik
Copy link
Contributor Author

In past I tried that and it was failing but since now I have little more context so will try again and find reason if that occur again. I didn't know that origin process complete and exit once config files are generated. Thanks for clarify it.

Hope it works. :-)

@hferentschik hferentschik modified the milestones: ADB 2.1, ADB 2.0 Jun 10, 2016
@brgnepal brgnepal modified the milestones: ADB 2.3, ADB 2.1 Jul 18, 2016
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