{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/22402","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/22402/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/22402/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/22402/events","html_url":"https://github.com/ansible/ansible/issues/22402","id":212704007,"number":22402,"title":"Stopping glusterfs volume does not work due to the interactive question","user":{"login":"Hubbitus","id":720349,"avatar_url":"https://avatars2.githubusercontent.com/u/720349?v=4","gravatar_id":"","url":"https://api.github.com/users/Hubbitus","html_url":"https://github.com/Hubbitus","followers_url":"https://api.github.com/users/Hubbitus/followers","following_url":"https://api.github.com/users/Hubbitus/following{/other_user}","gists_url":"https://api.github.com/users/Hubbitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Hubbitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hubbitus/subscriptions","organizations_url":"https://api.github.com/users/Hubbitus/orgs","repos_url":"https://api.github.com/users/Hubbitus/repos","events_url":"https://api.github.com/users/Hubbitus/events{/privacy}","received_events_url":"https://api.github.com/users/Hubbitus/received_events","type":"User","site_admin":false},"labels":[{"id":454885231,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-03-08T11:04:36Z","updated_at":"2017-08-29T18:03:57Z","closed_at":"2017-08-29T18:03:57Z","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\ngluster_volume\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n$ ansible --version\r\nansible 2.3.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\nIrrelevant\r\n\r\n##### OS / ENVIRONMENT\r\nFedora 25 packages\r\n\r\n##### SUMMARY\r\nCall `gluster_volume` with `state: absent` leads to error: `Stopping volume will make its data inaccessible. Do you want to continue? (y/n)`\r\n\r\n##### STEPS TO REPRODUCE\r\n```yaml\r\n    - name: UNMount new filesystem\r\n      mount: state=unmounted src='egais.app.node1:{{volume_name}}' path='{{mount_dir}}'\r\n\r\n    - name: stop gluster volume\r\n      gluster_volume:\r\n        state: stopped\r\n        name: '{{volume_name}}'\r\n        force: true\r\n\r\n    - name: remove gluster volume\r\n      gluster_volume:\r\n        state: absent\r\n        name: '{{volume_name}}'\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nVolume stopped\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nTASK [UNMount new filesystem] **************************************************\r\ntask path: /home/pasha/Projects/Ansible.cfg/Test_glusterfs.yml:67\r\nchanged: [egais.app.node2] => {\"changed\": true, \"dump\": \"0\", \"fstab\": \"/etc/fstab\", \"name\": \"/mnt/glusterfs.test.mountpoint\", \"opts\": \"defaults\", \"passno\": \"0\", \"src\": \"egais.app.node1:glusterfs_vol1\"}\r\nchanged: [egais.app.node1] => {\"changed\": true, \"dump\": \"0\", \"fstab\": \"/etc/fstab\", \"name\": \"/mnt/glusterfs.test.mountpoint\", \"opts\": \"defaults\", \"passno\": \"0\", \"src\": \"egais.app.node1:glusterfs_vol1\"}\r\n\r\nTASK [stop gluster volume] *****************************************************\r\ntask path: /home/pasha/Projects/Ansible.cfg/Test_glusterfs.yml:70\r\nfatal: [egais.app.node2]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"error running gluster (/usr/sbin/gluster volume stop glusterfs_vol1) command (rc=1): Stopping volume will make its data inaccessible. Do you want to continue? (y/n) \"}\r\nchanged: [egais.app.node1] => {\"ansible_facts\": {\"glusterfs\": {\"peers\": {\"10.0.17.33\": [\"0c2d8c9f-66e5-48d9-98cb-dae546418b10\", \"Peer in Cluster (Connected)\"], \"egais.app.node2\": [\"0c2d8c9f-66e5-48d9-98cb-dae546418b10\", \"Peer in Cluster (Connected)\"]}, \"quotas\": {}, \"volumes\": {\"glusterfs_vol1\": {\"bricks\": [\"10.0.17.32:/mnt/glusterfs.brick.0\", \"10.0.17.33:/mnt/glusterfs.brick.0\"], \"id\": \"4993306c-ba2b-4d00-9f08-65b6423375e3\", \"name\": \"glusterfs_vol1\", \"options\": {\"nfs.disable\": \"on\", \"performance.cache-size\": \"32MB\", \"performance.readdir-ahead\": \"on\", \"transport.address-family\": \"inet\"}, \"quota\": false, \"status\": \"Stopped\", \"transport\": \"tcp\"}}}}, \"changed\": true}\r\n```\r\n\r\nThat seams like some race condition, because one host succeeded and one failed.\r\nIf I run that again I got error `volume does not exists`:\r\n\r\n```\r\nTASK [stop gluster volume] *****************************************************\r\ntask path: /home/pasha/Projects/Ansible.cfg/Test_glusterfs.yml:67\r\nfatal: [egais.app.node1]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"volume not found glusterfs_vol1\"}\r\nfatal: [egais.app.node2]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"volume not found glusterfs_vol1\"}\r\n\tto retry, use: --limit @.ansible-retry/Test_glusterfs.retry\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/325746069","html_url":"https://github.com/ansible/ansible/issues/22402#issuecomment-325746069","issue_url":"https://api.github.com/repos/ansible/ansible/issues/22402","id":325746069,"user":{"login":"samdoran","id":4047861,"avatar_url":"https://avatars2.githubusercontent.com/u/4047861?v=4","gravatar_id":"","url":"https://api.github.com/users/samdoran","html_url":"https://github.com/samdoran","followers_url":"https://api.github.com/users/samdoran/followers","following_url":"https://api.github.com/users/samdoran/following{/other_user}","gists_url":"https://api.github.com/users/samdoran/gists{/gist_id}","starred_url":"https://api.github.com/users/samdoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdoran/subscriptions","organizations_url":"https://api.github.com/users/samdoran/orgs","repos_url":"https://api.github.com/users/samdoran/repos","events_url":"https://api.github.com/users/samdoran/events{/privacy}","received_events_url":"https://api.github.com/users/samdoran/received_events","type":"User","site_admin":false},"created_at":"2017-08-29T18:03:56Z","updated_at":"2017-08-29T18:03:56Z","body":"Fixed by #28712 "}}
{"actor":{"display_login":"samdoran"}}