Abdullah sanoosi
Abdullah sanoosi

Reputation: 1

OpenShift Deployment Issue: Result Page Not Reflecting Votes from PostgreSQL

I'm very new to OpenShift and I'm still learning. Since my local machine doesn't have enough resources for CodeReady Containers (CRC), I'm currently using the 30-day free trial of OpenShift Developer Sandbox. I'm trying to deploy this voting app as a way to practice working on OpenShift, and I have encountered an issue where I'm unable to find a solution. Your help on this matter will be immensely appreciated, and thank you for your time.

I forked the original GitHub repo because it had some dependency version issues, and this is the URL for the forked GitHub repo: https://github.com/AbdullahSanoosi/openshift-voting-app.git.

I have deployed the two databases (Redis and PostgreSQL) and have deployed the three applications (vote, result, and worker).

This is how it is supposed to work:

When a vote is cast in the vote web page, it is stored in the Redis DB temporarily. The worker reads from the Redis DB and writes to PostgreSQL. The result web page reads from PostgreSQL and displays the results. In this process, everything up to the worker writing to PostgreSQL is working, but the result web page reading from PostgreSQL is not working. Every time I visit the result page, I get a 50-50% votes even if I have just deployed them; it is displaying the same thing, where it should be displaying 0 votes.

I did everything I'm capable of to solve this issue, but I'm unable to find a solution. Please, any help would be greatly appreciated.

NOTE: I deployed another pod in the cluster using the busybox image to test whether the connection to the PostgreSQL DB is working by running telnet to the port 5432 where the PostgreSQL DB is running, and I got the output as Connected Db.

Upvotes: 0

Views: 41

Answers (0)

Related Questions