Skip to content

Commit

Permalink
Fix anchoring in postgresql::server::instance::service
Browse files Browse the repository at this point in the history
Some resources where not properly ordered between the "begin" and "end"
anchors.  Make sure they are properly bound to them.
  • Loading branch information
smortex committed Jan 3, 2024
1 parent 6596b99 commit ebc9d7e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manifests/server/instance/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
status => $service_status,
}

Anchor["postgresql::server::service::begin::${name}"]
-> Service["postgresqld_instance_${name}"]
-> Anchor["postgresql::server::service::end::${name}"]

if $service_ensure in ['running', true] {
# This blocks the class before continuing if chained correctly, making
# sure the service really is 'up' before continuing.
Expand All @@ -56,10 +60,13 @@
sleep => 1,
tries => 60,
psql_path => $psql_path,
require => Service["postgresqld_instance_${name}"],
before => Anchor["postgresql::server::service::end::${name}"],
}
Postgresql::Server::Database <| title == $default_database |> -> Postgresql_conn_validator["validate_service_is_running_instance_${name}"]

Anchor["postgresql::server::service::begin::${name}"]
-> Service["postgresqld_instance_${name}"]
-> Postgresql::Server::Database <| title == $default_database |>
-> Postgresql_conn_validator["validate_service_is_running_instance_${name}"]
-> Anchor["postgresql::server::service::end::${name}"]
}
}

Expand Down

0 comments on commit ebc9d7e

Please sign in to comment.