Univention Bugzilla – Bug 38673
Shutdown of Windows VM fails - winexe vs. Samba-libs
Last modified: 2018-11-01 19:53:39 CET
Running command phase (6/6) on VM [slave095] . utils.sh; shutdown_windows_host 10.210.108.142 'True' fail: return code 1 $ ec2-terminate-old-jenkins -j UCS-4.0/UCS-4.0-2/Autotest\ MultiEnv/SambaVersion=s4,Systemrolle=slave O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[23] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[24] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[25] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[26] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[27] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[28] Test-jenkins-win2k12095 O UCS-4.0/UCS-4.0-2/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave[29] Test-jenkins-win2k12095
Maybe we need to rebuild winexe due to the Samba upgrade: Execute: . utils.sh; promote_ad_w2k12 10.210.102.196 autotest223.local Traceback (most recent call last): File "<string>", line 4, in <module> File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 434, in promote_ad self.set_local_user_password(self.domain_admin, self.domain_password) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 445, in set_local_user_password self.winexec("cmd /C net user %s" % (user + " " + password), domain_mode=False) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 231, in winexec return self.__run_command(cmd, dont_fail=dont_fail) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 154, in __run_command raise WinExeFailed("command '%s' failed with: %s %s" % (" ".join(cmd), stdout, stderr)) univention.winexe.WinExeFailed: command 'winexe --interactive=0 -U testadmin%Univention@99 //10.210.102.196 cmd /C net user administrator Univention@99' failed with: winexe: /usr/lib/x86_64-linux-gnu/samba/libcli-ldap.so.0: version `SAMBA_4.2.0RC2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/libsamba-debug.so.0: version `SAMBA_4.2.0RC2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/liberrors.so.0: version `SAMBA_4.2.0RC2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/libdcerpc-samba.so.0: version `SAMBA_4.2.0RC2_DEBIAN' not found (required by winexe) None *** Failed 1: . utils.sh; promote_ad_w2k12 10.210.102.196 autotest223.local
I've copied the winexe source package to the errata4.0-2 scope. The build fails with the following messages: Waf: Entering directory `/build/winexe-1.1.0/winexe-winexe-waf/source/build' [ 1/16] c: winexesvc_launch.c -> build/winexesvc_launch.c.1.o ../winexesvc_launch.c: In function 'winexesvcStart': ../winexesvc_launch.c:113:45: warning: 'specificError' may be used uninitialized in this function [-Wuninitialized] [ 2/16] c: winexesvc_loop.c -> build/winexesvc_loop.c.1.o [ 3/16] cprogram: build/winexesvc_launch.c.1.o build/winexesvc_loop.c.1.o -> build/winexesvc32.exe /usr/bin/i686-w64-mingw32-ld: unrecognized option '-z' /usr/bin/i686-w64-mingw32-ld: use the --help option for usage information collect2: ld returned 1 exit status Waf: Leaving directory `/build/winexe-1.1.0/winexe-winexe-waf/source/build' Build failed -> task in 'winexesvc32.exe' failed (exit status 1): {task 150924396: cprogram winexesvc_launch.c.1.o,winexesvc_loop.c.1.o -> winexesvc32.exe} ['/usr/bin/i586-mingw32msvc-gcc', '-Wl,-z,relro', '-s', 'winexesvc_launch.c.1.o', 'winexesvc_loop.c.1.o', '-o', '/build/winexe-1.1.0/winexe-winexe-waf/source/build/winexesvc32.exe', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-luserenv'] make[1]: *** [override_dh_auto_build] Error 1 make[1]: Leaving directory `/build/winexe-1.1.0' make: *** [build] Error 2
(In reply to Stefan Gohmann from comment #2) > I've copied the winexe source package to the errata4.0-2 scope. The build > fails with the following messages: The amd64 build was successful. Strange.
Yes, strange, I guess it's some waf issue, in amd64 I just tried with waf build -vv, and the linker flag "-z" is not passed to the command: [ 3/16] cprogram: build/winexesvc_launch.c.1.o build/winexesvc_loop.c.1.o -> build/winexesvc32.exe 06:48:05 runner ['/usr/bin/i586-mingw32msvc-gcc', '-s', 'winexesvc_launch.c.1.o', 'winexesvc_loop.c.1.o', '-o', '/root/winexe-1.1.0/winexe-winexe-waf/source/build/winexesvc32.exe', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-luserenv'] I'll check again with i686.
Joining the Windows server fails: > . utils.sh; join_windows_memberserver 10.210.157.43 autotest0.. fail: return code 1 > . utils.sh; set_windows_gateway 10.210.157.43 autotest095.loc.. fail: return code 1 > . utils.sh; install_gpmc_windows 10.210.157.43 autotest095.lo.. fail: return code 1 The shutdown fails with this error message (but this might be relate to the fact, that the original Master is no longer running and I did run the command for my own host) # python >>> import univention.winexe >>> win=univention.winexe.WinExe('dummydomain', 'administrator', 'Univention@99', 'testadmin', 'Univention@99', 445, '10.210.157.43') >>> win.shutdown_remote_win_host(True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 453, in shutdown_remote_win_host self.winexec("shutdown", domain_mode=domain_mode) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 216, in winexec self.__copy_script(script=script[0], domain_mode=domain_mode, runas_user=runas_user, runas_password=runas_password) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 171, in __copy_script raise WinExeFailed("certutil not found on client %s! (%s %s)" % (self.client, stderr, stdout)) univention.winexe.WinExeFailed: certutil not found on client 10.210.157.43! (None ERROR: Cannot connect to svcctl pipe. NT_STATUS_LOGON_FAILURE.) The VM is not reachable via rdesktop.
Jenkins: S4-Slave fails again: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-2/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=slave/69/console> > . utils.sh; join_windows_memberserver 10.210.49.47 autotest09.. fail: return code 1 > . utils.sh; set_windows_gateway 10.210.49.47 autotest095.loca.. fail: return code 1 > . utils.sh; install_gpmc_windows 10.210.49.47 autotest095.loc.. fail: return code 1 We releases an Samab4 errata yesterday, maybe winexec needs to be updated again? # . utils.sh;join_windows_memberserver 10.210.49.47 autotest095.local 10.210.253.189 Traceback (most recent call last): File "<string>", line 2, in <module> ImportError: No module named winexe # . utils.sh; install_ucs_windows_tools # . utils.sh;join_windows_memberserver 10.210.49.47 autotest095.local 10.210.253.189 Traceback (most recent call last): File "<string>", line 4, in <module> File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 289, in domain_join self.winexec("firewall-turn-off", domain_mode=False) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 216, in winexec self.__copy_script(script=script[0], domain_mode=domain_mode, runas_user=runas_user, runas_password=runas_password) File "/usr/lib/pymodules/python2.7/univention/winexe.py", line 171, in __copy_script raise WinExeFailed("certutil not found on client %s! (%s %s)" % (self.client, stderr, stdout)) univention.winexe.WinExeFailed: certutil not found on client 10.210.49.47! (None winexe: /usr/lib/x86_64-linux-gnu/samba/libcli-ldap.so.0: version `SAMBA_4.2.2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/libsamba-debug.so.0: version `SAMBA_4.2.2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/liberrors.so.0: version `SAMBA_4.2.2_DEBIAN' not found (required by winexe) winexe: /usr/lib/x86_64-linux-gnu/samba/libdcerpc-samba.so.0: version `SAMBA_4.2.2_DEBIAN' not found (required by winexe))
r62275 | Bug #38673 test: Return error code Changed "install_ucs_windows_tools" (and others) to return an error on failed install
<http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-2/job/Autotest MultiEnv/SambaVersion=s4,Systemrolle=slave/71/consoleFull> . utils.sh; join_windows_memberserver 10.210.203.71 autotest095.local 10.210.180.108 fail: return code 1 . utils.sh; set_windows_gateway 10.210.203.71 autotest095.local 10.210.180.108 fail: return code 1 . utils.sh; install_gpmc_windows 10.210.203.71 autotest095.local fail: return code 1 . utils.sh; shutdown_windows_host 10.210.203.71 'True' fail: return code 1 (In reply to Stefan Gohmann from comment #2) > I've copied the winexe source package to the errata4.0-2 scope. The build > fails with the following messages: ... > /usr/bin/i686-w64-mingw32-ld: unrecognized option '-z' "dpkg-buildflags" is the culprit, which detects hardening support in "binutils", which are missing in binutils-mingw-w64-*. r62396 | Bug #38673 winexe: Fix winexe build export DEB_BUILD_MAINT_OPTIONS=hardening=-all Package: winexe Version: 1.1.0-12.20.201507241230 Branch: ucs_4.0-0 Scope: errata4.0-2 TODO: Needs to be announced as unmaintained after QA! OK: # . utils.sh && shutdown_windows_host 10.210.203.71 False
Ok: * Returning of error codes from ucs-ec2-tools/examples/jenkins/utils/utils.sh * winexe built in ucs-4.0-3 & errata4.0-3 Please also merge the winexe packaging fix to ucs-4.1-0
(In reply to Arvid Requate from comment #9) > Ok: > * Returning of error codes from ucs-ec2-tools/examples/jenkins/utils/utils.sh > * winexe built in ucs-4.0-3 & errata4.0-3 > > Please also merge the winexe packaging fix to ucs-4.1-0 r64115 | Bug #38673 winexe: Fix winexe build Package: winexe Version: 1.1.0-12.27.201509251024 Branch: ucs_4.1-0