#include "ovn/lib/ovn-sb-idl.h"
#include "vtep/vtep-idl.h"
+#include "binding.h"
#include "gateway.h"
#include "ovn-controller-vtep.h"
ovs_cmdl_proctitle_init(argc, argv);
set_program_name(argv[0]);
+ service_start(&argc, &argv);
parse_options(argc, argv);
fatal_ignore_sigpipe();
};
gateway_run(&ctx);
+ binding_run(&ctx);
unixctl_server_run(unixctl);
unixctl_server_wait(unixctl);
ovsdb_idl_loop_commit_and_wait(&vtep_idl_loop);
ovsdb_idl_loop_commit_and_wait(&ovnsb_idl_loop);
poll_block();
+ if (should_service_stop()) {
+ exiting = true;
+ }
}
/* It's time to exit. Clean up the databases. */
/* Run all of the cleanup functions, even if one of them returns false.
* We're done if all of them return true. */
done = gateway_cleanup(&ctx);
+ done = binding_cleanup(&ctx) && done;
if (done) {
poll_immediate_wake();
}
}
unixctl_server_destroy(unixctl);
+
ovsdb_idl_loop_destroy(&vtep_idl_loop);
ovsdb_idl_loop_destroy(&ovnsb_idl_loop);
free(ovnsb_remote);
free(vtep_remote);
+ service_stop();
exit(retval);
}