reliability: consolidate monitoring, migrate JDBC, fix JPA, swap Kafka#603
Merged
reliability: consolidate monitoring, migrate JDBC, fix JPA, swap Kafka#603
Conversation
80e235c to
f133a03
Compare
…itoringServer on :9097 Remove 4 redundant MonitoringServer instances (ports 9093-9096) from GlobalParticipant, PreWorkflowManager, PostWorkflowManager, and ParserWorkflowManager. All metrics already share CollectorRegistry.defaultRegistry, so a single endpoint on :9097 serves everything. Remove 12 monitoring properties from airavata-server.properties and Ansible configs.
…plicate properties Create SpringSettingsBridge that injects spring.datasource.* values into ApplicationSettings overrides so legacy code reading airavata.jdbc.* transparently receives Spring-managed datasource values. application.yml is now the single source of truth for database credentials. Remove airavata.jdbc.* from all properties files and Ansible configs.
…tityManagerFactory Replace the manual LocalContainerEntityManagerFactoryBean with Spring Boot auto-config using @EntityScan and PhysicalNamingStrategyStandardImpl (set via application.yml). This resolves the Hibernate 6.6 DuplicateMappingException on shared @Id/@joincolumn columns. Add @dependsOn on AiravataServerHandler to ensure SpringSettingsBridge runs first.
Switch to the official Apache Kafka image using KRaft mode (no ZooKeeper dependency for Kafka; ZooKeeper is retained for Helix). Also apply spotless formatting fixes.
f133a03 to
6517e8a
Compare
…ence, infra health indicator - Add healthchecks to all 5 compose services (MariaDB, RabbitMQ, ZooKeeper, Kafka, Keycloak) - Configure Spring Boot graceful shutdown (server.shutdown=graceful, 30s timeout) - Add HikariCP resilience (initialization-fail-timeout=-1 allows lazy pool init) - Add InfrastructureHealthIndicator: /actuator/health now reports real RabbitMQ/Kafka/ZK status - Show health details in actuator (management.endpoint.health.show-details=always) - Update setup.sh to wait for compose healthchecks instead of ad-hoc polling Verified: cold start (10s), graceful shutdown (3s, all ports released), warm restart (10s).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Server reliability improvements — consolidate redundant infrastructure, harden startup/shutdown, and ensure the server connects to all dependencies healthily.
Monitoring consolidation
CollectorRegistry.defaultRegistry— single endpoint on :9097 serves everythingJDBC config migration
SpringSettingsBridgeto injectspring.datasource.*intoApplicationSettingsoverridesairavata.jdbc.*transparently receives Spring-managed valuesapplication.ymlis now the single source of truth for DB credentialsairavata.jdbc.*from all properties files and Ansible configsSpring Boot auto-configured JPA
LocalContainerEntityManagerFactoryBeanfromAiravataServerMain@EntityScan+PhysicalNamingStrategyStandardImplinapplication.ymlDuplicateMappingExceptionon shared @Id/@joincolumn columns@DependsOn("springSettingsBridge")onAiravataServerHandlerensures JDBC config available during constructionKafka image
wurstmeister/kafka(last updated 2021) with officialapache/kafka:3.9.0Reliability hardening
server.shutdown=graceful, 30s timeout) — gRPC, Tomcat, Kafka producer, JPA all close properlyinitialization-fail-timeout=-1allows lazy pool init if DB is slow)/actuator/healthnow reports real RabbitMQ/Kafka/ZK connectivity statusLifecycle test results
Test plan
mvn spotless:checkpassesmvn test -T4— 179 tests, 0 failures/actuator/healthshows real infrastructure status