{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/33059","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/33059/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/33059/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/33059/events","html_url":"https://github.com/saltstack/salt/issues/33059","id":153129488,"number":33059,"title":"Suggestion: return an error string when running `iptables.check` for a wrong rule","user":{"login":"avb76","id":13166266,"avatar_url":"https://avatars1.githubusercontent.com/u/13166266?v=4","gravatar_id":"","url":"https://api.github.com/users/avb76","html_url":"https://github.com/avb76","followers_url":"https://api.github.com/users/avb76/followers","following_url":"https://api.github.com/users/avb76/following{/other_user}","gists_url":"https://api.github.com/users/avb76/gists{/gist_id}","starred_url":"https://api.github.com/users/avb76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avb76/subscriptions","organizations_url":"https://api.github.com/users/avb76/orgs","repos_url":"https://api.github.com/users/avb76/repos","events_url":"https://api.github.com/users/avb76/events{/privacy}","received_events_url":"https://api.github.com/users/avb76/received_events","type":"User","site_admin":false},"labels":[{"id":41387237,"url":"https://api.github.com/repos/saltstack/salt/labels/Execution%20Module","name":"Execution Module","color":"006b75","default":false},{"id":204655,"url":"https://api.github.com/repos/saltstack/salt/labels/Feature","name":"Feature","color":"009800","default":false},{"id":194768064,"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestone/13","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars0.githubusercontent.com/u/507599?v=4","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2273,"closed_issues":7288,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2018-05-09T23:13:21Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-05-04T22:28:47Z","updated_at":"2018-05-10T12:13:20Z","closed_at":null,"author_association":"NONE","body":"### Description of Issue/Question\n\nI noticed that if you use `iptables.check` over an iptables rule that has a wrong syntax, `False` will be returned. I'd suggest returning a proper string (instead of `False`), like it's happening when the `chain` / `rule` is missing as a parameter. \nThis would be very helpful when using `__salt__['iptables.check']()`. I didn't find another way to retrieve that error output regarding the incorrect syntax of the rule given as parameter.\n### Setup\n\n(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)\n### Steps to Reproduce Issue\n\n(Include debug logs if possible and relevant.)\n\n```\n# salt-call iptables.check rule='-p tcp --dport 22 -m state --state ESTABLISHED, RELATED -j ACCEPT' chain=INPUT\n[INFO    ] Executing command '/sbin/iptables -t filter -N 0x50569144dfL' in directory '/root'\n[INFO    ] Executing command '/sbin/iptables -t filter -A 0x50569144dfL -p tcp --dport 22 -m state --state ESTABLISHED, RELATED -j ACCEPT' in directory '/root'\n[ERROR   ] Command '/sbin/iptables -t filter -A 0x50569144dfL -p tcp --dport 22 -m state --state ESTABLISHED, RELATED -j ACCEPT' failed with return code: 2\n[ERROR   ] output: iptables v1.4.7: \"--state\" requires a list of states with no spaces, e.g. ESTABLISHED,RELATED\nTry `iptables -h' or 'iptables --help' for more information.\n[INFO    ] Executing command '/sbin/iptables-save' in directory '/root'\n[INFO    ] Executing command '/sbin/iptables -t filter -F 0x50569144dfL' in directory '/root'\n[INFO    ] Executing command '/sbin/iptables -t filter -X 0x50569144dfL' in directory '/root'\nlocal:\n    False\n```\n\nNotice those two `[ERROR ]` strings in the output. \n### Versions Report\n\n(Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)\n\n```\n# salt --versions-report\nSalt Version:\n           Salt: 2015.8.3\n\nDependency Versions:\n         Jinja2: unknown\n       M2Crypto: Not Installed\n           Mako: Not Installed\n         PyYAML: 3.10\n          PyZMQ: 14.3.1\n         Python: 2.6.6 (r266:84292, Dec  7 2011, 20:48:22)\n           RAET: Not Installed\n        Tornado: 4.2.1\n            ZMQ: 4.0.4\n           cffi: Not Installed\n       cherrypy: Not Installed\n       dateutil: Not Installed\n          gitdb: Not Installed\n      gitpython: Not Installed\n          ioflo: Not Installed\n        libnacl: Not Installed\n   msgpack-pure: Not Installed\n msgpack-python: 0.4.6\n   mysql-python: Not Installed\n      pycparser: Not Installed\n       pycrypto: 2.6.1\n         pygit2: Not Installed\n   python-gnupg: Not Installed\n          smmap: Not Installed\n        timelib: Not Installed\n\nSystem Versions:\n           dist: centos 6.2 Final\n        machine: x86_64\n        release: 2.6.32-431.29.2.el6.x86_64\n         system: CentOS 6.2 Final\n```\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/388036011","html_url":"https://github.com/saltstack/salt/issues/33059#issuecomment-388036011","issue_url":"https://api.github.com/repos/saltstack/salt/issues/33059","id":388036011,"user":{"login":"stale[bot]","id":26384082,"avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-05-10T12:13:20Z","updated_at":"2018-05-10T12:13:20Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n\nIf this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.\n"}}
{"actor":{"display_login":"stale"}}