-
Bug
-
Resolution: Done
-
Undefined
-
None
-
rc5
-
False
-
-
False
-
-
-
Moderate
Description of the problem:
When trying to deploy workflows in a separate namespace than sonataflow-infra, the workflow pod fails to deploy with a CrashLoopBackOff:
$ oc get pods -n workflow NAME READY STATUS RESTARTS AGE m2k-65d9fbc986-pnz7w 0/1 CrashLoopBackOff 31 (66s ago) 135m
From the workflow logs:
2024-07-24 11:50:02,943 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): java.lang.RuntimeException: Failed to start quarkus at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source) at io.quarkus.runtime.Application.start(Application.java:101) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111) at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) at io.quarkus.runtime.Quarkus.run(Quarkus.java:124) at io.quarkus.runner.GeneratedMain.main(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)Caused by: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database: The connection attempt failed.-------------------------------------------------------------------------SQL State : 08001Error Code : 0Message : The connection attempt failed. at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:60) at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:74) at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:140) at org.flywaydb.core.Flyway.migrate(Flyway.java:140) at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:93) at io.quarkus.deployment.steps.FlywayProcessor$startActions2035800939.deploy_0(Unknown Source) at io.quarkus.deployment.steps.FlywayProcessor$startActions2035800939.deploy(Unknown Source) ... 13 moreCaused by: org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:354) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:263) at org.postgresql.Driver.makeConnection(Driver.java:443) at org.postgresql.Driver.connect(Driver.java:297) at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:226) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:536) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:517) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:75) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)Caused by: java.net.UnknownHostException: sonataflow-psql-postgresql.workflow at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:572) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.postgresql.core.PGStream.createSocket(PGStream.java:243) at org.postgresql.core.PGStream.<init>(PGStream.java:98) at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:132) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:258) ... 12 more
Note that the sonataflow-psql-postgresql secret was created and exists in the workflow namespace.
How reproducible: 100%
Steps to reproduce:
1. Deploy any workflow in a separate namespace than sonataflow-infra
2. Check pod status
Actual results: Pods fail to deploy with CLBO
Expected results: Pods should deploy normally
Additional info:
$ oc get sf -n workflow NAME PROFILE VERSION URL READY REASON greeting prod 1.0 False WaitingForDeployment m2k prod 1.0 False WaitingForDeployment
[kni@provisionhost-0-0 ~]$ oc get sfp -n workflow NAME CLUSTER READY REASON sonataflow-platform openshift True
- links to