[ https://issues.apache.org/jira/browse/CAMEL-20242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-20242: -------------------------------- Fix Version/s: 4.4.0 > camel-routes health check reports UP right before routes were attempted to be > setup when using supervising route controller > --------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-20242 > URL: https://issues.apache.org/jira/browse/CAMEL-20242 > Project: Camel > Issue Type: Improvement > Components: camel-health, camel-microprofile-health > Affects Versions: 4.1.0 > Reporter: Rinaldo Pitzer Júnior > Assignee: Luca Burgazzoli > Priority: Minor > Fix For: 4.4.0 > > > The default status for the camel-routes health checks [is > UP|https://github.com/apache/camel/blob/camel-4.1.x/components/camel-microprofile/camel-microprofile-health/src/main/java/org/apache/camel/microprofile/health/CamelMicroProfileRepositoryHealthCheck.java#L53], > and it is used if none of the routes is reporting DOWN. > When using the Supervising route controller, if the health check endpoint is > called before the routes are started, the default status UP is reported. > This means that the application reports as Ready even before the routes were > attempted to be started. > Even in scenarios where the route is certainly going to fail to startup, > [like this > one|https://github.com/rinaldodev/camel-playground/blob/7a30e964ba2ba233db347771d088b721cc331b82/src/main/java/com/github/lburgazzoli/MyRoutes.java], > there is a brief period where the application reports as Ready. > This brief period is long enough for Camel K to occasionally report an > Integration as Ready before it really is, which also makes [some tests flaky > | https://github.com/apache/camel-k/issues/4922]. > Possible solutions: > # Don't report UP as the default camel-routes status: if the routes health > check is enabled and there are no routes reporting yet, should this really > default to UP? > # Have a health check specifically check if the route controller is Ready: if > routes weren't even attempted to be started, then the supervising route > controller could report itself as DOWN. > # ? -- This message was sent by Atlassian Jira (v8.20.10#820010)