[ovs-git] [openvswitch/ovs] f31b8a: ovn-nbctl: Fix the ovn-nbctl test "LBs - daemon" w...

GitHub noreply at github.com
Mon Nov 5 15:12:48 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: f31b8ae7a7a777dd9dc40997903a283409674eae
      https://github.com/openvswitch/ovs/commit/f31b8ae7a7a777dd9dc40997903a283409674eae
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2018-11-05 (Mon, 05 Nov 2018)

  Changed paths:
    M lib/socket-util.c
    M lib/socket-util.h
    M lib/stream.c
    M ofproto/ofproto-dpif-sflow.c
    M ovn/northd/ovn-northd.c
    M ovn/utilities/ovn-nbctl.c
    M ovn/utilities/ovn-trace.c
    M ovsdb/raft-private.c

  Log Message:
  -----------
  ovn-nbctl: Fix the ovn-nbctl test "LBs - daemon" which fails during rpm build

When 'make check' is called by the mock rpm build (which disables networking),
the test "ovn-nbctl: LBs - daemon" fails when it runs the command
"ovn-nbctl lb-add lb0 30.0.0.1a 192.168.10.10:80,192.168.10.20:80". ovn-nbctl
extracts the vip by calling the socket util function 'inet_parse_active()',
and this function blocks when libunbound function ub_resolve() is called
further down. ub_resolve() is a blocking function without timeout and all the
ovs/ovn utilities use this function.

As reported by Timothy Redaelli, the issue can also be reproduced by running
the below commands

$ sudo unshare -mn -- sh -c 'ip addr add dev lo 127.0.0.1 && \
  mount --bind /dev/null /etc/resolv.conf && runuser $SUDO_USER'
$ make sandbox SANDBOXFLAGS="--ovn"
$ ovn-nbctl -vsocket_util:off lb-add lb0 30.0.0.1a \
  192.168.10.10:80,192.168.10.20:80

To address this issue, this patch adds a new bool argument 'resolve_host' to
the function inet_parse_active() to resolve the host only if it is 'true'.

ovn-nbctl/ovn-northd will pass 'false' when it calls this function to parse
the load balancer values.

Reported-by: Timothy Redaelli <tredaelli at redhat.com>
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1641672
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list