{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/34185","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/34185/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/34185/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/34185/events","html_url":"https://github.com/ansible/ansible/issues/34185","id":284117758,"node_id":"MDU6SXNzdWUyODQxMTc3NTg=","number":34185,"title":"openvswitch_bridge requires the fail_mode parameter","user":{"login":"no2a","id":1701396,"node_id":"MDQ6VXNlcjE3MDEzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1701396?v=4","gravatar_id":"","url":"https://api.github.com/users/no2a","html_url":"https://github.com/no2a","followers_url":"https://api.github.com/users/no2a/followers","following_url":"https://api.github.com/users/no2a/following{/other_user}","gists_url":"https://api.github.com/users/no2a/gists{/gist_id}","starred_url":"https://api.github.com/users/no2a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no2a/subscriptions","organizations_url":"https://api.github.com/users/no2a/orgs","repos_url":"https://api.github.com/users/no2a/repos","events_url":"https://api.github.com/users/no2a/events{/privacy}","received_events_url":"https://api.github.com/users/no2a/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"node_id":"MDU6TGFiZWw1NjIyOTIxNjY=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","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":339653091,"node_id":"MDU6TGFiZWwzMzk2NTMwOTE=","url":"https://api.github.com/repos/ansible/ansible/labels/networking","name":"networking","color":"c7def8","default":false},{"id":669761792,"node_id":"MDU6TGFiZWw2Njk3NjE3OTI=","url":"https://api.github.com/repos/ansible/ansible/labels/support:network","name":"support:network","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-22T09:43:29Z","updated_at":"2018-09-14T10:38:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nopenvswitch_bridge\r\n\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.4.2.0\r\n  config file = /Users/arata/.ansible.cfg\r\n  configured module search path = [u'/Users/arata/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Users/arata/.pyenv/versions/2.7.11/lib/python2.7/site-packages/ansible\r\n  executable location = /Users/arata/.pyenv/versions/2.7.11/bin/ansible\r\n  python version = 2.7.11 (default, Feb 24 2016, 16:09:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]\r\n```\r\n\r\n##### CONFIGURATION\r\nnothing with \"ansible-config dump --only-changed\"\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\n\r\nansible-doc openvswitch_bridge says that:\r\n```\r\n- fail_mode\r\n        Set bridge fail-mode. The default value (None) is a No-op.\r\n        (Choices: secure, standalone)[Default: None]\r\n        version_added: 2.0\r\n```\r\nHowever, if the target bridge is set fail mode (either standalone or secure), openvswitch_bridge failed with complaining the fail_mode parameter is not passed.\r\nAs the doc says omitting fail_mode means no-op, the module should exit successfully (without changing the fail mode).\r\n\r\n##### STEPS TO REPRODUCE\r\nFirst, create a ovs bridge and set some fail mode (not necessary to use ansible).\r\n```\r\n$ ansible -i hosts host1 --become -m openvswitch_bridge -a 'bridge=ovs1'\r\n```\r\n\r\nThen, run openvswitch_bridge to the bridge without fail_mode.\r\n```\r\nansible -i hosts host1 --become -m openvswitch_bridge -a 'bridge=ovs1'\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nSince fail_mode is not passed, the module doesn't care fail mode, just confirms the bridge exists and exits successfully.\r\n\r\n##### ACTUAL RESULTS\r\nfailed with an error message saying fail_mode must be passed, as follows:\r\n```\r\n$ ansible -i hosts host1 --become -m openvswitch_bridge -a 'bridge=ovs1'\r\nhost1 | FAILED! => {\r\n    \"changed\": false, \r\n    \"cmd\": \"/usr/bin/ovs-vsctl -t 5 set-fail-mode ovs1 None\", \r\n    \"msg\": \"ovs-vsctl: fail-mode must be \\\"standalone\\\" or \\\"secure\\\"\", \r\n    \"rc\": 1, \r\n    \"stderr\": \"ovs-vsctl: fail-mode must be \\\"standalone\\\" or \\\"secure\\\"\\n\", \r\n    \"stderr_lines\": [\r\n        \"ovs-vsctl: fail-mode must be \\\"standalone\\\" or \\\"secure\\\"\"\r\n    ], \r\n    \"stdout\": \"\", \r\n    \"stdout_lines\": []\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/421315604","html_url":"https://github.com/ansible/ansible/issues/34185#issuecomment-421315604","issue_url":"https://api.github.com/repos/ansible/ansible/issues/34185","id":421315604,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTMxNTYwNA==","user":{"login":"ashish-billore","id":12685832,"node_id":"MDQ6VXNlcjEyNjg1ODMy","avatar_url":"https://avatars0.githubusercontent.com/u/12685832?v=4","gravatar_id":"","url":"https://api.github.com/users/ashish-billore","html_url":"https://github.com/ashish-billore","followers_url":"https://api.github.com/users/ashish-billore/followers","following_url":"https://api.github.com/users/ashish-billore/following{/other_user}","gists_url":"https://api.github.com/users/ashish-billore/gists{/gist_id}","starred_url":"https://api.github.com/users/ashish-billore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashish-billore/subscriptions","organizations_url":"https://api.github.com/users/ashish-billore/orgs","repos_url":"https://api.github.com/users/ashish-billore/repos","events_url":"https://api.github.com/users/ashish-billore/events{/privacy}","received_events_url":"https://api.github.com/users/ashish-billore/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T10:38:02Z","updated_at":"2018-09-14T10:38:02Z","author_association":"CONTRIBUTOR","body":"Does this fix look reasonable to be merged or there are any suggestions? --> https://github.com/ansible/ansible/pull/45469\r\n\r\nThanks!"}}
{"actor":{"display_login":"ashish-billore"}}