ceph/ceph-ansible

Dash doesn't support pipefail

Eli-Tarrago opened this issue · 2 comments

Bug Report

What happened:
Purging a cluster with few binaries.

In the playbook, infrastructure-playbooks/purge-cluster.yml ansible.builtin.cmd default shell is set to /bin/sh. In minimal Ubuntu installs, /bin/sh is symlinked to /bin/dash. In dash, pipefail is not a recognized argument.

set -o pipefail is not a supported option.

fatal: [10.10.10.10]: FAILED! => changed=false
  cmd: set -o pipefail && (grep /var/lib/ceph/osd /proc/mounts || echo -n) | awk '{ print $2 }'
  delta: '0:00:00.002383'
  end: '2024-05-30 19:29:12.705739'
  msg: non-zero return code
  rc: 2
  start: '2024-05-30 19:29:12.703356'
  stderr: '/bin/sh: 1: set: Illegal option -o pipefail'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Environment:

  • OS (e.g. from /etc/os-release):
cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
  • Kernel (e.g. uname -a): Linux ceph-2 6.5.0-1021-azure #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Docker version if applicable (e.g. docker version): n/a
  • Ansible version (e.g. ansible-playbook --version): 2.16.5
  • ceph-ansible version (e.g. git head or tag or stable branch): stable-8.0
  • Ceph version (e.g. ceph -v): 18.2.2

PR: #7570 has been opened as a possible solution.