Skip to content

Wait 5 minutes for postgres to be ready#17

Open
c-m-duncan wants to merge 1 commit intomainfrom
postgres-wait
Open

Wait 5 minutes for postgres to be ready#17
c-m-duncan wants to merge 1 commit intomainfrom
postgres-wait

Conversation

@c-m-duncan
Copy link
Copy Markdown
Contributor

Having issues with postgres being marked as ready before it is actually ready. Trying to find a more graceful solution to this.

Comment thread src/helm.ts
Comment on lines +28 to +32
) => {
// Waits 5 minutes because Postgres marks as complete before it's ready
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 3000);

return new Release(classRef, "UrbanOSHelmRelease", {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this will work

Anything in a .ts file only generates the tf.out file. Then the tf.out file is applied by terraform.

My understanding is this will just add a 5 minute delay in the tf.out file being generated, with no affect on the actual tf apply that creates resources from the tf.out.

Other ideas would be, maybe create a helm chart that's entire job is just to take a while to install? That way you could set up a dependency that creates a 5 minute delay incidentally.

delay = install5MinDelay([dependsOn: postgres])
installUrbanOS[(dependsOn: [..., delay])

// by depending on the delay, urbanos install is delayed
// this is a pretty gross idea tho

The "proper" way would be to make the services that depend on postgres, able to attempt reconnecting themselves, but I understand how that would be a larger set of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants