ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
77 stars 44 forks source link

[Bug] zos_copy PDS(xxx) to PDS(xxx) fails at 1.4.0-beta.2 #543

Closed Michael-Baylis closed 1 year ago

Michael-Baylis commented 2 years ago

Bug description

fails at 1.4.0-beta.2 but works at 1.4.0-beta.1

Appears to be doing a LISTCAT ENT('SYS1.SAMPLIB') DATA ALL for a PDS, the DATA is throwing it out.

fatal: [mike]: FAILED! => {"changed": false, "msg": "Failure during execution of mvscmd; Return code: 4; stdout: 1IDCAMS SYSTEM SERVICES TIME: 13:55:55 10/21/22 PAGE 1\n0 \n LISTCAT ENT('SYS1.SAMPLIB') DATA ALL\n0IDC1565I SYS1.SAMPLIB NOT A REQUESTED TYPE\n1IDCAMS SYSTEM SERVICES TIME: 13:55:55 10/21/22 PAGE 2\n0 THE NUMBER OF ENTRIES PROCESSED WAS:\n0 AIX -------------------0\n ALIAS -----------------0\n CLUSTER ---------------0\n DATA ------------------0\n GDG -------------------0\n INDEX -----------------0\n NONVSAM ---------------0\n PAGESPACE -------------0\n PATH ------------------0\n SPACE -----------------0\n USERCATALOG -----------0\n TAPELIBRARY -----------0\n TAPEVOLUME ------------0\n TOTAL -----------------0\n0 THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0\n0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4\n0 \n0IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 4\n; stderr: ", "rc": null, "stderr": null, "stderr_lines": null, "stdout": null, "stdout_lines": null}

Playbook verbosity output

ansible-playbook -i hosts test.yml -vvvv ansible-playbook 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible-playbook python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] Using /etc/ansible/ansible.cfg as config file setting up inventory plugins host_list declined parsing /git/cicsh3n-playbook/hosts as it did not pass its verify_file() method script declined parsing /git/cicsh3n-playbook/hosts as it did not pass its verify_file() method auto declined parsing /git/cicsh3n-playbook/hosts as it did not pass its verify_file() method Parsed /git/cicsh3n-playbook/hosts inventory source with ini plugin Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3/dist-packages/ansible/plugins/callback/default.py

PLAYBOOK: test.yml ** Positional arguments: test.yml verbosity: 4 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/git/cicsh3n-playbook/hosts',) forks: 5 1 plays in test.yml

PLAY [Network Getting Started First Playbook Extended] ** META: ran handlers

TASK [Copy a sequential data set to a PDS member] *** task path: /git/cicsh3n-playbook/test.yml:20

