{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/38046","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/38046/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/38046/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/38046/events","html_url":"https://github.com/saltstack/salt/issues/38046","id":193094537,"number":38046,"title":"[2016.11.0] Proxy minion unable to start due to grains issue","user":{"login":"mirceaulinic","id":16694679,"avatar_url":"https://avatars.githubusercontent.com/u/16694679?v=3","gravatar_id":"","url":"https://api.github.com/users/mirceaulinic","html_url":"https://github.com/mirceaulinic","followers_url":"https://api.github.com/users/mirceaulinic/followers","following_url":"https://api.github.com/users/mirceaulinic/following{/other_user}","gists_url":"https://api.github.com/users/mirceaulinic/gists{/gist_id}","starred_url":"https://api.github.com/users/mirceaulinic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirceaulinic/subscriptions","organizations_url":"https://api.github.com/users/mirceaulinic/orgs","repos_url":"https://api.github.com/users/mirceaulinic/repos","events_url":"https://api.github.com/users/mirceaulinic/events{/privacy}","received_events_url":"https://api.github.com/users/mirceaulinic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-02T11:28:01Z","updated_at":"2016-12-02T23:15:19Z","closed_at":null,"body":"### Description of Issue/Question\r\n\r\nAn existing proxy minion is unable to start due to a wrong cast in the grains. \r\n\r\nIn ```/etc/salt/proxy.d/_schedule.conf```:\r\n\r\n```yaml\r\nosrelease_info: !!python/tuple [proxy]\r\n```\r\n\r\nAdditionally, this does not seem to be a particular case, as other grains were not cast to string (as before). Did that change recently in Carbon?\r\nIf so, I think a fix would be very recommended to be included in ```2016.11.1``` - I will look into it and try to understand how it works. I will also need to cast the unicode bits from the [napalm grains](https://github.com/saltstack/salt/blob/develop/salt/grains/napalm.py) to string types, e.g.: ```serial: !!python/unicode 'T2405'```.\r\n\r\nThis is not a problem only for myself, I'm pretty sure it broke few other things (especially in proxy minions).\r\n\r\n\r\n### Traceback\r\n\r\n```\r\n[ERROR   ] Error parsing configuration file: /etc/salt/proxy.d/_schedule.conf - could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'\r\n  in \"<string>\", line 126, column 27:\r\n              osrelease_info: !!python/tuple [proxy]\r\n                              ^\r\n[ERROR   ] Error parsing configuration file: /etc/salt/proxy.d/_schedule.conf - could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'\r\n  in \"<string>\", line 126, column 27:\r\n              osrelease_info: !!python/tuple [proxy]\r\n                              ^\r\n[ERROR   ] local variable 'opts' referenced before assignment\r\nTraceback (most recent call last):\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 199, in parse_args\r\n    process_option_func()\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 515, in process_config_dir\r\n    self.config.update(self.setup_config())\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 1817, in setup_config\r\n    cache_minion_id=False, minion_id=minion_id)\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/config/__init__.py\", line 1889, in minion_config\r\n    exit_on_config_errors=not ignore_config_errors))\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/config/__init__.py\", line 1810, in include_config\r\n    include = opts.get('include', [])\r\nUnboundLocalError: local variable 'opts' referenced before assignment\r\nUsage: salt-proxy\r\n\r\nsalt-proxy: error: Error while processing <bound method ProxyMinion.process_config_dir of <salt.cli.daemons.ProxyMinion object at 0x7fece40c9110>>: Traceback (most recent call last):\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 199, in parse_args\r\n    process_option_func()\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 515, in process_config_dir\r\n    self.config.update(self.setup_config())\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/utils/parsers.py\", line 1817, in setup_config\r\n    cache_minion_id=False, minion_id=minion_id)\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/config/__init__.py\", line 1889, in minion_config\r\n    exit_on_config_errors=not ignore_config_errors))\r\n  File \"/usr/local/salt/virtualenv/lib/python2.7/site-packages/salt/config/__init__.py\", line 1810, in include_config\r\n    include = opts.get('include', [])\r\nUnboundLocalError: local variable 'opts' referenced before assignment\r\n```\r\n\r\nAfter correcting  ```/etc/salt/proxy.d/_schedule.conf``` to ```osrelease_info: proxy``` it worked fine.\r\n\r\n### Versions Report\r\n(Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2016.11.0\r\n\r\nDependency Versions:\r\n           cffi: 1.7.0\r\n       cherrypy: Not Installed\r\n       dateutil: Not Installed\r\n          gitdb: 0.6.4\r\n      gitpython: 1.0.2\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: 0.21.1\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.8\r\n   mysql-python: 1.2.5\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)\r\n   python-gnupg: 0.3.8\r\n         PyYAML: 3.12\r\n          PyZMQ: 16.0.0\r\n           RAET: Not Installed\r\n          smmap: 0.9.0\r\n        timelib: 0.2.4\r\n        Tornado: 4.4.2\r\n            ZMQ: 4.1.5\r\n\r\nSystem Versions:\r\n           dist: debian 8.2\r\n        machine: x86_64\r\n        release: 4.1.3-cloudflare\r\n         system: Linux\r\n        version: debian 8.2\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/264588326","html_url":"https://github.com/saltstack/salt/issues/38046#issuecomment-264588326","issue_url":"https://api.github.com/repos/saltstack/salt/issues/38046","id":264588326,"user":{"login":"cro","id":83323,"avatar_url":"https://avatars.githubusercontent.com/u/83323?v=3","gravatar_id":"","url":"https://api.github.com/users/cro","html_url":"https://github.com/cro","followers_url":"https://api.github.com/users/cro/followers","following_url":"https://api.github.com/users/cro/following{/other_user}","gists_url":"https://api.github.com/users/cro/gists{/gist_id}","starred_url":"https://api.github.com/users/cro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cro/subscriptions","organizations_url":"https://api.github.com/users/cro/orgs","repos_url":"https://api.github.com/users/cro/repos","events_url":"https://api.github.com/users/cro/events{/privacy}","received_events_url":"https://api.github.com/users/cro/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T23:15:19Z","updated_at":"2016-12-02T23:15:19Z","body":"Yeah, this is baffling. Is\r\n\r\n```osrelease_info: !!python/tuple [proxy]```\r\n\r\nthe actual contents of /etc/salt/proxy.d/_schedule.conf?"}}
{"actor":{"display_login":"cro"}}