{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/21807","labels_url":"https://api.github.com/repos/saltstack/salt/issues/21807/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/21807/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/21807/events","html_url":"https://github.com/saltstack/salt/issues/21807","id":63011293,"number":21807,"title":"Unavailable commands cause a stacktrace","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T15:09:20Z","updated_at":"2015-03-19T15:27:52Z","closed_at":null,"body":"This bug was found in 2015.2. When the minion starts it tries to run a command called tzutil. This command is only available by default on Windows Server 2012 and Windows 8. Older operating systems require a patch. If the utility is not available, a stack trace is returned and the minion dies.\r\n\r\n```\r\n[INFO    ] Executing command ['tzutil', '/g'] in directory 'C:\\\\Users\\\\Administrator'\r\n[INFO    ] The salt minion is shut down\r\n[ERROR   ] An un-handled exception was caught by salt's global exception handler:\r\nCommandExecutionError: Unable to run command ['tzutil', '/g'] with the context {'with_communicate': True, 'shell': False, 'env': {'TMP': 'C:\\\\Users\\\\ADMINI~1\\\\AppData\\\\Local\\\\Temp\\\\2', 'COMPUTERNAME': 'WIN-94HR783DSQI', 'USERDOMAIN': 'WIN-94HR783DSQI', 'PSMODULEPATH': 'C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules\\\\;C:\\\\Program Files\\\\AWS Tools\\\\PowerShell\\\\', 'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files', 'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 62 Stepping 4, GenuineIntel', 'PROGRAMFILES': 'C:\\\\Program Files', 'PROCESSOR_REVISION': '3e04', 'SYSTEMROOT': 'C:\\\\Windows', 'PATH': 'C:\\\\Python27\\\\;C:\\\\Windows\\\\system32;C:\\\\Windows;C:\\\\Windows\\\\System32\\\\Wbem;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Program Files\\\\Amazon\\\\cfn-bootstrap\\\\;C:\\\\\r\nProgram Files\\\\Git\\\\cmd', 'TEMP': 'C:\\\\Users\\\\ADMINI~1\\\\AppData\\\\Local\\\\Temp\\\\2', 'PROCESSOR_ARCHITECTURE': 'x86', 'ALLUSERSPROFILE': 'C:\\\\ProgramData', 'LOCALAPPDATA': 'C:\\\\Users\\\\Administrator\\\\AppData\\\\Local', 'HOMEPATH': '\\\\Users\\\\Administrator', 'USERNAME': 'Administrator', 'LOGONSERVER': '\\\\\\\\WIN-94HR783DSQI', 'PROMPT': '$P$G', 'COMSPEC': 'C:\\\\Windows\\\\system32\\\\cmd.exe', 'PROGRAMDATA': 'C:\\\\ProgramData', 'TRACE_FORMAT_SEARCH_PATH': '\\\\\\\\winseqfe\\\\release\\\\Windows6.0\\\\lh_sp2rtm\\\\6002.18005.090410-1830\\\\x86fre\\\\symbols.pri\\\\TraceFormat', 'SESSIONNAME': 'RDP-Tcp#0', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'CLIENTNAME': 'GRINGO', 'FP_NO_HOST_CHECK': 'NO', 'WINDIR': 'C:\\\\Windows','HOMEDRIVE': 'C:', 'APPDATA': 'C:\\\\Users\\\\Administrator\\\\AppData\\\\Roaming', 'SYSTEMDRIVE': 'C:', 'PROCESSOR_LEVEL': '6', 'DFSTRACINGON': 'FALSE', 'OS': 'Windows_NT', 'PUBLIC': 'C:\\\\Users\\\\Public', 'USERPROFILE': 'C:\\\\Users\\\\Administrator'}, 'stdout': -1, 'stdin': None, 'stderr': -2, 'cwd': 'C:\\\\Users\\\\Administrator'},\r\nreason: [Error 2] The system cannot find the file specified\r\nTraceback (most recent call last):\r\n  File \"C:\\Python27\\Scripts\\salt-minion-script.py\", line 9, in <module>\r\n    load_entry_point('salt==2015.2.0rc1-192-g03c2f37', 'console_scripts', 'salt-minion')()\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\scripts.py\", line 114, in salt_minion\r\n    minion.start()\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\cli\\daemons.py\", line 260, in start\r\n    self.prepare()\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\cli\\daemons.py\", line 242, in prepare\r\n    self.minion = salt.minion.Minion(self.config)\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\minion.py\", line 692, in __init__\r\n    self.returners)\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\utils\\schedule.py\", line 264, in __init__\r\n    self.time_offset = self.functions.get('timezone.get_offset', lambda: '0000')()\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\modules\\win_timezone.py\", line 494, in get_offset\r\n    zone = __salt__['cmd.run'](['tzutil', '/g'], python_shell=False)\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\modules\\cmdmod.py\", line 636, in run\r\n    use_vt=use_vt)\r\n  File \"C:\\Python27\\lib\\site-packages\\salt\\modules\\cmdmod.py\", line 372, in _run\r\n    .format(cmd, kwargs, exc)\r\n```\r\n\r\nRunning Salt 2015.2 head\r\nWindows Server 2008 32bit\r\n\r\nAlso tested on 2014.7 HEAD with no problems."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/83631678","html_url":"https://github.com/saltstack/salt/issues/21807#issuecomment-83631678","issue_url":"https://api.github.com/repos/saltstack/salt/issues/21807","id":83631678,"user":{"login":"UtahDave","id":306240,"avatar_url":"https://avatars.githubusercontent.com/u/306240?v=3","gravatar_id":"","url":"https://api.github.com/users/UtahDave","html_url":"https://github.com/UtahDave","followers_url":"https://api.github.com/users/UtahDave/followers","following_url":"https://api.github.com/users/UtahDave/following{/other_user}","gists_url":"https://api.github.com/users/UtahDave/gists{/gist_id}","starred_url":"https://api.github.com/users/UtahDave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UtahDave/subscriptions","organizations_url":"https://api.github.com/users/UtahDave/orgs","repos_url":"https://api.github.com/users/UtahDave/repos","events_url":"https://api.github.com/users/UtahDave/events{/privacy}","received_events_url":"https://api.github.com/users/UtahDave/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T15:27:52Z","updated_at":"2015-03-19T15:27:52Z","body":"This may not be Windows specific. Can someone test this on another OS, as well?"}}