diff mbox series

[ovs-dev] DNS async resolve breaks testsuite if no resolv.conf

Message ID 20180807183645.GR2540@plex.lan
State Not Applicable
Headers show
Series [ovs-dev] DNS async resolve breaks testsuite if no resolv.conf | expand

Commit Message

Flavio Leitner Aug. 7, 2018, 6:36 p.m. UTC
Hi,

My test system and build system doesn't have /etc/resolv.conf file
and then a warning is printed which breaks a number of tests in
master and branch-2.10.

Looks like unbound comes with hardcoded root servers list which could
be the fallback in case of no /etc/resolv.conf, so that message would
be an INFO and could be ignored by the testsuite.

What do you think?

Details below.
lib/dns-resolve.c:
74 void
 75 dns_resolve_init(bool is_daemon)
 76 {
[...]
 84     int retval;
 85 #ifdef __linux__                                                                                                                                                                 
 86     retval = ub_ctx_resolvconf(ub_ctx__, "/etc/resolv.conf");
 87     if (retval != 0) {
>88         VLOG_WARN_RL(&rl, "Failed to read /etc/resolv.conf: %s",
 89                      ub_strerror(retval));
 90     }
 91 #endif


## ------------- ##
## Test results. ##
## ------------- ##
ERROR: 2292 tests were run,
552 failed unexpectedly.
346 tests were skipped.
## -------------------------- ##
## testsuite.log was created. ##
## -------------------------- ##
Please send `tests/testsuite.log' and all information you think might help:
   To: <bugs@openvswitch.org>
   Subject: [openvswitch 2.10.0] testsuite: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 98 99 100 116 117 118 119 120 121 158 159 160 161 162 416 432 433 434 435 436 437 438 439 440 441 444 445 446 447 448 454 455 456 473 474 475 476 477 478 479 480 481 482 483 484 485 554 556 558 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 869 870 871 873 874 875
[the list continues...]


One sample:
1024. ofproto.at:5867: testing ofproto - bundle discard without open (OpenFlow 1.3) ...
[...]
/1024/db.sock: connecting...
2018-08-07T17:56:33Z|00007|netlink_socket|INFO|netlink: could not enable listening to all nsid (Operation not permitted)
2018-08-07T17:56:33Z|00008|reconnect|INFO|unix:/builddir/build/BUILD/ovs-7a78d1c1ad73ae6f8f07d91021b71f8d8a4848d6/tests/testsuite.dir/1024/db.sock: connected
2018-08-07T17:56:33Z|00009|dpdk|INFO|DPDK Disabled - Use other_config:dpdk-init to enable
./ofproto.at:5869: sed < stderr '
/ovs_numa|INFO|Discovered /d
/vlog|INFO|opened log file/d
/vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d
/reconnect|INFO|/d
/dpif_netlink|INFO|Generic Netlink family .ovs_datapath. does not exist/d
/ofproto|INFO|using datapath ID/d
/netdev_linux|INFO|.*device has unknown hardware address family/d
/ofproto|INFO|datapath ID changed to fedcba9876543210/d
/dpdk|INFO|DPDK Disabled - Use other_config:dpdk-init to enable/d
/netlink_socket|INFO|netlink: could not enable listening to all nsid/d
/netdev: Flow API/d
/probe tc:/d
/tc: Using policy/d'
ovsdb-server.log:
> 2018-08-07T17:56:33.490Z|00001|vlog|INFO|opened log file /builddir/build/BUILD/ovs-7a78d1c1ad73ae6f8f07d91021b71f8d8a4848d6/tests/testsuite.dir/1024/ovsdb-server.log
> 2018-08-07T17:56:33.494Z|00002|ovsdb_server|INFO|ovsdb-server (Open vSwitch) 2.10.0
ovs-vswitchd.log:


This is the commit introduced the DNS support:
commit 771680d96fb6f996987630cb85bb749478512268
Author: Yifeng Sun <pkusunyifeng@gmail.com>
Date:   Tue Jun 26 14:06:21 2018 -0700

    DNS: Add basic support for asynchronous DNS resolving

Comments

0-day Robot Aug. 7, 2018, 7:30 p.m. UTC | #1
Bleep bloop.  Greetings Flavio Leitner, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: No signatures found.
WARNING: Line is 95 characters long (recommended limit is 79)
#90 FILE: builddir/build/BUILD/ovs-7a78d1c1ad73ae6f8f07d91021b71f8d8a4848d6/tests/testsuite.dir/at-groups/1024/stdout:90:
2018-08-07T17:56:33Z|00001|dns_resolve|WARN|Failed to read /etc/resolv.conf: error reading file

Lines checked: 94, Warnings: 1, Errors: 1


build:
/bin/sh /var/lib/jenkins/jobs/upstream_build_from_pw/workspace/build-aux/missing autom4te --language=autotest -I '.' -o tests/system-dpdk-testsuite.tmp tests/system-dpdk-testsuite.at
mv tests/system-dpdk-testsuite.tmp tests/system-dpdk-testsuite
\
{ sed -n -e '/%AUTHORS%/q' -e p < ./debian/copyright.in;   \
  sed '34,/^$/d' ./AUTHORS.rst |			   \
	sed -n -e '/^$/q' -e 's/^/  /p';			   \
  sed -e '34,/%AUTHORS%/d' ./debian/copyright.in;	   \
} > debian/copyright
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') < ./rhel/openvswitch-dkms.spec.in > openvswitch-dkms.spec.tmp || exit 1; if cmp -s openvswitch-dkms.spec.tmp rhel/openvswitch-dkms.spec; then touch rhel/openvswitch-dkms.spec; rm openvswitch-dkms.spec.tmp; else mv openvswitch-dkms.spec.tmp rhel/openvswitch-dkms.spec; fi
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') < ./rhel/kmod-openvswitch-rhel6.spec.in > kmod-openvswitch-rhel6.spec.tmp || exit 1; if cmp -s kmod-openvswitch-rhel6.spec.tmp rhel/kmod-openvswitch-rhel6.spec; then touch rhel/kmod-openvswitch-rhel6.spec; rm kmod-openvswitch-rhel6.spec.tmp; else mv kmod-openvswitch-rhel6.spec.tmp rhel/kmod-openvswitch-rhel6.spec; fi
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') < ./rhel/openvswitch-kmod-fedora.spec.in > openvswitch-kmod-fedora.spec.tmp || exit 1; if cmp -s openvswitch-kmod-fedora.spec.tmp rhel/openvswitch-kmod-fedora.spec; then touch rhel/openvswitch-kmod-fedora.spec; rm openvswitch-kmod-fedora.spec.tmp; else mv openvswitch-kmod-fedora.spec.tmp rhel/openvswitch-kmod-fedora.spec; fi
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') < ./rhel/openvswitch.spec.in > openvswitch.spec.tmp || exit 1; if cmp -s openvswitch.spec.tmp rhel/openvswitch.spec; then touch rhel/openvswitch.spec; rm openvswitch.spec.tmp; else mv openvswitch.spec.tmp rhel/openvswitch.spec; fi
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') < ./rhel/openvswitch-fedora.spec.in > openvswitch-fedora.spec.tmp || exit 1; if cmp -s openvswitch-fedora.spec.tmp rhel/openvswitch-fedora.spec; then touch rhel/openvswitch-fedora.spec; rm openvswitch-fedora.spec.tmp; else mv openvswitch-fedora.spec.tmp rhel/openvswitch-fedora.spec; fi
(printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' && sed -e 's,[@]VERSION[@],2.10.90,g') \
	< ./xenserver/openvswitch-xen.spec.in > openvswitch-xen.spec.tmp || exit 1; \
if cmp -s openvswitch-xen.spec.tmp xenserver/openvswitch-xen.spec; then touch xenserver/openvswitch-xen.spec; rm openvswitch-xen.spec.tmp; else mv openvswitch-xen.spec.tmp xenserver/openvswitch-xen.spec; fi
make[3]: Entering directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace/datapath'
make[3]: Leaving directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace/datapath'
The following files are in git but not the distribution:
builddir/build/BUILD/ovs-7a78d1c1ad73ae6f8f07d91021b71f8d8a4848d6/tests/testsuite.dir/at-groups/1024/stdout
make[2]: *** [dist-hook-git] Error 1
make[2]: Leaving directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace'
make: *** [all] Error 2


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
Ben Pfaff Aug. 7, 2018, 7:41 p.m. UTC | #2
On Tue, Aug 07, 2018 at 03:36:45PM -0300, Flavio Leitner wrote:
> My test system and build system doesn't have /etc/resolv.conf file
> and then a warning is printed which breaks a number of tests in
> master and branch-2.10.
> 
> Looks like unbound comes with hardcoded root servers list which could
> be the fallback in case of no /etc/resolv.conf, so that message would
> be an INFO and could be ignored by the testsuite.
> 
> What do you think?

It's easy enough to fix:
        https://patchwork.ozlabs.org/patch/954665/

Do we need a similar fix for reading /etc/hosts?

Thanks,

Ben.
Flavio Leitner Aug. 7, 2018, 8:39 p.m. UTC | #3
On Tue, Aug 07, 2018 at 12:41:03PM -0700, Ben Pfaff wrote:
> On Tue, Aug 07, 2018 at 03:36:45PM -0300, Flavio Leitner wrote:
> > My test system and build system doesn't have /etc/resolv.conf file
> > and then a warning is printed which breaks a number of tests in
> > master and branch-2.10.
> > 
> > Looks like unbound comes with hardcoded root servers list which could
> > be the fallback in case of no /etc/resolv.conf, so that message would
> > be an INFO and could be ignored by the testsuite.
> > 
> > What do you think?
> 
> It's easy enough to fix:
>         https://patchwork.ozlabs.org/patch/954665/

Thanks will have a look.
 
> Do we need a similar fix for reading /etc/hosts?

I think /etc/hosts is always created with at least the localhost info.
Ben Pfaff Aug. 7, 2018, 9:46 p.m. UTC | #4
On Tue, Aug 07, 2018 at 05:39:31PM -0300, Flavio Leitner wrote:
> On Tue, Aug 07, 2018 at 12:41:03PM -0700, Ben Pfaff wrote:
> > On Tue, Aug 07, 2018 at 03:36:45PM -0300, Flavio Leitner wrote:
> > > My test system and build system doesn't have /etc/resolv.conf file
> > > and then a warning is printed which breaks a number of tests in
> > > master and branch-2.10.
> > > 
> > > Looks like unbound comes with hardcoded root servers list which could
> > > be the fallback in case of no /etc/resolv.conf, so that message would
> > > be an INFO and could be ignored by the testsuite.
> > > 
> > > What do you think?
> > 
> > It's easy enough to fix:
> >         https://patchwork.ozlabs.org/patch/954665/
> 
> Thanks will have a look.
>  
> > Do we need a similar fix for reading /etc/hosts?
> 
> I think /etc/hosts is always created with at least the localhost info.

OK, thanks.
diff mbox series

Patch

--- /dev/null	2018-08-07 17:51:09.647040889 +0000
+++ /builddir/build/BUILD/ovs-7a78d1c1ad73ae6f8f07d91021b71f8d8a4848d6/tests/testsuite.dir/at-groups/1024/stdout	2018-08-07 17:56:33.547867577 +0000
@@ -0,0 +1 @@ 
+2018-08-07T17:56:33Z|00001|dns_resolve|WARN|Failed to read /etc/resolv.conf: error reading file