Message ID | 20180702012301.36193-2-jpettit@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,1/2] ovs-sandbox: Use different log file names for ovn-controllers. | expand |
On Sun, Jul 01, 2018 at 06:23:01PM -0700, Justin Pettit wrote: > Commits 1e8eeb66db2e7 ("ovs-sandbox: Support starting multiple > ovn-northds.") and 047458de40391 ("ovs-sandbox: Add option to support > multiple ovn-controllers.") allowed starting multiple instances of > ovn-northd and ovn-controller, respectively. It did this by assigning a > sequence number to to the pidfile name. Unfortunately, this breaks the > method ovs-appctl uses to determine to which process it should connect. > This commit changes the behavior so that a sequence number is not added > to the first instance, so ovs-appctl will connect to that be default. > > This commit also uses the same convention for naming the log file. > > Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
> On Jul 6, 2018, at 5:04 PM, Ben Pfaff <blp@ovn.org> wrote: > > On Sun, Jul 01, 2018 at 06:23:01PM -0700, Justin Pettit wrote: >> Commits 1e8eeb66db2e7 ("ovs-sandbox: Support starting multiple >> ovn-northds.") and 047458de40391 ("ovs-sandbox: Add option to support >> multiple ovn-controllers.") allowed starting multiple instances of >> ovn-northd and ovn-controller, respectively. It did this by assigning a >> sequence number to to the pidfile name. Unfortunately, this breaks the >> method ovs-appctl uses to determine to which process it should connect. >> This commit changes the behavior so that a sequence number is not added >> to the first instance, so ovs-appctl will connect to that be default. >> >> This commit also uses the same convention for naming the log file. >> >> Signed-off-by: Justin Pettit <jpettit@ovn.org> > > Acked-by: Ben Pfaff <blp@ovn.org> Thanks. I pushed the series to master. --Justin
diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 3fab1c0ccc98..62ec537e8d22 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -529,16 +529,18 @@ if $ovn; then OVN_CTRLR_PKI="" fi for i in $(seq $n_northds); do + if [ $i -eq 1 ]; then inst=""; else inst=$i; fi rungdb $gdb_ovn_northd $gdb_ovn_northd_ex ovn-northd --detach \ - --no-chdir --pidfile=ovn-northd$i.pid -vconsole:off \ - --log-file=ovn-northd$i.log -vsyslog:off \ + --no-chdir --pidfile=ovn-northd${inst}.pid -vconsole:off \ + --log-file=ovn-northd${inst}.log -vsyslog:off \ --ovnsb-db="$OVN_SB_DB" --ovnnb-db="$OVN_NB_DB" done for i in $(seq $n_controllers); do + if [ $i -eq 1 ]; then inst=""; else inst=$i; fi rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \ $OVN_CTRLR_PKI --detach --no-chdir -vsyslog:off \ - --log-file=ovn-controller$i.log \ - --pidfile=ovn-controller$i.pid -vconsole:off + --log-file=ovn-controller${inst}.log \ + --pidfile=ovn-controller${inst}.pid -vconsole:off done rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \ ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \
Commits 1e8eeb66db2e7 ("ovs-sandbox: Support starting multiple ovn-northds.") and 047458de40391 ("ovs-sandbox: Add option to support multiple ovn-controllers.") allowed starting multiple instances of ovn-northd and ovn-controller, respectively. It did this by assigning a sequence number to to the pidfile name. Unfortunately, this breaks the method ovs-appctl uses to determine to which process it should connect. This commit changes the behavior so that a sequence number is not added to the first instance, so ovs-appctl will connect to that be default. This commit also uses the same convention for naming the log file. Signed-off-by: Justin Pettit <jpettit@ovn.org> --- tutorial/ovs-sandbox | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)