{"action":"reopened","issue":{"url":"https://api.github.com/repos/ansible/awx/issues/1589","repository_url":"https://api.github.com/repos/ansible/awx","labels_url":"https://api.github.com/repos/ansible/awx/issues/1589/labels{/name}","comments_url":"https://api.github.com/repos/ansible/awx/issues/1589/comments","events_url":"https://api.github.com/repos/ansible/awx/issues/1589/events","html_url":"https://github.com/ansible/awx/issues/1589","id":305983548,"number":1589,"title":"Azure dynamic inventory breaks for VMs with win_rm listeners set","user":{"login":"01100010011001010110010101110000","id":6529397,"avatar_url":"https://avatars0.githubusercontent.com/u/6529397?v=4","gravatar_id":"","url":"https://api.github.com/users/01100010011001010110010101110000","html_url":"https://github.com/01100010011001010110010101110000","followers_url":"https://api.github.com/users/01100010011001010110010101110000/followers","following_url":"https://api.github.com/users/01100010011001010110010101110000/following{/other_user}","gists_url":"https://api.github.com/users/01100010011001010110010101110000/gists{/gist_id}","starred_url":"https://api.github.com/users/01100010011001010110010101110000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01100010011001010110010101110000/subscriptions","organizations_url":"https://api.github.com/users/01100010011001010110010101110000/orgs","repos_url":"https://api.github.com/users/01100010011001010110010101110000/repos","events_url":"https://api.github.com/users/01100010011001010110010101110000/events{/privacy}","received_events_url":"https://api.github.com/users/01100010011001010110010101110000/received_events","type":"User","site_admin":false},"labels":[{"id":687169246,"url":"https://api.github.com/repos/ansible/awx/labels/component:api","name":"component:api","color":"fbca04","default":false},{"id":861898136,"url":"https://api.github.com/repos/ansible/awx/labels/flag:%F0%9F%8E%B1","name":"flag:🎱","color":"31e0bd","default":false},{"id":686255387,"url":"https://api.github.com/repos/ansible/awx/labels/priority:high","name":"priority:high","color":"f7c6c7","default":false},{"id":708663597,"url":"https://api.github.com/repos/ansible/awx/labels/state:blocked","name":"state:blocked","color":"830303","default":false},{"id":607283748,"url":"https://api.github.com/repos/ansible/awx/labels/type:bug","name":"type:bug","color":"F79F81","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-16T15:58:26Z","updated_at":"2018-03-21T14:44:31Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!-- Pick the area of AWX for this issue, you can have multiple, delete the rest: -->\r\n - `azure_rm.py` dynamic inventory\r\n\r\n##### SUMMARY\r\n<!-- Briefly describe the problem. -->\r\n\r\n##### ENVIRONMENT\r\n* AWX version: 1.0.4\r\n* AWX install method: docker\r\n* Ansible version:  2.4.2\r\n* Operating System: CentOS 7.4\r\n* Web Browser: Chrome\r\n\r\n##### STEPS TO REPRODUCE\r\n Run Azure inventory against a subscription containing a VM with a `win_rm` listener set\r\n<!-- For bugs, please show exactly how to reproduce the problem. For new\r\nfeatures, show how the feature would be used.  -->\r\n\r\n##### EXPECTED RESULTS\r\nA JSON dump of the inventory, or a successful inventory job\r\n<!-- For bug reports, what did you expect to happen when running the steps\r\nabove? -->\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nTraceback (most recent call last):\r\n  File \"./azure_rm.py\", line 860, in <module>\r\n    main()\r\n  File \"./azure_rm.py\", line 856, in main\r\n    AzureInventory()\r\n  File \"./azure_rm.py\", line 502, in __init__\r\n    print(self._json_format_dict(pretty=self._args.pretty))\r\n  File \"./azure_rm.py\", line 745, in _json_format_dict\r\n    return json.dumps(self._inventory, sort_keys=True, indent=2)\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py\", line 251, in dumps\r\n    sort_keys=sort_keys, **kw).encode(obj)\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 209, in encode\r\n    chunks = list(chunks)\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 434, in _iterencode\r\n    for chunk in _iterencode_dict(o, _current_indent_level):\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 332, in _iterencode_list\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 408, in _iterencode_dict\r\n    for chunk in chunks:\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 442, in _iterencode\r\n    o = _default(o)\r\n  File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py\", line 184, in default\r\n    raise TypeError(repr(o) + \" is not JSON serializable\")\r\nTypeError: <ProtocolTypes.http: 'Http'> is not JSON serializable\r\n```\r\n<!-- For bug reports, what actually happened? -->\r\nThe script chokes on serializing ProtocolTypes to JSON. Calling `protocol.name` resolves this by putting the string into the dict, instead of the entire object.\r\n##### ADDITIONAL INFORMATION\r\nDue to my inability to read, there are two upstream PRs for this:\r\n* ansible/ansible#37499\r\n* ansible/ansible#18085\r\n<!-- Include any links to sosreport, database dumps, screenshots or other\r\ninformation. -->\r\n"}}
{"actor":{"display_login":"wenottingham"}}