{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/163","repository_url":"https://api.github.com/repos/saltstack-formulas/postgres-formula","labels_url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/163/comments","events_url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/163/events","html_url":"https://github.com/saltstack-formulas/postgres-formula/issues/163","id":258197599,"number":163,"title":"Darwin: postgres_schema.present throwing exception","user":{"login":"noelmcloughlin","id":13322818,"avatar_url":"https://avatars1.githubusercontent.com/u/13322818?v=4","gravatar_id":"","url":"https://api.github.com/users/noelmcloughlin","html_url":"https://github.com/noelmcloughlin","followers_url":"https://api.github.com/users/noelmcloughlin/followers","following_url":"https://api.github.com/users/noelmcloughlin/following{/other_user}","gists_url":"https://api.github.com/users/noelmcloughlin/gists{/gist_id}","starred_url":"https://api.github.com/users/noelmcloughlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noelmcloughlin/subscriptions","organizations_url":"https://api.github.com/users/noelmcloughlin/orgs","repos_url":"https://api.github.com/users/noelmcloughlin/repos","events_url":"https://api.github.com/users/noelmcloughlin/events{/privacy}","received_events_url":"https://api.github.com/users/noelmcloughlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-16T01:11:28Z","updated_at":"2017-09-22T15:25:52Z","closed_at":null,"author_association":"MEMBER","body":"On Darwin the POSIX user/group created by default is named \"_postgres\".  An exception is thrown because salt tries to \"runas: postgres\" but this user does not exist.\r\n\r\nOS: Darwin 15.6.0, Salt Version: saltstack: stable 2017.7.1 (bottled), HEAD\r\n>\r\n          ID: postgres_schema-uuid_ossp\r\n    Function: postgres_schema.present\r\n        Name: uuid_ossp\r\n      Result: False\r\n     Comment: An exception occurred in this state: Traceback (most recent call last):\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/state.py\", line 1837, in call\r\n                  **cdata['kwargs'])\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/loader.py\", line 1794, in wrapper\r\n                  return f(*args, **kwargs)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/states/postgres_schema.py\", line 74, in present\r\n                  schema_attr = __salt__['postgres.schema_get'](dbname, name, **db_args)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py\", line 2108, in schema_get\r\n                  db_password=db_password)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py\", line 2160, in schema_list\r\n                  password=db_password)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py\", line 428, in psql_query\r\n                  password=password)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py\", line 367, in _psql_prepare_and_run\r\n                  rcmd, runas=runas, password=password, host=host, port=port, user=user)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py\", line 184, in _run_psql\r\n                  ret = __salt__['cmd.run_all'](cmd, python_shell=False, **kwargs)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/cmdmod.py\", line 1699, in run_all\r\n                  **kwargs)\r\n                File \"/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/cmdmod.py\", line 409, in _run\r\n                  'User \\'{0}\\' is not available'.format(runas)\r\n              CommandExecutionError: User 'postgres' is not available\r\n     Started: 01:40:38.529985\r\n    Duration: 3.858 ms\r\n     Changes: \r\n>"},"comment":{"url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/comments/331479063","html_url":"https://github.com/saltstack-formulas/postgres-formula/issues/163#issuecomment-331479063","issue_url":"https://api.github.com/repos/saltstack-formulas/postgres-formula/issues/163","id":331479063,"user":{"login":"noelmcloughlin","id":13322818,"avatar_url":"https://avatars1.githubusercontent.com/u/13322818?v=4","gravatar_id":"","url":"https://api.github.com/users/noelmcloughlin","html_url":"https://github.com/noelmcloughlin","followers_url":"https://api.github.com/users/noelmcloughlin/followers","following_url":"https://api.github.com/users/noelmcloughlin/following{/other_user}","gists_url":"https://api.github.com/users/noelmcloughlin/gists{/gist_id}","starred_url":"https://api.github.com/users/noelmcloughlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noelmcloughlin/subscriptions","organizations_url":"https://api.github.com/users/noelmcloughlin/orgs","repos_url":"https://api.github.com/users/noelmcloughlin/repos","events_url":"https://api.github.com/users/noelmcloughlin/events{/privacy}","received_events_url":"https://api.github.com/users/noelmcloughlin/received_events","type":"User","site_admin":false},"created_at":"2017-09-22T15:25:52Z","updated_at":"2017-09-22T15:25:52Z","author_association":"MEMBER","body":"Based on salt.grains.core.py (if grains['kernel'] == Darwin THEN grains['os'] = \"MacOS\"). So we could update osmap.yaml with 'MacOS' stanza if needed."}}
{"actor":{"display_login":"noelmcloughlin"}}