[PATCH] python indent bugfix in dns_hub.py

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Fri Jan 18 20:44:59 UTC 2019


What we have managed so far is to crash with the correct message when
a client disappears, but a more conventional approach might be to note
the problem and keep going. This patch wants to do that.

I am not sure what the underlying cause is. The quoted example
from https://gitlab.com/samba-team/devel/samba/-/jobs/147653485

cheers,
Douglas

> ==> /builds/samba-team/devel/samba/samba-ad-dc-2.stderr <==
> INFO 2019-01-18 10:31:19,457 pid:29159 bin/python/samba/join.py #103: Finding a writeable DC for domain 'SAMBA2000.EXAMPLE.COM'
> ERROR: Failed to find a writeable DC for domain 'SAMBA2000.EXAMPLE.COM': The object name is not found.
> Join failed
> NSS_WRAPPER_HOSTS='/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/hosts' SOCKET_WRAPPER_DEFAULT_IFACE="39" RESOLV_WRAPPER_HOSTS="/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/dns_host_file" KRB5_CONFIG="/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/vampire_2000_dc/etc/krb5.conf" KRB5CCNAME="/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/vampire_2000_dc/krb5_ccache" RESOLV_CONF="/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/dns_hub/rootdnsforwarder/resolv.conf" python3 ./bin/samba-tool domain join --configfile=/tmp/samba-testbase/b17/samba-ad-dc-2/bin/ab/vampire_2000_dc/etc/smb.conf SAMBA2000.EXAMPLE.COM DC --realm=SAMBA2000.EXAMPLE.COM -UAdministrator%locDCpass5 --domain-critical-only --machinepass=machinelocDCpass5 --use-ntvfs --backend-store=mdb at /tmp/samba-testbase/b17/samba-ad-dc-2/selftest/target/Samba4.pm line 1586.
> failed to start up environment 'vampire_2000_dc' at /tmp/samba-testbase/b17/samba-ad-dc-2/selftest/target/Samba.pm line 83.
> samba can't start up known environment 'vampire_2000_dc' at /tmp/samba-testbase/b17/samba-ad-dc-2/selftest/selftest.pl line 983.
> 
> ==> /builds/samba-team/devel/samba/samba-ad-dc-2.stdout <==
> [140(1460)/152 at 23m44s] samba4.drs.repl_schema.python(vampire_2000_dc)(vampire_2000_dc)
> ERROR: Testsuite[samba4.drs.repl_schema.python(vampire_2000_dc)(vampire_2000_dc)]
> REASON: unable to set up environment vampire_2000_dc - exiting
> 
> 
> 
> FAILED (0 failures, 0 errors and 0 unexpected successes in 1 testsuites)
> 
> A summary with detailed information can be found in:
>   ./bin/ab/summary
> 
> ==> /builds/samba-team/devel/samba/samba-ad-dc-2.stderr <==
> dns_hub: sending 127.0.0.25 to address ('127.0.0.39', 39163) for name _ldap._tcp.SAMBA2000.EXAMPLE.COM
> 
> Error sending 127.0.0.25 to address ('127.0.0.39', 39163) for name _ldap._tcp.SAMBA2000.EXAMPLE.COM: 113
> 
> ----------------------------------------
> Exception happened during processing of request from ('127.0.0.39', 39163)
> Traceback (most recent call last):
>   File "/usr/lib/python3.4/socketserver.py", line 305, in _handle_request_noblock
>     self.process_request(request, client_address)
>   File "/usr/lib/python3.4/socketserver.py", line 331, in process_request
>     self.finish_request(request, client_address)
>   File "/usr/lib/python3.4/socketserver.py", line 344, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/lib/python3.4/socketserver.py", line 673, in __init__
>     self.handle()
>   File "./bin/python/samba/tests/dns_forwarder_helpers/dns_hub.py", line 122, in handle
>     sock.sendto(send_packet, self.client_address)
> OSError: [Errno 113] No route to host


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-dns_hub-do-not-crash-if-a-socket-fails.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190119/da849738/0001-python-dns_hub-do-not-crash-if-a-socket-fails.bin>


More information about the samba-technical mailing list