Skip to content

Commit 7346077

Browse files
smortexpraj1001
authored andcommitted
Fix anchoring in postgresql::server::instance::service
Some resources where not properly ordered between the "begin" and "end" anchors. Make sure they are properly bound to them.
1 parent 04f4456 commit 7346077

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

manifests/server/instance/service.pp

+10-3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
status => $service_status,
4343
}
4444

45+
Anchor["postgresql::server::service::begin::${name}"]
46+
-> Service["postgresqld_instance_${name}"]
47+
-> Anchor["postgresql::server::service::end::${name}"]
48+
4549
if $service_ensure in ['running', true] {
4650
# This blocks the class before continuing if chained correctly, making
4751
# sure the service really is 'up' before continuing.
@@ -56,10 +60,13 @@
5660
sleep => 1,
5761
tries => 60,
5862
psql_path => $psql_path,
59-
require => Service["postgresqld_instance_${name}"],
60-
before => Anchor["postgresql::server::service::end::${name}"],
6163
}
62-
Postgresql::Server::Database <| title == $default_database |> -> Postgresql_conn_validator["validate_service_is_running_instance_${name}"]
64+
65+
Anchor["postgresql::server::service::begin::${name}"]
66+
-> Service["postgresqld_instance_${name}"]
67+
-> Postgresql::Server::Database <| title == $default_database |>
68+
-> Postgresql_conn_validator["validate_service_is_running_instance_${name}"]
69+
-> Anchor["postgresql::server::service::end::${name}"]
6370
}
6471
}
6572

0 commit comments

Comments
 (0)