Hi Alex

You would need to either
- build your own custom child GoCD server image which contains the relevant
postgres binaries for your Postgres version, push 8t to our own registry
and then override the repository/image:tag when installing the Helm chart,
or
- use an additional docker entrypoint script to dynamically install them
(or download from some internal artifact store) every time the container
starts, or
- mount an existing persistent volume containing the binaries using the
helm chart configuration and add it to the PATH

The official images so not contain these binaries as they are somewhat
database version dependent and it's not the 'default' configuration.

-Chad

On Tue, 20 Jun 2023, 19:41 Alexandru Cojocariu, <
cojocariualexand...@gmail.com> wrote:

> Hello,
>
> I am facing an issue regarding the GoCD postgres backup. I am using an
> external postgres server and I am trying to trigger a backup (using the
> GoCD API) with a curl command:
>
> curl 'https://<gocd-instance>/go/api/backups' -i -u
> '<username>:<password>' -H 'X-GoCD-Confirm: true' -H 'Accept:
> application/vnd.go.cd.v2+json' -X POST
>
> When inspecting the output in the gocd-server I get:
>
>
>
> *jvm 1    | java.lang.RuntimeException: java.lang.RuntimeException: There
> was an error backing up the database using `pg_dump`. The `pg_dump` process
> failed with code 2.           ....jvm 1    | Caused by:
> java.io.IOException: Cannot run program "pg_dump": error=2, No such file or
> directory*
> jvm 1    |      at java.base/java.lang.ProcessBuilder.start(Unknown Source)
> jvm 1    |      at java.base/java.lang.ProcessBuilder.start(Unknown Source)
> jvm 1    |      at
> org.zeroturnaround.exec.ProcessExecutor.invokeStart(ProcessExecutor.java:997)
> jvm 1    |      at
> org.zeroturnaround.exec.ProcessExecutor.startInternal(ProcessExecutor.java:970)
> jvm 1    |      at
> org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:906)
> jvm 1    |      at
> com.thoughtworks.go.server.database.pg.PostgresqlBackupProcessor.backup(PostgresqlBackupProcessor.java:43)
> jvm 1    |      ... 10 common frames omitted
> *jvm 1    | Caused by: java.io.IOException: error=2, No such file or
> directory*
> jvm 1    |      at java.base/java.lang.ProcessImpl.forkAndExec(Native
> Method)
> jvm 1    |      at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
> jvm 1    |      at java.base/java.lang.ProcessImpl.start(Unknown Source)
> jvm 1    |      ... 16 common frames omitted
>
> The server is a k8s pod deployed through a helmchart. The helmchart used
> is: https://artifacthub.io/packages/helm/gocd/gocd - version 2.1.0
> The gocd image specified in the helmchart is: gocd-server v23.1.0
> The postgres server is connected according to the specifications from
> here:
> https://docs.gocd.org/current/installation/configuring_database/connection-properties.html
> My question is: can I configure somehow the helmchart to recognize the
> pg_dump command or the postgresql tools in general?
>
> Thanks,
> Alex
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-cd+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/e384ce50-6e2d-4f81-b95f-3abb50c3cc2fn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/e384ce50-6e2d-4f81-b95f-3abb50c3cc2fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH_NYV%2B2CE4_fvsy52ZfVKJxFDhzaM%3DsN-j95_Yx%3DbT5jQ%40mail.gmail.com.

Reply via email to