contiv-experimental / demo

Easy cut demos to try contiv [DEPRECATED]
Other
6 stars 25 forks source link

Fixing restart_mode check #14

Closed dvavili closed 8 years ago

dvavili commented 8 years ago

The current check does a string check instead of a boolean check. Fixing this to check for boolean value. Also, added a check to see if there are any containers running before attempting to clean them.

dvavili commented 8 years ago

cc @jojimt. This is the fix for the issue that you were running into.

jojimt commented 8 years ago

@DivyaVavili -- this does not clean up the skydns container. As a result, skydns does not come up and things break. It seems that clean up only restarts netmaster and netplugin. Do we also clean up the state? e.g. etcd/ovs? The original restart did that.

dvavili commented 8 years ago

@jojimt: The cleanup of states happen by running the cleanup scripts in ansible. cc @mapuri regarding this. But, AFAIK, cleanup also handles etcd/ovs.

As for the skydns, the docker rm and docker stop should cleanup the state. As for bringing it back up, I'm exploring handling it in netplugin using restart policy. I will track this in the netplugin repository.

jojimt commented 8 years ago

@DivyaVavili if I manually delete skydns before restart, it comes back up fine. In the aci setup i just brought up, that's the only way to get it to work.

dvavili commented 8 years ago

@jojimt : I didn't run into this issue when I was trying it out. Could you mention the exact steps to recreate this issue and the steps you used to come out of it? The "docker stop and rm" steps in the script are supposed to automate the manual deletion of the skydns container as well. If that's not happening with this fix, I can look into it.

dvavili commented 8 years ago

@jojimt: Thanks for showing the issue. As mentioned this is not a function of installer and being handled in netplugin repository as it should be handled even when docker is restarted.

jainvipin commented 8 years ago

LGTM