openshift / openshift-sdn

Apache License 2.0
69 stars 63 forks source link

Isolate docker bridge initialization to enable containerized installs #187

Closed sdodson closed 8 years ago

sdodson commented 9 years ago

For use in an origin-node image that's built atop openshift/origin. The systemd service that starts the node container is Restart=always and is responsible for starting the node again after docker has been restarted.

sdodson commented 9 years ago

This is currently calling setup when all of the checks inside of setup_required() return 0 I'm not sure why that's happening.

https://gist.githubusercontent.com/sdodson/6271d65ec72b3fc3be13/raw/18b5f870af02e4dd7f20cb7a68ef6c5e79c3a59e/gistfile1.txt

danwinship commented 9 years ago

This is currently calling setup when all of the checks inside of setup_required() return 0 I'm not sure why that's happening.

setup_required returns 0 to indicate that setup is required, because that value is a process exit status, not a boolean, so it has to be this way for the code later on to make sense:

if ! setup_required; then
    echo "SDN setup not required."
sdodson commented 9 years ago

@danwinship and @marun

This seems to be the minimum amount of change necessary to run reliably in a container. I tried looking at #166 but it failed to compile so that led me to believe it's probably not something we'd consider including in Origin 1.1 release.

Do you think it's possible to get this in 1.1? My goal is to deliver containerized installs that can run on RHEL Atomic for Origin 1.1 / OSE 3.1.

sdodson commented 8 years ago

Rebased and squashed commits. Does this seem like a workable solution until the setup is re-written in golang?