Closed lgammo closed 1 year ago
git-version was introduced in 5a99c5a. But I do not see where it is created.
Hi @lgammo ; the only build system supported for the project is the Makefile. Please see about using the Makefile to drive your work there, or at least to create the git version files. See make version
for instance.
Thanks for the reply.
Any ideas?
- I was following the tutorial, which did not mention anything about building anything.
Oh I see. That's where the docker-compose build
comes from. Did you run that command from the docs/tutorial
sub-directory of the source checkout like the tutorial sayth you should? It seems to me that the errors you had could be explained easily if you mistakenly ran that command at the top-level directory from the checkout.
- The build system expects postgres to be installed natively for some reason.
Sure, the source code for pg_auto_failover has some build-time dependencies with PostgreSQL development headers and libs. Depending on your packaging system and OS of choice, that might mean installing all of the Postgres packages is required.
- docker compose exec app psql' from the tutorial, I got: psql: error: connection to server at "node1" (172.21.0.3), port 5432 failed: FATAL: no pg_hba.conf entry for host "172.21.0.2", user "tutorial", database "tutorial", SSL encryption
I will need more information to be able to debug that one. First, let's make sure you are running the actual tutorial commands from the right place.
I am running the tutorial from pg_auto_failover/docs/tutorial. In one terminal I do ' docker compose up app monitor node1 node2 ', and in an other terminal I do ' docker compose exec app psql' and that's when I get: psql: error: connection to server at "node1" (172.21.0.4), port 5432 failed: FATAL: no pg_hba.conf entry for host "172.21.0.2", user "tutorial", database "tutorial", SSL encryption
Logs from the 'docker compose up app monitor node1 node2' command.
I put the logs from the entire set of dockers images in the hope they are useful. The logs from the 'docker logs tutorial-app-1' container are like this: ...logs removed... 2023-01-26 12:52:19.060851 2023-01-26 13:02:19.121722 2023-01-26 13:12:19.210549 2023-01-26 13:22:19.264046 2023-01-26 13:32:19.293530 2023-01-26 13:42:19.342018 2023-01-26 13:52:19.432689 2023-01-26 14:02:19.513564 2023-01-26 14:12:19.613798 2023-01-26 14:22:19.714192 2023-01-26 14:32:19.787126 2023-01-26 14:42:19.887374 2023-01-26 14:52:19.959306 2023-01-26 15:02:20.026578 2023-01-26 15:12:20.037634 2023-01-26 15:22:20.119609 2023-01-26 15:32:20.189649 2023-01-26 15:42:20.289967
And it stopped after that.
The tutorial docker images appear to be fine and I am able to perform switchover and other tests.
Thanks.
I am following the tutorial https://pg-auto-failover.readthedocs.io/en/main/tutorial.html on a redhat 8 VM.
The first issue is that docker-compose is not available but docker compose is. Not a big issue I think.
Following the tutorial
There is no git-version.h in the entire cloned repo. However, I see in commit 20c1264 this line in Dockerfile.docs: RUN touch src/bin/pg_autoctl/git-version.h
and indeed it is in the Dockerfile.docs file, but not in Dockerfile.
Did I miss a step?
Thanks.