{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/47301","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/47301/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/47301/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/47301/events","html_url":"https://github.com/ansible/ansible/issues/47301","id":371612305,"node_id":"MDU6SXNzdWUzNzE2MTIzMDU=","number":47301,"title":"lvg module isn't idempotent","user":{"login":"mircea-vutcovici","id":1445392,"node_id":"MDQ6VXNlcjE0NDUzOTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1445392?v=4","gravatar_id":"","url":"https://api.github.com/users/mircea-vutcovici","html_url":"https://github.com/mircea-vutcovici","followers_url":"https://api.github.com/users/mircea-vutcovici/followers","following_url":"https://api.github.com/users/mircea-vutcovici/following{/other_user}","gists_url":"https://api.github.com/users/mircea-vutcovici/gists{/gist_id}","starred_url":"https://api.github.com/users/mircea-vutcovici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mircea-vutcovici/subscriptions","organizations_url":"https://api.github.com/users/mircea-vutcovici/orgs","repos_url":"https://api.github.com/users/mircea-vutcovici/repos","events_url":"https://api.github.com/users/mircea-vutcovici/events{/privacy}","received_events_url":"https://api.github.com/users/mircea-vutcovici/received_events","type":"User","site_admin":false},"labels":[{"id":947190508,"node_id":"MDU6TGFiZWw5NDcxOTA1MDg=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.7","name":"affects_2.7","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":632871029,"node_id":"MDU6TGFiZWw2MzI4NzEwMjk=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_maintainer","name":"needs_maintainer","color":"fef2c0","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-18T16:28:09Z","updated_at":"2018-10-25T16:28:58Z","closed_at":null,"author_association":"NONE","body":"<!--- Verify first that your issue is not already reported on GitHub -->\r\n<!--- Also test if the latest release and devel branch are affected too -->\r\n<!--- Complete *all* sections as described, this form is processed automatically -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly below -->\r\nlvg module from ansible 2.6, 2.7 and devel is not idempotent. It fails if you run it the 2nd time.\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Write the short name of the module, plugin, task or feature below -->\r\n`lvg.py`\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes -->\r\n```paste below\r\n$ bin/ansible --version   # Git version\r\nansible 2.7.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/mvutcovici/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = bin/ansible\r\n  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]\r\n$ ansible --version   # RHEL7.5 version\r\nansible 2.7.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/mvutcovici/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /bin/ansible\r\n  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]\r\n$ git show --summary\r\ncommit 3feb6c9e0fba8a521c7c0948b6eb89822cdef2cd\r\nAuthor: Nathaniel Case <this.is@nathanielca.se>\r\nDate:   Thu Oct 18 12:09:00 2018 -0400\r\n\r\n    Try to be more verbose with JSON decode errors (#47066)\r\n    \r\n    * Try to be more verbose with JSON decode errors\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- Paste verbatim output from \"ansible-config dump --only-changed\" between quotes -->\r\n```paste below\r\n$ bin/ansible-config dump --only-changed   # ansible from git\r\n$ /bin/ansible-config dump --only-changed  # ansible from RHEL7.5\r\n$\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->\r\nansible 2.6, 2.7, devel\r\nRHEL 7.5, x86_64\r\n```bash\r\n$ sudo lsblk\r\nNAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT\r\nsda             8:0    0 278.5G  0 disk  \r\n├─sda1          8:1    0   200M  0 part  /boot/efi\r\n├─sda2          8:2    0     1G  0 part  /boot\r\n└─sda3          8:3    0 277.3G  0 part  \r\n  ├─rhel-root 253:0    0    50G  0 lvm   /\r\n  ├─rhel-swap 253:1    0    16G  0 lvm   [SWAP]\r\n  └─rhel-home 253:3    0     5G  0 lvm   /home\r\nsdb             8:16   0   150G  0 disk  \r\n└─mpatha      253:2    0   150G  0 mpath \r\nsdc             8:32   0   150G  0 disk  \r\n└─mpatha      253:2    0   150G  0 mpath \r\nsr0            11:0    1  1024M  0 rom   \r\n$ sudo multipath -ll\r\nmpatha (36005076380808260bc0000000000000c) dm-2 IBM     ,2145            \r\nsize=150G features='1 queue_if_no_path' hwhandler='0' wp=rw\r\n|-+- policy='service-time 0' prio=50 status=active\r\n| `- 6:0:0:0 sdc 8:32 active ready running\r\n`-+- policy='service-time 0' prio=10 status=enabled\r\n  `- 5:0:0:0 sdb 8:16 active ready running\r\n```\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->\r\n```bash\r\n$ sudo vgremove datavg;sudo pvremove /dev/mapper/mpatha\r\n  Volume group \"datavg\" successfully removed\r\n  Labels on physical volume \"/dev/mapper/mpatha\" successfully wiped.\r\n$ bin/ansible localhost, -b -m lvg -a \"vg=datavg pvs=/dev/dm-2\"\r\n [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'\r\n\r\nlocalhost | CHANGED => {\r\n    \"changed\": true\r\n}\r\n$ bin/ansible localhost, -b -m lvg -a \"vg=datavg pvs=/dev/dm-2\"\r\n [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'\r\n\r\nlocalhost | FAILED! => {\r\n    \"changed\": false, \r\n    \"err\": \"  Can't initialize physical volume \\\"/dev/dm-2\\\" of volume group \\\"datavg\\\" without -ff\\n  /dev/dm-2: physical volume not initialized.\\n\", \r\n    \"msg\": \"Creating physical volume '/dev/dm-2' failed\", \r\n    \"rc\": 5\r\n}\r\n$\r\n```\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n\r\n```\r\n\r\n<!--- HINT: You can paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- Describe what you expected to happen when running the steps above -->\r\nThe module should be idempotent. If you run it second time with the same options, it should show that it has run successfully, and that there are no changes.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->\r\n\r\n\r\n<!--- Paste verbatim command output between quotes -->\r\n```paste below\r\n$ bin/ansible localhost, -b -m lvg -a \"vg=datavg pvs=/dev/dm-2\" -vvvvv                                                                                                       [6/197]\r\nansible 2.7.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/mvutcovici/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = bin/ansible\r\n  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]\r\nUsing /etc/ansible/ansible.cfg as config file\r\nsetting up inventory plugins\r\nParsed /etc/ansible/hosts inventory source with ini plugin\r\n [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'\r\n\r\nLoading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc\r\nMETA: ran handlers\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: mvutcovici\r\n<127.0.0.1> EXEC /bin/sh -c 'echo ~mvutcovici && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684 `\" && echo ansible-tmp-1539879933.69-219002054001684=\"` echo /home/mvutcovici/.\r\nansible/tmp/ansible-tmp-1539879933.69-219002054001684 `\" ) && sleep 0'\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/basic.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/_collections_compat.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/_text.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/process.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/__init__.py\r\nUsing module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/file.py\r\nUsing module file /usr/lib/python2.7/site-packages/ansible/modules/system/lvg.py\r\n<127.0.0.1> PUT /home/mvutcovici/.ansible/tmp/ansible-local-29964vSvV0K/tmpU_CBdi TO /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684/AnsiballZ_lvg.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684/ /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684/AnsiballZ_lvg.py && sleep 0\r\n'\r\n<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-syqpljwxvdkxyfmlksvgnvjxdnzfhxaz; /bin/python /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684/Ansiba\r\nllZ_lvg.py'\"'\"' && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/mvutcovici/.ansible/tmp/ansible-tmp-1539879933.69-219002054001684/ > /dev/null 2>&1 && sleep 0'\r\nlocalhost | FAILED! => {\r\n    \"changed\": false, \r\n    \"err\": \"  Can't initialize physical volume \\\"/dev/dm-2\\\" of volume group \\\"datavg\\\" without -ff\\n  /dev/dm-2: physical volume not initialized.\\n\", \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"force\": false, \r\n            \"pesize\": \"4\", \r\n            \"pv_options\": \"\", \r\n            \"pvs\": [\r\n                \"/dev/dm-2\"\r\n            ], \r\n            \"state\": \"present\", \r\n            \"vg\": \"datavg\", \r\n            \"vg_options\": \"\"\r\n        }\r\n    }, \r\n    \"msg\": \"Creating physical volume '/dev/dm-2' failed\", \r\n    \"rc\": 5\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/433118440","html_url":"https://github.com/ansible/ansible/issues/47301#issuecomment-433118440","issue_url":"https://api.github.com/repos/ansible/ansible/issues/47301","id":433118440,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzExODQ0MA==","user":{"login":"odyssey4me","id":2152106,"node_id":"MDQ6VXNlcjIxNTIxMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/2152106?v=4","gravatar_id":"","url":"https://api.github.com/users/odyssey4me","html_url":"https://github.com/odyssey4me","followers_url":"https://api.github.com/users/odyssey4me/followers","following_url":"https://api.github.com/users/odyssey4me/following{/other_user}","gists_url":"https://api.github.com/users/odyssey4me/gists{/gist_id}","starred_url":"https://api.github.com/users/odyssey4me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odyssey4me/subscriptions","organizations_url":"https://api.github.com/users/odyssey4me/orgs","repos_url":"https://api.github.com/users/odyssey4me/repos","events_url":"https://api.github.com/users/odyssey4me/events{/privacy}","received_events_url":"https://api.github.com/users/odyssey4me/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T16:28:58Z","updated_at":"2018-10-25T16:28:58Z","author_association":"CONTRIBUTOR","body":"I've pushed up https://github.com/ansible/ansible/pull/47620 to resolve this issue."}}
{"actor":{"display_login":"odyssey4me"}}