bundles/postgresql: wait 10s after restarting

This commit is contained in:
Franzi 2021-06-29 14:23:51 +02:00
parent faae70bbb1
commit f01e24f995
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 15 additions and 2 deletions

View file

@ -94,10 +94,23 @@ restart_deps = {
svc_systemd = {
'postgresql': {
'needs': restart_deps,
'triggers': {
'action:postgresql_wait_after_restart',
},
},
}
postgres_dbs = {}
actions = {
'postgresql_wait_after_restart': {
# postgresql doesn't accept connections immediately after restarting
'command': 'sleep 10',
'triggered': True,
'before': {
'postgres_role:',
'postgres_db:',
},
},
}
for user, config in node.metadata.get('postgresql/roles', {}).items():
postgres_roles[user] = {

View file

@ -1,2 +1,2 @@
bundlewrap>=4.5.1
bundlewrap>=4.9.0
PyNaCl