service.running hangs forever

15 views
Skip to first unread message

Russell Carter

unread,
Jan 17, 2017, 6:44:03 PM1/17/17
to Salt-users
Hi,
I am teaching myself how to use salt on a pair of FreeBSD 11 boxes.
I have a file named postgres.sls with contents:

install_postgres:
  pkg.latest:
    - name: postgresql96-server
  postgres_initdb.present:
    - name: /var/db/postgres/data96/
    - auth: password
    - user: postgres
    - password: postgres
    - encoding: UTF8
    - locale: C
    - runas: postgres     
  service.running:
    - config: /etc/rc.conf
    - enable: True
    - name: postgresql

I run this with salt -v 'host2' state.apply postgres

If I comment out the service.running section it completes.
Otherwise, it successfully adds the postgresql_enabled="YES" to /etc/rc.conf,
starts the server and then hangs indefinitely (well at least 15 minutes),
with output:

Executing job with jid 20170117162616706746
-------------------------------------------

So the question is, do I have an error in my sls file, or is this a bug?

If then I manually run service postgresql stop, the hung salt command immediately returns
with: Service postgresql is already enabled, and is dead.

FWIW, the output of service postgresql start is:
service postgresql start
LOG:  ending log output to stderr
HINT:  Future log output will go to log destination "syslog".

Maybe this interferes with the parsing?

Thanks,
Russell


Jeremy McMillan

unread,
Jan 18, 2017, 4:22:53 PM1/18/17
to Salt-users
What version of Salt are you running?

ala

salt --version

Reply all
Reply to author
Forward
0 new messages