{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22685","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22685/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22685/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22685/events","html_url":"https://github.com/saltstack/salt/issues/22685","id":68520893,"number":22685,"title":"Windows minion grains are corrupted or lost when second item in grains list contains multiple dashes/hyphens","user":{"login":"deuscapturus","id":5497572,"avatar_url":"https://avatars.githubusercontent.com/u/5497572?v=3","gravatar_id":"","url":"https://api.github.com/users/deuscapturus","html_url":"https://github.com/deuscapturus","followers_url":"https://api.github.com/users/deuscapturus/followers","following_url":"https://api.github.com/users/deuscapturus/following{/other_user}","gists_url":"https://api.github.com/users/deuscapturus/gists{/gist_id}","starred_url":"https://api.github.com/users/deuscapturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deuscapturus/subscriptions","organizations_url":"https://api.github.com/users/deuscapturus/orgs","repos_url":"https://api.github.com/users/deuscapturus/repos","events_url":"https://api.github.com/users/deuscapturus/events{/privacy}","received_events_url":"https://api.github.com/users/deuscapturus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P2","name":"P2","color":"155fb5"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Windows","name":"Windows","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"twangboy","id":9383935,"avatar_url":"https://avatars.githubusercontent.com/u/9383935?v=3","gravatar_id":"","url":"https://api.github.com/users/twangboy","html_url":"https://github.com/twangboy","followers_url":"https://api.github.com/users/twangboy/followers","following_url":"https://api.github.com/users/twangboy/following{/other_user}","gists_url":"https://api.github.com/users/twangboy/gists{/gist_id}","starred_url":"https://api.github.com/users/twangboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twangboy/subscriptions","organizations_url":"https://api.github.com/users/twangboy/orgs","repos_url":"https://api.github.com/users/twangboy/repos","events_url":"https://api.github.com/users/twangboy/events{/privacy}","received_events_url":"https://api.github.com/users/twangboy/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","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://avatars.githubusercontent.com/u/507599?v=3","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":2180,"closed_issues":1951,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-05-07T22:20:05Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-04-14T22:53:36Z","updated_at":"2015-05-07T23:35:57Z","closed_at":null,"body":"This was a hard bug to find.  When a grain list is defined with multiple values, and a hyphen or dash exists in any of the grain values beyond the first item in the list grains values are lost.\r\n\r\nTo reproduce:\r\n\r\n1. Set these grains with grains.append or by editing c:\\salt\\conf\\grains:\r\n```\r\n  roles:\r\n  - test-with-all-these-dashes1\r\n  - test-with-all-these-dashes2\r\n  - test-with-all-these-dashes3\r\n  - test-with-all-these-dashes4\r\n  - test-with-all-these-dashes5\r\n  - test-with-all-these-dashes6\r\n```\r\n2.  check the grain we just set from the salt master (I can't reproduce with salt-call).  'salt '*' grains.item roles'\r\n3.  Run any state.sls or state.highstate\r\n4. check the grain again from the salt master.  salt '*' grains.item roles'.  Notice that some grain values are missing or modified!  Other grains will also be missing.\r\n\r\nSalt on Windows 2012R2\r\n```\r\n               Salt: 2014.7.2\r\n             Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]\r\n             Jinja2: 2.7.1\r\n           M2Crypto: 0.21.1\r\n     msgpack-python: 0.4.2\r\n       msgpack-pure: Not Installed\r\n           pycrypto: 2.6\r\n            libnacl: Not Installed\r\n             PyYAML: 3.11\r\n              ioflo: Not Installed\r\n              PyZMQ: 14.1.1\r\n               RAET: Not Installed\r\n                ZMQ: 4.0.4\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/100046896","html_url":"https://github.com/saltstack/salt/issues/22685#issuecomment-100046896","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22685","id":100046896,"user":{"login":"twangboy","id":9383935,"avatar_url":"https://avatars.githubusercontent.com/u/9383935?v=3","gravatar_id":"","url":"https://api.github.com/users/twangboy","html_url":"https://github.com/twangboy","followers_url":"https://api.github.com/users/twangboy/followers","following_url":"https://api.github.com/users/twangboy/following{/other_user}","gists_url":"https://api.github.com/users/twangboy/gists{/gist_id}","starred_url":"https://api.github.com/users/twangboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twangboy/subscriptions","organizations_url":"https://api.github.com/users/twangboy/orgs","repos_url":"https://api.github.com/users/twangboy/repos","events_url":"https://api.github.com/users/twangboy/events{/privacy}","received_events_url":"https://api.github.com/users/twangboy/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T23:35:57Z","updated_at":"2015-05-07T23:35:57Z","body":"It seems to remove more than just grains with dashes...\r\nIf you restart the minion they return...\r\nSeems to only affect grains added via CLI using grains.append...\r\nThis is a problem with threading and memory corruption. If you turn on multi-threading in the minion config, this problem doesn't occur. There is a pickling stack trace that occurs on start up, but other than that everything seems to work. Still needs further testing."}}