{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/23223","labels_url":"https://api.github.com/repos/saltstack/salt/issues/23223/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/23223/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/23223/events","html_url":"https://github.com/saltstack/salt/issues/23223","id":72191925,"number":23223,"title":"timezone state errors out on host that is using systemd","user":{"login":"ksalman","id":1268871,"avatar_url":"https://avatars.githubusercontent.com/u/1268871?v=3","gravatar_id":"","url":"https://api.github.com/users/ksalman","html_url":"https://github.com/ksalman","followers_url":"https://api.github.com/users/ksalman/followers","following_url":"https://api.github.com/users/ksalman/following{/other_user}","gists_url":"https://api.github.com/users/ksalman/gists{/gist_id}","starred_url":"https://api.github.com/users/ksalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksalman/subscriptions","organizations_url":"https://api.github.com/users/ksalman/orgs","repos_url":"https://api.github.com/users/ksalman/repos","events_url":"https://api.github.com/users/ksalman/events{/privacy}","received_events_url":"https://api.github.com/users/ksalman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":225,"closed_issues":540,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2015-05-04T15:18:34Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-04-30T15:18:35Z","updated_at":"2015-05-04T16:41:40Z","closed_at":null,"body":"I have a timezone state like so:\r\n```\r\nPST8PDT:\r\n  timezone.system:\r\n    - utc: True\r\n```\r\nWhen I deploy that on Debian Jessie, it errors out\r\n```\r\n[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://timezone/init.sls'\r\n[INFO    ] Running state [PST8PDT] at time 08:06:03.750872\r\n[INFO    ] Executing state timezone.system for PST8PDT\r\n[INFO    ] Executing command 'timedatectl' in directory '/root'\r\n[ERROR   ] Command 'timedatectl' failed with return code: 1\r\n[ERROR   ] output: Failed to create bus connection: No such file or directory\r\n[ERROR   ] An exception occurred in this state: Traceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/salt/state.py\", line 1531, in call\r\n    **cdata['kwargs'])\r\n  File \"/usr/lib/python2.7/dist-packages/salt/states/timezone.py\", line 72, in system\r\n    if __salt__['timezone.get_hwclock']() == 'localtime':\r\n  File \"/usr/lib/python2.7/dist-packages/salt/modules/timezone.py\", line 209, in get_hwclock\r\n    'Failed to parse timedatectl output, this is likely a bug'\r\nCommandExecutionError: Failed to parse timedatectl output, this is likely a bug\r\n\r\n[INFO    ] Completed state [PST8PDT] at time 08:06:03.765944\r\nlocal:\r\n----------\r\n          ID: PST8PDT\r\n    Function: timezone.system\r\n      Result: False\r\n     Comment: An exception occurred in this state: Traceback (most recent call last):\r\n                File \"/usr/lib/python2.7/dist-packages/salt/state.py\", line 1531, in call\r\n                  **cdata['kwargs'])\r\n                File \"/usr/lib/python2.7/dist-packages/salt/states/timezone.py\", line 72, in system\r\n                  if __salt__['timezone.get_hwclock']() == 'localtime':\r\n                File \"/usr/lib/python2.7/dist-packages/salt/modules/timezone.py\", line 209, in get_hwclock\r\n                  'Failed to parse timedatectl output, this is likely a bug'\r\n              CommandExecutionError: Failed to parse timedatectl output, this is likely a bug\r\n     Started: 08:06:03.750872\r\n    Duration: 15.072 ms\r\n     Changes:\r\n\r\nSummary\r\n------------\r\nSucceeded: 0\r\nFailed:    1\r\n------------\r\nTotal states run:     1\r\n```\r\nVersions\r\n```\r\nroot@foo:~# salt-minion --versions\r\n                  Salt: 2014.7.2\r\n                Python: 2.7.9 (default, Mar  1 2015, 12:57:24)\r\n                Jinja2: 2.7.3\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.4.2\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.11\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.4.0\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.5\r\n                  Mako: 1.0.0\r\n Debian source package: 2014.7.2+ds-1\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/98775230","html_url":"https://github.com/saltstack/salt/issues/23223#issuecomment-98775230","issue_url":"https://api.github.com/repos/saltstack/salt/issues/23223","id":98775230,"user":{"login":"ksalman","id":1268871,"avatar_url":"https://avatars.githubusercontent.com/u/1268871?v=3","gravatar_id":"","url":"https://api.github.com/users/ksalman","html_url":"https://github.com/ksalman","followers_url":"https://api.github.com/users/ksalman/followers","following_url":"https://api.github.com/users/ksalman/following{/other_user}","gists_url":"https://api.github.com/users/ksalman/gists{/gist_id}","starred_url":"https://api.github.com/users/ksalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksalman/subscriptions","organizations_url":"https://api.github.com/users/ksalman/orgs","repos_url":"https://api.github.com/users/ksalman/repos","events_url":"https://api.github.com/users/ksalman/events{/privacy}","received_events_url":"https://api.github.com/users/ksalman/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T16:41:40Z","updated_at":"2015-05-04T16:41:40Z","body":"Unfortunately that did  not help\r\n```\r\noot@foo:~# salt-call state.sls timezone\r\n[INFO    ] Loading fresh modules for state activity\r\n[INFO    ] Fetching file from saltenv 'base', ** skipped ** latest already in cache 'salt://timezone/init.sls'\r\n[INFO    ] Running state [America/Los_Angeles] at time 09:40:18.364498\r\n[INFO    ] Executing state timezone.system for America/Los_Angeles\r\n[INFO    ] Executing command 'timedatectl' in directory '/root'\r\n[ERROR   ] Command 'timedatectl' failed with return code: 1\r\n[ERROR   ] output: Failed to create bus connection: No such file or directory\r\n[ERROR   ] An exception occurred in this state: Traceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/salt/state.py\", line 1542, in call\r\n    **cdata['kwargs'])\r\n  File \"/usr/lib/python2.7/dist-packages/salt/states/timezone.py\", line 72, in system\r\n    if __salt__['timezone.get_hwclock']() == 'localtime':\r\n  File \"/usr/lib/python2.7/dist-packages/salt/modules/timezone.py\", line 209, in get_hwclock\r\n    'Failed to parse timedatectl output, this is likely a bug'\r\nCommandExecutionError: Failed to parse timedatectl output, this is likely a bug\r\n\r\n[INFO    ] Completed state [America/Los_Angeles] at time 09:40:18.379639\r\nlocal:\r\n----------\r\n          ID: America/Los_Angeles\r\n    Function: timezone.system\r\n      Result: False\r\n     Comment: An exception occurred in this state: Traceback (most recent call last):\r\n                File \"/usr/lib/python2.7/dist-packages/salt/state.py\", line 1542, in call\r\n                  **cdata['kwargs'])\r\n                File \"/usr/lib/python2.7/dist-packages/salt/states/timezone.py\", line 72, in system\r\n                  if __salt__['timezone.get_hwclock']() == 'localtime':\r\n                File \"/usr/lib/python2.7/dist-packages/salt/modules/timezone.py\", line 209, in get_hwclock\r\n                  'Failed to parse timedatectl output, this is likely a bug'\r\n              CommandExecutionError: Failed to parse timedatectl output, this is likely a bug\r\n     Started: 09:40:18.364498\r\n    Duration: 15.141 ms\r\n     Changes:\r\n\r\nSummary\r\n------------\r\nSucceeded: 0\r\nFailed:    1\r\n```"}}