ESTABLISH SSH CONNECTION FOR USER: ibmuser SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd hursvl01.hursley.ibm.com '/bin/sh -c '"'"'echo ~ibmuser && sleep 0'"'"'' (0, b'/u/ibmuser\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/root/.ansible/cp/5b0db519bd" does not exist\r\ndebug2: resolving "hursvl01.hursley.ibm.com" port 23122\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to hursvl01.hursley.ibm.com [9.20.6.250] port 23122.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9959 ms remain after connect\r\ndebug1: identity file /root/.ssh/id_rsa type -1\r\ndebug1: identity file /root/.ssh/id_rsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_dsa type -1\r\ndebug1: identity file /root/.ssh/id_dsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa-cert type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk type -1\r\ndebug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519 type -1\r\ndebug1: identity file /root/.ssh/id_ed25519-cert type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk type -1\r\ndebug1: identity file /root/.ssh/id_ed25519_sk-cert type -1\r\ndebug1: identity file /root/.ssh/id_xmss type -1\r\ndebug1: identity file /root/.ssh/id_xmss-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.6\r\ndebug1: match: OpenSSH_7.6 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to hursvl01.hursley.ibm.com:23122 as \'ibmuser\'\r\ndebug3: put_host_port: [hursvl01.hursley.ibm.com]:23122\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:215\r\ndebug3: load_hostkeys: loaded 1 keys from [hursvl01.hursley.ibm.com]:23122\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c\r\ndebug2: host key algorithms: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1\r\ndebug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256\r\ndebug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr\r\ndebug2: MACs ctos: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,zlib@openssh.com\r\ndebug2: compression stoc: none,zlib@openssh.com\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: rsa-sha2-512\r\ndebug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: zlib@openssh.com\r\ndebug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: zlib@openssh.com\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ssh-rsa SHA256:4Ov6KHwRR4URnKKZauyaOZuaQvKLt/we8NvYJphMTFw\r\ndebug3: put_host_port: [9.20.6.250]:23122\r\ndebug3: put_host_port: [hursvl01.hursley.ibm.com]:23122\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:215\r\ndebug3: load_hostkeys: loaded 1 keys from [hursvl01.hursley.ibm.com]:23122\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:216\r\ndebug3: load_hostkeys: loaded 1 keys from [9.20.6.250]:23122\r\ndebug1: Host \'[hursvl01.hursley.ibm.com]:23122\' is known and matches the RSA host key.\r\ndebug1: Found key in /root/.ssh/known_hosts:215\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey out after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey in after 4294967296 blocks\r\ndebug1: Will attempt key: Main SSH Key RSA SHA256:XKQlBN2e5G9+lsgwkQRxQrULFr1bU3KNB8Vlh2fC/g4 agent\r\ndebug1: Will attempt key: /root/.ssh/id_rsa \r\ndebug1: Will attempt key: /root/.ssh/id_dsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa \r\ndebug1: Will attempt key: /root/.ssh/id_ecdsa_sk \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519 \r\ndebug1: Will attempt key: /root/.ssh/id_ed25519_sk \r\ndebug1: Will attempt key: /root/.ssh/id_xmss \r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password\r\ndebug3: start over, passed a different list publickey,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering public key: Main SSH Key RSA SHA256:XKQlBN2e5G9+lsgwkQRxQrULFr1bU3KNB8Vlh2fC/g4 agent\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 60\r\ndebug1: Server accepts key: Main SSH Key RSA SHA256:XKQlBN2e5G9+lsgwkQRxQrULFr1bU3KNB8Vlh2fC/g4 agent\r\ndebug3: sign_and_send_pubkey: RSA SHA256:XKQlBN2e5G9+lsgwkQRxQrULFr1bU3KNB8Vlh2fC/g4\r\ndebug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:XKQlBN2e5G9+lsgwkQRxQrULFr1bU3KNB8Vlh2fC/g4\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to hursvl01.hursley.ibm.com ([9.20.6.250]:23122).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /root/.ansible/cp/5b0db519bd.Hh5IyZCMGhJ0gP4C\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/root/.ansible/cp/5b0db519bd]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 3054\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: mux_master_process_hello: channel 1 slave version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: mux_master_process_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 103\r\ndebug2: mux_master_process_new_session: channel 1: request tty 0, X 0, agent 1, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'echo ~ibmuser && sleep 0\'", env 1\r\ndebug3: mux_master_process_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: mux_master_process_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug1: Requesting authentication agent forwarding.\r\ndebug2: channel 2: request auth-agent-req@openssh.com confirm 0\r\ndebug3: send packet: type 98\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = C.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'echo ~ibmuser && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: channel_input_open_confirmation: channel 2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: chan_shutdown_read (i0 o0 sock -1 wfd 6 efd 8 [write])\r\ndebug2: channel 2: input open -> closed\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: chan_shutdown_write (i3 o1 sock -1 wfd 7 efd 8 [write])\r\ndebug2: channel 2: output drain -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: channel 1: chan_shutdown_read (i0 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o1/16 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n #2 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/8 sock -1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: chan_shutdown_write (i3 o1 sock 5 wfd 5 efd -1 [closed])\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: channel 1: status: The following connections are open:\r\n #1 mux-control (t16 nr0 i3/0 o3/0 e[closed]/0 fd 5/5/-1 sock 5 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ESTABLISH SSH CONNECTION FOR USER: ibmuser SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd hursvl01.hursley.ibm.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167 `" && echo ansible-tmp-1666357045.0649095-234868295245167="` echo /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167 `" ) && sleep 0'"'"'' (0, b'ansible-tmp-1666357045.0649095-234868295245167=/u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') Using module file /root/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_copy.py PUT /root/.ansible/tmp/ansible-local-3023t9nkv6_0/tmpmf8jn3m4 TO /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/AnsiballZ_zos_copy.py SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd '[hursvl01.hursley.ibm.com]' (0, b'sftp> put /root/.ansible/tmp/ansible-local-3023t9nkv6_0/tmpmf8jn3m4 /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/AnsiballZ_zos_copy.py\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /u/ibmuser size 0\r\ndebug3: Looking up /root/.ansible/tmp/ansible-local-3023t9nkv6_0/tmpmf8jn3m4\r\ndebug3: Sent message fd 3 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/AnsiballZ_zos_copy.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:9 O:163840 S:20624\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 32768 bytes at 131072\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 9 20624 bytes at 163840\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ESTABLISH SSH CONNECTION FOR USER: ibmuser SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd hursvl01.hursley.ibm.com '/bin/sh -c '"'"'chmod u+x /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/ /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/AnsiballZ_zos_copy.py && sleep 0'"'"'' (0, b'', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') ESTABLISH SSH CONNECTION FOR USER: ibmuser SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd -tt hursvl01.hursley.ibm.com '/bin/sh -c '"'"'_BPXK_AUTOCVT=ON PATH=/bin:/usr/lpp/IBM/zoautil/bin LIBPATH=/usr/lpp/IBM/cyp/v3r8/pyz/lib:/lib:/usr/lib:/usr/lpp/IBM/zoautil/lib ZOAU_HOME=/usr/lpp/IBM/zoautil ZOAU_ROOT=/usr/lpp/IBM/zoautil PYTHONPATH=/usr/lpp/IBM/zoautil/lib /usr/lpp/IBM/cyp/v3r8/pyz/bin/python3 /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/AnsiballZ_zos_copy.py && sleep 0'"'"'' (1, b'\r\n{"msg": "Failure during execution of mvscmd; Return code: 4; stdout: 1IDCAMS SYSTEM SERVICES TIME: 13:57:30 10/21/22 PAGE 1\\n0 \\n LISTCAT ENT(\'SYS1.SAMPLIB\') DATA ALL\\n0IDC1565I SYS1.SAMPLIB NOT A REQUESTED TYPE\\n1IDCAMS SYSTEM SERVICES TIME: 13:57:30 10/21/22 PAGE 2\\n0 THE NUMBER OF ENTRIES PROCESSED WAS:\\n0 AIX -------------------0\\n ALIAS -----------------0\\n CLUSTER ---------------0\\n DATA ------------------0\\n GDG -------------------0\\n INDEX -----------------0\\n NONVSAM ---------------0\\n PAGESPACE -------------0\\n PATH ------------------0\\n SPACE -----------------0\\n USERCATALOG -----------0\\n TAPELIBRARY -----------0\\n TAPEVOLUME ------------0\\n TOTAL -----------------0\\n0 THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0\\n0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4\\n0 \\n0IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 4\\n; stderr: ", "failed": true, "exception": " File \\"/tmp/ansible_ibm.ibm_zos_core.zos_copy_payload_yb7cg11b/ansible_ibm.ibm_zos_core.zos_copy_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_copy.py\\", line 2038, in run_module\\n File \\"/tmp/ansible_ibm.ibm_zos_core.zos_copy_payload_yb7cg11b/ansible_ibm.ibm_zos_core.zos_copy_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/module_utils/data_set.py\\", line 513, in data_set_type\\n output = DataSet._get_listcat_data(name)\\n File \\"/tmp/ansible_ibm.ibm_zos_core.zos_copy_payload_yb7cg11b/ansible_ibm.ibm_zos_core.zos_copy_payload.zip/ansible_collections/ibm/ibm_zos_core/plugins/module_utils/data_set.py\\", line 549, in _get_listcat_data\\n raise MVSCmdExecError(rc, stdout, stderr)\\n", "invocation": {"module_args": {"src": "SYS1.SAMPLIB(IZUPRM00)", "dest": "USER.PARMLIB(IZUPRM00)", "remote_src": true, "validate": false, "is_uss": false, "is_pds": false, "is_src_dir": false, "copy_member": true, "src_member": true, "temp_path": null, "is_mvs_dest": false, "local_charset": "UTF-8", "is_binary": false, "backup": false, "local_follow": true, "ignore_sftp_stderr": false, "force": false, "follow": false, "encoding": null, "content": null, "backup_name": null, "sftp_port": null, "volume": null, "dest_data_set": null, "size": null, "mode": null, "owner": null, "group": null, "seuser": null, "serole": null, "selevel": null, "setype": null, "attributes": null, "regexp": null, "delimiter": null, "directory_mode": null, "unsafe_writes": null}}}\r\n', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to hursvl01.hursley.ibm.com closed.\r\n') Failed to connect to the host via ssh: OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020 debug1: Reading configuration data /root/.ssh/config debug1: /root/.ssh/config line 4: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: auto-mux: Trying existing master debug2: fd 3 setting O_NONBLOCK debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 3056 debug3: mux_client_request_session: session request sent debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 1 Shared connection to hursvl01.hursley.ibm.com closed. ESTABLISH SSH CONNECTION FOR USER: ibmuser SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=23122 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ibmuser"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/5b0db519bd hursvl01.hursley.ibm.com '/bin/sh -c '"'"'rm -f -r /u/ibmuser/.ansible/tmp/ansible-tmp-1666357045.0649095-234868295245167/ > /dev/null 2>&1 && sleep 0'"'"'' (0, b'', b'OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /root/.ssh/config\r\ndebug1: /root/.ssh/config line 4: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3056\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n') fatal: [mike]: FAILED! => { "changed": false, "invocation": { "module_args": { "dest": "USER.PARMLIB(IZUPRM00)", "remote_src": true, "src": "SYS1.SAMPLIB(IZUPRM00)", "validate": false } }, "msg": "Failure during execution of mvscmd; Return code: 4; stdout: 1IDCAMS SYSTEM SERVICES TIME: 13:57:30 10/21/22 PAGE 1\n0 \n LISTCAT ENT('SYS1.SAMPLIB') DATA ALL\n0IDC1565I SYS1.SAMPLIB NOT A REQUESTED TYPE\n1IDCAMS SYSTEM SERVICES TIME: 13:57:30 10/21/22 PAGE 2\n0 THE NUMBER OF ENTRIES PROCESSED WAS:\n0 AIX -------------------0\n ALIAS -----------------0\n CLUSTER ---------------0\n DATA ------------------0\n GDG -------------------0\n INDEX -----------------0\n NONVSAM ---------------0\n PAGESPACE -------------0\n PATH ------------------0\n SPACE -----------------0\n USERCATALOG -----------0\n TAPELIBRARY -----------0\n TAPEVOLUME ------------0\n TOTAL -----------------0\n0 THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0\n0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 4\n0 \n0IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 4\n; stderr: ", "rc": null, "stderr": null, "stderr_lines": null, "stdout": null, "stdout_lines": null } PLAY RECAP ********************************************************************************************************************************************************************************************** mike : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ### Contents of `ansible.cfg` ```YAML None configured ``` ### Contents of the inventory ```YAML [h3n] mike ansible_host=hursvl01.hursley.ibm.com ansible_port=23122 ansible_user=ibmuser ansible_python_interpreter='/usr/lpp/IBM/cyp/v3r8/pyz/bin/python3' ``` ### Contents of `group_vars` or `host_vars` ```YAML none configured ``` ### Ansible version ```shell ansible --version ansible 2.9.6 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible executable location = /usr/bin/ansible python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] ``` ### IBM z/OS Ansible core Version v1.4.0-beta.2 ### IBM ZOAU version v1.2.0 ### z/OS version 2.5 ### Ansible module zos_copy
ddimatos commented 2 years ago

@Michael-Baylis thank for opening the issue, @rexemin will look into this and determine next steps and share that information. For now I assigned it to next sprint and we can go from there.

rexemin commented 1 year ago

Thank you again for opening this issue @Michael-Baylis, I was able to replicate it and track down the source of this bug. The module uses ZOAU to get the data set type of the destination when it exists, but in this case, there was a bug in ZOAU that made it fail to get the information and the module then tried to run the LISTCAT command used for VSAMs, which ultimately failed too. The bug in ZOAU has already been fixed by the team, and it's going to be available on its next release (1.2.2), but we won't officially support it in version 1.4.0 of ibm_zos_core, we'll start supporting ZOAU 1.2.1 on 1.5.0-beta.1, and continue from there. In the meantime, I'll implement a fix on our end for this issue.