2018-06-12 12:37:49 |
Serhat Rıfat Demircan |
description |
Hello,
When we run "kolla_ansible deploy" command, we get following error when configuring osd's on ceph nodes.
2018-06-12 13:07:55,631 p=1033 u=root | fatal: [ceph15]: FAILED! => {"changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "sudo", "-E", "ansible", "localhost", "-m", "find_disks", "-a", "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix' use_udev=True"], "delta": "18:17:43.723299", "end": "2018-06-12 13:07:55.521106", "failed_when_result": true, "msg": "non-zero return code", "rc": -9, "start": "2018-06-11 18:50:11.797807", "stderr": "", "stderr_lines": [], "stdout": "[sudo] password for ansible: ", "stdout_lines": ["[sudo] password for ansible: "]}
After we inspected kolla_toolbox image, we have discovered kolla_ansible_sudoers file is misconfigured. ansible executable path "/usr/bin/ansible" is not in sudoers file.
(kolla-toolbox)[root@ceph15 /]# cat /etc/sudoers.d/kolla_ansible_sudoers
ansible ALL=(root) NOPASSWD: /opt/ansible/bin/ansible localhost -m find_disks -a *, /usr/local/bin/ansible localhost -m find_disks -a *
(kolla-toolbox)[root@ceph15 /]# which ansible
/usr/bin/ansible |
Hello,
When we run "kolla_ansible deploy" command, we get following error while configuring osd's on ceph nodes.
2018-06-12 13:07:55,631 p=1033 u=root | fatal: [ceph15]: FAILED! => {"changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "sudo", "-E", "ansible", "localhost", "-m", "find_disks", "-a", "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix' use_udev=True"], "delta": "18:17:43.723299", "end": "2018-06-12 13:07:55.521106", "failed_when_result": true, "msg": "non-zero return code", "rc": -9, "start": "2018-06-11 18:50:11.797807", "stderr": "", "stderr_lines": [], "stdout": "[sudo] password for ansible: ", "stdout_lines": ["[sudo] password for ansible: "]}
After we inspected kolla_toolbox image, we have discovered kolla_ansible_sudoers file is misconfigured. ansible executable path "/usr/bin/ansible" is not in sudoers file.
(kolla-toolbox)[root@ceph15 /]# cat /etc/sudoers.d/kolla_ansible_sudoers
ansible ALL=(root) NOPASSWD: /opt/ansible/bin/ansible localhost -m find_disks -a *, /usr/local/bin/ansible localhost -m find_disks -a *
(kolla-toolbox)[root@ceph15 /]# which ansible
/usr/bin/ansible |
|