Why does ansible gluster_volume module run a remove-brick operation while modifying volume options?
Issue
- Modifying the options of an existing Gluster volume using ansible playbook leads to remove-brick command.
tasks:
- name: "Set the retention-period to 120s"
gluster_volume:
state: present
name: "volume1"
options:
{ features.default-retention-period: "120" }
# ansible-playbook gluster_vol.yaml
(...)
TASK [Set the retention-period to 120s] ***************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: None
fatal: [192.168.1.1]: FAILED! => {"changed": false, "msg": "error running gluster (/usr/sbin/gluster --mode=script volume remove-brick volume1 gluster-0.example.com:/mnt/data1/brick1 gluster-1.example.com:/mnt/data1/brick2 gluster-2.example.com:/mnt/data1/brick3 start) command (rc=1): volume remove-brick start: failed: Removing bricks from replicate configuration is not allowed without reducing replica count explicitly.\n"}
PLAY RECAP ********************************************************************************************************************************************************************************************************
192.168.1.1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Environment
- Red Hat Enterprise Linux 7
- ansible-2.8.6-1.el7ae.noarch
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.