community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Proxmox VE 6.4 internal server error on LXC creation

Open AX-florian opened this issue 3 years ago • 8 comments

Summary

When I try to create a Linux container on a Proxmox VE 6.4 host with the module "community.general.proxmox", an internal server error is returned. Versions below 6.4 are not affected.

The reason for this error is the Proxmox API option "rootfs", which is used incorrectly by the Ansible module. See this forum thread for a more detailed explanation.

The function "create_instance" of "ansible_collections/community/general/plugins/modules/proxmox.py" with error:

def create_instance(module, proxmox, vmid, node, disk, storage, cpus, memory, swap, timeout, **kwargs$    proxmox_node = proxmox.nodes(node)
    kwargs = dict((k, v) for k, v in kwargs.items() if v is not None)

    if VZ_TYPE == 'lxc':
        kwargs['cpulimit'] = cpus
        kwargs['rootfs'] = disk
        if 'netif' in kwargs:
            kwargs.update(kwargs['netif'])
            del kwargs['netif']
        if 'mounts' in kwargs:
            kwargs.update(kwargs['mounts'])
            del kwargs['mounts']
        if 'pubkey' in kwargs:
            if proxmox_version(proxmox) >= LooseVersion('4.2'):
                kwargs['ssh-public-keys'] = kwargs['pubkey']
            del kwargs['pubkey']

and with fix:

def create_instance(module, proxmox, vmid, node, disk, storage, cpus, memory, swap, timeout, **kwargs$    proxmox_node = proxmox.nodes(node)
    kwargs = dict((k, v) for k, v in kwargs.items() if v is not None)

    if VZ_TYPE == 'lxc':
        kwargs['cpulimit'] = cpus
        kwargs['rootfs'] = storage + ":" + disk
        if 'netif' in kwargs:
            kwargs.update(kwargs['netif'])
            del kwargs['netif']
        if 'mounts' in kwargs:
            kwargs.update(kwargs['mounts'])
            del kwargs['mounts']
        if 'pubkey' in kwargs:
            if proxmox_version(proxmox) >= LooseVersion('4.2'):
                kwargs['ssh-public-keys'] = kwargs['pubkey']
            del kwargs['pubkey']

Issue Type

Bug Report

Component Name

plugins/modules/proxmox.py

Ansible Version

$ ansible --version
ansible 2.10.11
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]

Configuration

$ ansible-config dump --only-changed
COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = ['/usr/share/ansible/collections']
DEFAULT_PRIVATE_KEY_FILE(/etc/ansible/ansible.cfg) = /var/lib/rundeck/.ssh/config_key
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = config
DEFAULT_VAULT_PASSWORD_FILE(/etc/ansible/ansible.cfg) = /etc/rundeck/.vaultPW
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_legacy_silent

OS / Environment

Debian GNU/Linux 10 (buster)

Steps to Reproduce

---
- hosts: "{{ vm_fqdn }}"
  gather_facts: no
  vars_files:
    - /yaml/Vaults/vars.yaml
  vars:
    vm_template_name: "template-debian9.tar.gz"
  tasks:
  - name: Delegate tasks to Proxmox host
    delegate_to: "{{ proxmox_host }}"
    block:
    - name: Create LXC Container
      become: true
      proxmox:
        proxmox_default_behavior: compatibility
        api_user: 'api@pve'
        api_password: "{{ proxmox_api_password }}"
        api_host: "localhost"
        node: '{{ proxmox_host_new | regex_replace("\..*", "") }}'
        unprivileged: no
        password: "{{ password}}"
        hostname: "{{ hostname }}"
        cores: "{{ vm_cpu_limit }}"
        cpus: "{{ vm_cpu_limit }}"
        memory: "{{ vm_memory_limit }}"
        swap: "{{ vm_memory_limit }}"
        ostemplate: 'local:vztmpl/{{ vm_template_name }}'
        storage: 'local-lvm'
        disk: '{{ vm_disk_size | int }}'
        netif: '{"net0":"name=eth0,ip={{ ipv4_address }}/{{ ipv4_netmask }},gw={{ ipv4_gateway }},bridge=vmbr0,tag={{ vlan_id }}"}'
        onboot: yes
        state: present

Expected Results

I expect a Linux container to be created on the PVE instance "pve_6_4.intern.domain.net".

Actual Results

TASK [Create LXC Container] ****************************************************
task path: /yaml/Common/CreateVM.yml:40
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'echo ~config && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'/home/config\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/var/lib/rundeck/.ansible/cp/5b6fcd9e50" does not exist\r\ndebug2: resolving "pve_6_4.intern.domain.net" port 22\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to pve_6_4.intern.domain.net [192.168.13.33] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 29977 ms remain after connect\r\ndebug1: identity file /tmp/rundeck/ansible-runner3807481625262629195id_rsa type -1\r\ndebug1: identity file /tmp/rundeck/ansible-runner3807481625262629195id_rsa-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2\r\ndebug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to pve_6_4.intern.domain.net:22 as \'config\'\r\ndebug3: hostkeys_foreach: reading file "/var/lib/rundeck/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /var/lib/rundeck/.ssh/known_hosts:632\r\ndebug3: load_hostkeys: loaded 1 keys from pve_6_4.intern.domain.net\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\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,[email protected],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,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: [email protected],zlib,none\r\ndebug2: compression stoc: [email protected],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,[email protected],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: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected]\r\ndebug2: compression stoc: none,[email protected]\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: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: [email protected]\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: [email protected]\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: ecdsa-sha2-nistp256 SHA256:upxeEbqrFLo2wUf/U47Q9+BT3JcJhuvHdYJlBD0YKew\r\ndebug3: hostkeys_foreach: reading file "/var/lib/rundeck/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /var/lib/rundeck/.ssh/known_hosts:632\r\ndebug3: load_hostkeys: loaded 1 keys from pve_6_4.intern.domain.net\r\ndebug3: hostkeys_foreach: reading file "/var/lib/rundeck/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /var/lib/rundeck/.ssh/known_hosts:633\r\ndebug3: load_hostkeys: loaded 1 keys from 192.168.13.33\r\ndebug1: Host \'pve_6_4.intern.domain.net\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /var/lib/rundeck/.ssh/known_hosts:632\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 134217728 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 after 134217728 blocks\r\ndebug1: Will attempt key: /tmp/rundeck/ansible-runner3807481625262629195id_rsa  explicit\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=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>\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: Trying private key: /tmp/rundeck/ansible-runner3807481625262629195id_rsa\r\ndebug3: sign_and_send_pubkey: RSA SHA256:t2VWzE+fCSLjDdqZjr1qYy9u1UgbO+DeloSnrzbOB5Q\r\ndebug3: sign_and_send_pubkey: signing using rsa-sha2-512\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to pve_6_4.intern.domain.net ([192.168.13.33]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /var/lib/rundeck/.ansible/cp/5b6fcd9e50.GbvxiNNAQKmk7G0l\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 [/var/lib/rundeck/.ansible/cp/5b6fcd9e50]\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 27142\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 = 27147\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 92\r\ndebug2: mux_master_process_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "", cmd "/bin/sh -c \'echo ~config && 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 [email protected] want_reply 0\r\ndebug3: receive packet: type 4\r\ndebug1: Remote: /home/config/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG = de_DE.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug1: Sending command: /bin/sh -c \'echo ~config && 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 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 (i0 o1 sock -1 wfd 7 efd 8 [write])\r\ndebug2: channel 2: output drain -> closed\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 [email protected] reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: chan_shutdown_read (i0 o3 sock -1 wfd 6 efd 8 [write])\r\ndebug2: channel 2: input open -> 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')
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/config/.ansible/tmp `"&& mkdir "` echo /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584 `" && echo ansible-tmp-1632399888.0665581-27093-211813452495584="` echo /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584 `" ) && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'ansible-tmp-1632399888.0665581-27093-211813452495584=/home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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')
redirecting (type: modules) ansible.builtin.proxmox to community.general.proxmox
Including module_utils file ansible/__init__.py
Including module_utils file ansible/module_utils/__init__.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/__init__.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/__init__.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/__init__.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/distro/__init__.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py
<lxc-hostname.domain.net> Attempting python interpreter discovery
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'echo PLATFORM; uname; echo FOUND; command -v '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/libexec/platform-python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'PLATFORM\nLinux\nFOUND\n/usr/bin/python\n/usr/bin/python3.7\n/usr/bin/python2.7\n/usr/bin/python3\n/usr/bin/python\nENDFOUND\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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')
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'{"osrelease_content": "PRETTY_NAME=\\"Debian GNU/Linux 10 (buster)\\"\\nNAME=\\"Debian GNU/Linux\\"\\nVERSION_ID=\\"10\\"\\nVERSION=\\"10 (buster)\\"\\nVERSION_CODENAME=buster\\nID=debian\\nHOME_URL=\\"https://www.debian.org/\\"\\nSUPPORT_URL=\\"https://www.debian.org/support\\"\\nBUG_REPORT_URL=\\"https://bugs.debian.org/\\"\\n", "platform_dist_result": ["debian", "10.10", ""]}\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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 /usr/share/ansible/collections/ansible_collections/community/general/plugins/modules/proxmox.py
<pve_6_4.intern.domain.net> PUT /var/lib/rundeck/.ansible/tmp/ansible-local-2646221aoazbp/tmpvsmimp9t TO /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/AnsiballZ_proxmox.py
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set sftp_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 '[pve_6_4.intern.domain.net]'
<pve_6_4.intern.domain.net> (0, b'sftp> put /var/lib/rundeck/.ansible/tmp/ansible-local-2646221aoazbp/tmpvsmimp9t /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/AnsiballZ_proxmox.py\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\r\ndebug3: mux_client_request_session: session request sent\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 2\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug2: Server supports extension "[email protected]" revision 1\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/config size 0\r\ndebug3: Looking up /var/lib/rundeck/.ansible/tmp/ansible-local-2646221aoazbp/tmpvsmimp9t\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:/home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/AnsiballZ_proxmox.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:25096\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 25096 bytes at 98304\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')
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'chmod u+x /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/ /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/AnsiballZ_proxmox.py && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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')
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 -tt pve_6_4.intern.domain.net '/bin/sh -c '"'"'sudo -H -S -n  -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-fgtxwcrlypnzvtfhlsdzizuocpmywxfj ; /usr/bin/python /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/AnsiballZ_proxmox.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<pve_6_4.intern.domain.net> (1, b'\r\n{"msg": "creation of lxc VM 100 failed with exception: 500 Internal Server Error: Only root can pass arbitrary filesystem paths. at /usr/share/perl5/PVE/Storage.pm line 492. - {\\"data\\":null}", "failed": true, "exception": "WARNING: The below traceback may *not* be related to the actual failure.\\n  File \\"/tmp/ansible_proxmox_payload_BxUnzO/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py\\", line 639, in main\\n  File \\"/tmp/ansible_proxmox_payload_BxUnzO/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py\\", line 432, in create_instance\\n  File \\"/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py\\", line 117, in create\\n    return self.post(*args, **data)\\n  File \\"/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py\\", line 108, in post\\n    return self(args)._request(\\"POST\\", data=data)\\n  File \\"/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py\\", line 94, in _request\\n    resp.reason, resp.content))\\n", "invocation": {"module_args": {"force": false, "features": null, "cpus": 4, "ostemplate": "local:vztmpl/template-debian9.tar.gz", "unprivileged": false, "proxmox_default_behavior": "compatibility", "api_token_id": null, "disk": "1000", "searchdomain": null, "api_user": "api@pve", "hostname": "lxc-hostname", "storage": "local-lvm", "state": "present", "swap": 14336, "memory": 14336, "pubkey": null, "node": "pve_6_4", "description": null, "cpuunits": 1000, "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "api_token_secret": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "ip_address": null, "pool": null, "netif": {"net0": "name=eth0,ip=1.2.3.4/25,gw=1.2.3.1,bridge=vmbr0,tag=11"}, "api_host": "localhost", "vmid": null, "hookscript": null, "purge": false, "timeout": 30, "mounts": null, "cores": 4, "nameserver": null, "validate_certs": false, "onboot": true}}}\r\n', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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 pve_6_4.intern.domain.net closed.\r\n')
<pve_6_4.intern.domain.net> Failed to connect to the host via ssh: OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: 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 = 27147
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 pve_6_4.intern.domain.net closed.
<pve_6_4.intern.domain.net> ESTABLISH SSH CONNECTION FOR USER: config
<pve_6_4.intern.domain.net> SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa")
<pve_6_4.intern.domain.net> SSH: ansible_password/ansible_ssh_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<pve_6_4.intern.domain.net> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User="config")
<pve_6_4.intern.domain.net> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_common_args: ()
<pve_6_4.intern.domain.net> SSH: PlayContext set ssh_extra_args: ()
<pve_6_4.intern.domain.net> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50)
<pve_6_4.intern.domain.net> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/tmp/rundeck/ansible-runner3807481625262629195id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="config"' -o ConnectTimeout=30 -o ControlPath=/var/lib/rundeck/.ansible/cp/5b6fcd9e50 pve_6_4.intern.domain.net '/bin/sh -c '"'"'rm -f -r /home/config/.ansible/tmp/ansible-tmp-1632399888.0665581-27093-211813452495584/ > /dev/null 2>&1 && sleep 0'"'"''
<pve_6_4.intern.domain.net> (0, b'', b'OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d  10 Sep 2019\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 27147\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')
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_proxmox_payload_BxUnzO/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 639, in main
  File "/tmp/ansible_proxmox_payload_BxUnzO/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 432, in create_instance
  File "/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py", line 117, in create
    return self.post(*args, **data)
  File "/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py", line 108, in post
    return self(args)._request("POST", data=data)
  File "/usr/local/lib/python2.7/dist-packages/proxmoxer/core.py", line 94, in _request
    resp.reason, resp.content))
fatal: [lxc-hostname.domain.net -> pve_6_4.intern.domain.net]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_host": "localhost",
            "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_token_id": null,
            "api_token_secret": null,
            "api_user": "api@pve",
            "cores": 4,
            "cpus": 4,
            "cpuunits": 1000,
            "description": null,
            "disk": "1000",
            "features": null,
            "force": false,
            "hookscript": null,
            "hostname": "lxc-hostname",
            "ip_address": null,
            "memory": 14336,
            "mounts": null,
            "nameserver": null,
            "netif": {
                "net0": "name=eth0,ip=1.2.3.4/25,gw=1.2.3.1,bridge=vmbr0,tag=11"
            },
            "node": "pve_6_4",
            "onboot": true,
            "ostemplate": "local:vztmpl/template-debian9.tar.gz",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "pool": null,
            "proxmox_default_behavior": "compatibility",
            "pubkey": null,
            "purge": false,
            "searchdomain": null,
            "state": "present",
            "storage": "local-lvm",
            "swap": 14336,
            "timeout": 30,
            "unprivileged": false,
            "validate_certs": false,
            "vmid": null
        }
    },
    "msg": "creation of lxc VM 100 failed with exception: 500 Internal Server Error: Only root can pass arbitrary filesystem paths. at /usr/share/perl5/PVE/Storage.pm line 492. - {\"data\":null}"
}

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

AX-florian avatar Sep 27 '21 13:09 AX-florian

Files identified in the description:

  • plugins/modules/cloud/misc/proxmox

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Sep 27 '21 13:09 ansibullbot

!component =plugins/modules/proxmox.py

AX-florian avatar Sep 27 '21 13:09 AX-florian

Files identified in the description:

  • plugins/modules/proxmox.py

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Sep 27 '21 13:09 ansibullbot

!component =plugins/modules/cloud/misc/proxmox.py

felixfontein avatar Sep 27 '21 18:09 felixfontein

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Sep 27 '21 18:09 ansibullbot

cc @Ajpantuso @Thulium-Drake @UnderGreen @joshainglis @karmab @tleguern click here for bot help

ansibullbot avatar Sep 28 '21 20:09 ansibullbot

Fwiw, i've also experienced a similar issue running against proxmox 7.2 server, using ansible 2.10.7.

the full traceback of the issue is below:

The full traceback is:                                                                                                                                                                  
  File "/tmp/ansible_proxmox_payload_7hkz2561/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 634, in main                          
  File "/tmp/ansible_proxmox_payload_7hkz2561/ansible_proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 442, in create_instance               
  File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 96, in create                                                                                                           
    return self.post(*args, **data)                                                                                                                                                     
  File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 87, in post                                                                                                             
    return self(args)._request("POST", data=data)                                                                                                                                       
  File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 78, in _request                                                                                                         
    raise ResourceException("{0} {1}: {2}".format(resp.status_code, httplib.responses[resp.status_code],                                                                                
fatal: [xxx.xxx.xx]: FAILED! => {                                                                                                                                                   
    "changed": false,                                                                                                                                                                   
    "invocation": {                                                                                                                                                                     
        "module_args": {                                                                                                                                                                
            "api_host": "localhost",                                                                                                                                                    
            "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",                                                                                                                      
            "api_token_id": null,                                                                                                                                                       
            "api_token_secret": null,                                                                                                                                                   
            "api_user": "api@pve",                                                                                                                                                      
            "cores": 4,                                                                                                                                                                 
            "cpus": 4,                                                                                                                                                                  
            "cpuunits": 1024,                                                                                                                                                           
            "description": null,                                                                                                                                                        
            "disk": "10",                                                                                                                                                               
            "force": false,                                                                                                                                                             
            "hookscript": null,                                                                                                                                                         
            "hostname": "es.cabre",                                                                                                                                                     
            "ip_address": null,                                                                                                                                                         
            "memory": 4096,                                                                                                                                                             
            "mounts": null,                                                                                                                                                             
            "nameserver": null,                                                                                                                                                         
            "netif": {                                                                                                                                                                  
                "net0": "name=eth0,ip=dhcp,hwaddr=00:FF:01:00:00:06,bridge=vmbr0"                                                                                                       
            },                                                                                                                                                                          
            "node": "cabre",                                                                                                                                                            
            "onboot": true,                                                                                                                                                             
            "ostemplate": "local:vztmpl/debian-bullseye-craig-20220824092519-rootfs.tar.xz",                                                                                            
            "password": null,                                                                                                                                                           
            "pool": null,                                                                                                                                                               
            "proxmox_default_behavior": "compatibility",                                                                                                                                
            "pubkey": null,                                                                                                                                                             
            "searchdomain": null,                                                                                                                                                       
            "state": "present",                                                                                                                                                         
            "storage": "srv-lvm",                                                                                                                                                       
            "swap": 1024,                                                                                                                                                               
            "timeout": 90,                                                                                                                                                              
            "unprivileged": true,                                                                                                                                                       
            "validate_certs": false,                                                                                                                                                    
            "vmid": "306"                                                                                                                                                               
        }                                                                                                                                                                               
    },                                                                                                                                                                                  
    "msg": "creation of lxc VM 306 failed with exception: 500 Internal Server Error: b'{\"data\":null}'"                                                                                
}

using the proposed fix of prepending storage + ":" to disk when filing rootfs API parameter worked for me, and i was able to create the container.

landryb avatar Aug 24 '22 08:08 landryb

related to #3243 - in the end this was a documentation update, instead of a code fix ?

landryb avatar Aug 24 '22 09:08 landryb

I agree, this was fixed the the docs update. We cannot enforce the new syntax : without breaking backwards compatibility. Closing the ticket.

russoz avatar Jul 03 '23 09:07 russoz