You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==> azure-chroot: Provisioning with Ansible...
azure-chroot: Setting up proxy adapter for Ansible....
2020/10/06 09:53:11 packer-provisioner-ansible plugin: Creating inventory file for Ansible run...
==> azure-chroot: Executing Ansible: ansible-playbook -e packer_build_name="azure-chroot" -e packer_builder_type=azure-chroot -vvvv -e ansible_ssh_private_key_file=/tmp/ansible-key153810056 -i /tmp/packer-provisioner-ansible739888199 /playbook.yml
2020/10/06 09:53:11 packer-provisioner-ansible plugin: SSH proxy: serving on 127.0.0.1:35267
azure-chroot: ansible-playbook 2.7.7
azure-chroot: config file = /etc/ansible/ansible.cfg
azure-chroot: configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
azure-chroot: ansible python module location = /usr/lib/python3/dist-packages/ansible
azure-chroot: executable location = /usr/bin/ansible-playbook
azure-chroot: python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
azure-chroot: Using /etc/ansible/ansible.cfg as config file
azure-chroot: setting up inventory plugins
azure-chroot: /tmp/packer-provisioner-ansible739888199 did not meet host_list requirements, check plugin documentation if this is unexpected
azure-chroot: /tmp/packer-provisioner-ansible739888199 did not meet script requirements, check plugin documentation if this is unexpected
azure-chroot: Parsed /tmp/packer-provisioner-ansible739888199 inventory source with ini plugin
azure-chroot: Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3/dist-packages/ansible/plugins/callback/default.py
azure-chroot:
azure-chroot: PLAYBOOK: playbook.yml *********************************************************
azure-chroot: 1 plays in /playbook.yml
azure-chroot:
azure-chroot: PLAY [test] ********************************************************************
azure-chroot: META: ran handlers
azure-chroot:
azure-chroot: TASK [install packages] ********************************************************
azure-chroot: task path: /playbook.yml:6
azure-chroot: <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: root
azure-chroot: <127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=35267 -o 'IdentityFile="/tmp/ansible-key153810056"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/608cf842cc 127.0.0.1 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
2020/10/06 09:53:12 packer-provisioner-ansible plugin: SSH proxy: accepted connection
2020/10/06 09:53:12 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:57744 to 127.0.0.1:35267 as root using none
2020/10/06 09:53:12 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:57744 to 127.0.0.1:35267 as root using publickey
2020/10/06 09:53:12 packer-provisioner-ansible plugin: new exec request: /bin/sh -c 'echo ~root && sleep 0'
2020/10/06 09:53:12 packer-builder-azure-chroot plugin: Executing: /bin/sh []string{"/bin/sh", "-c", "chroot /mnt/packer-azure-chroot-disks/sdd /bin/sh -c \"/bin/sh -c 'echo ~root && sleep 0'\""}
When I run the ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=35267 -o 'IdentityFile="/tmp/ansible-key153810056"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/608cf842cc 127.0.0.1 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"'' command from another terminal, I get expected output /root and the channel is still open. Closing it with Ctrl-D or redirecting input from /dev/null completes the command as expected:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked as resolved and limited conversation to collaborators
May 17, 2021
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Overview of the Issue
Ansible Provisioner with Azure Builder (chroot) builder stuck infinitely at first Ansible task. Using Ansible 2.7.7 with Packer 1.6.4
Reproduction Steps
packer build
azure-chroot: Provisioning with Ansible...
Packer version
Packer v1.6.4
Simplified Packer Buildfile
Operating system and Environment details
Debian GNU/Linux 10 (buster) on Azure
Log Fragments and crash.log files
When I run the
ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=35267 -o 'IdentityFile="/tmp/ansible-key153810056"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/608cf842cc 127.0.0.1 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
command from another terminal, I get expected output/root
and the channel is still open. Closing it with Ctrl-D or redirecting input from/dev/null
completes the command as expected:First, connecting with SSH:
Packer outputs:
and after sending Ctrl-D on from the client
The text was updated successfully, but these errors were encountered: