Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20411

[QA](7.3.z) MP Health returns UP when empty-readiness-checks-status=DOWN

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 7.3.4.GA
    • 7.3.4.GA
    • MP Health
    • None
    • False
    • False
    • +
    • Undefined

    Description

      In XP-2 (and also in XP-1), the /health/ready endpoint returns "UP" even when empty-readiness-checks-status is set to "DOWN";

      Note that WildFly and EAP 7.4 behave differetly and return "DOWN" when empty-readiness-checks-status is set to "DOWN";

      Also note that we decompiled wildfly-microprofile-health-smallrye-7.3.4.GA-redhat-20201025.jar and the modifications for https://issues.redhat.com/browse/WFLY-12952 seem to be correclty there, e.g. org.wildfly.extension.microprofile.health.deployment.CDIExtension.java:

      	private void afterDeploymentValidation(@Observes AfterDeploymentValidation avd, BeanManager bm) {
              Config config;
              boolean disableDefaultprocedure;
              this.instance = bm.createInstance();
              this.addHealthChecks(HealthLiteral.INSTANCE, (arg_0, arg_1) -> this.reporter.addHealthCheck(arg_0, arg_1), this.healthChecks);
              this.addHealthChecks((AnnotationLiteral)Liveness.Literal.INSTANCE, (arg_0, arg_1) -> this.reporter.addLivenessCheck(arg_0, arg_1), this.livenessChecks);
              this.addHealthChecks((AnnotationLiteral)Readiness.Literal.INSTANCE, (arg_0, arg_1) -> this.reporter.addReadinessCheck(arg_0, arg_1), this.readinessChecks);
              if (this.readinessChecks.isEmpty() && !(disableDefaultprocedure = (config = ConfigProvider.getConfig((ClassLoader)this.module.getClassLoader())).getOptionalValue("mp.health.disable-default-procedures", Boolean.class).orElse(false).booleanValue())) {
                  this.defaultReadinessCheck = new DefaultReadinessHealthCheck(this.module.getName());
                  this.reporter.addReadinessCheck(this.defaultReadinessCheck, (ClassLoader)this.module.getClassLoader());
              }
          }
      

      In the following you can find the details;

      XP-2 (EAP 7.3.4.GA)

      AS-IS

      Start server ...

      $ ./bin/standalone.sh --server-config=standalone-microprofile.xml
      

      From another terminal issue:

      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"boot-errors","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"deployments-status","status":"UP"}]}
      
      empty-readiness-checks-status=DOWN

      Using the cli to set empty-readiness-checks-status=DOWN:

      $ ./bin/jboss-cli.sh
      [disconnected /] connect
      [standalone@localhost:9990 /] /subsystem=microprofile-health-smallrye:write-attribute(name=empty-readiness-checks-status,value=DOWN)
      {
          "outcome" => "success",
          "response-headers" => {
              "operation-requires-reload" => true,
              "process-state" => "reload-required"
          }
      }
      [standalone@localhost:9990 /] reload
      

      Invoke the /health/ready again:

      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"boot-errors","status":"UP"},{"name":"deployments-status","status":"UP"}]}
      

      XP-1 (EAP 7.3.4.GA)

      AS-IS
      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"boot-errors","status":"UP"},{"name":"deployments-status","status":"UP"}]}
      
      empty-readiness-checks-status=DOWN
      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"boot-errors","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"deployments-status","status":"UP"}]}
      

      wildfly 22.0.0.Beta1-SNAPSHOT

      AS-IS
      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"boot-errors","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"deployments-status","status":"UP"},{"name":"empty-readiness-checks","status":"UP"}]}
      
      empty-readiness-checks-status=DOWN
      $ curl http://localhost:9990/health/ready
      {"status":"DOWN","checks":[{"name":"empty-readiness-checks","status":"DOWN"},{"name":"boot-errors","status":"UP"},{"name":"deployments-status","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}}]}
      

      EAP 7.4.0.CD21

      AS-IS
      $ curl http://localhost:9990/health/ready
      {"status":"UP","checks":[{"name":"boot-errors","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"empty-readiness-checks","status":"UP"},{"name":"deployments-status","status":"UP"}]}
      
      empty-readiness-checks-status=DOWN
      $ curl http://localhost:9990/health/ready
      {"status":"DOWN","checks":[{"name":"deployments-status","status":"UP"},{"name":"server-state","status":"UP","data":{"value":"running"}},{"name":"boot-errors","status":"UP"},{"name":"empty-readiness-checks","status":"DOWN"}]}
      

      Attachments

        Issue Links

          Activity

            People

              jmesnil1@redhat.com Jeff Mesnil
              tborgato@redhat.com Tommaso Borgato
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: