-
Notifications
You must be signed in to change notification settings - Fork 284
Closed
Description
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.
OS: Darwin 15.6.0, Salt Version: saltstack: stable 2017.7.1 (bottled), HEAD
ID: postgres_schema-uuid_ossp
Function: postgres_schema.present
Name: uuid_ossp
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/state.py", line 1837, in call
**cdata['kwargs'])
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/loader.py", line 1794, in wrapper
return f(*args, **kwargs)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/states/postgres_schema.py", line 74, in present
schema_attr = __salt__['postgres.schema_get'](dbname, name, **db_args)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py", line 2108, in schema_get
db_password=db_password)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py", line 2160, in schema_list
password=db_password)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py", line 428, in psql_query
password=password)
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
rcmd, runas=runas, password=password, host=host, port=port, user=user)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/postgres.py", line 184, in _run_psql
ret = __salt__['cmd.run_all'](cmd, python_shell=False, **kwargs)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 1699, in run_all
**kwargs)
File "/usr/local/Cellar/saltstack/2017.7.1/libexec/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 409, in _run
'User \'{0}\' is not available'.format(runas)
CommandExecutionError: User 'postgres' is not available
Started: 01:40:38.529985
Duration: 3.858 ms
Changes:
Metadata
Metadata
Assignees
Labels
No labels