Uploaded image for project: 'Red Hat Build of Apache Camel for Quarkus'
  1. Red Hat Build of Apache Camel for Quarkus
  2. CEQ-11650

Split Brain in Camel Master with File Cluster Service.

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      • Configure the app with the following dependencies:
              <dependency>
                  <groupId>org.apache.camel.quarkus</groupId>
                  <artifactId>camel-quarkus-master</artifactId>
              </dependency>
              <dependency>
                  <groupId>org.apache.camel.quarkus</groupId>
                  <artifactId>camel-quarkus-file-cluster-service</artifactId>
              </dependency>
      
      • Configure the cluster.file.root in the application.properties:
      quarkus.camel.cluster.file.root = /tmp/cluster.lock
      
      • Add a basic route:
          @Override
          public void configure() throws Exception {
              from("master:ns:timer:test?period=5s")
                      .log("Timer invoked on a single JVM at a time");
          }
      
      • Build the application and run two instances of it.
      java -jar target/quarkus-app/quarkus-run.jar
      java -jar -Dquarkus.http.port=8082 target/quarkus-app/quarkus-run.jar
      
      • After one of the apps takes the leadership, delete the /tmp/cluster.lock/ns file and observe that the backup application becomes live
      Show
      Configure the app with the following dependencies: <dependency> <groupId> org.apache.camel.quarkus </groupId> <artifactId> camel-quarkus-master </artifactId> </dependency> <dependency> <groupId> org.apache.camel.quarkus </groupId> <artifactId> camel-quarkus-file-cluster-service </artifactId> </dependency> Configure the cluster.file.root in the application.properties: quarkus.camel.cluster.file.root = /tmp/cluster.lock Add a basic route: @Override public void configure() throws Exception { from( "master:ns:timer:test?period=5s" ) .log( "Timer invoked on a single JVM at a time" ); } Build the application and run two instances of it. java -jar target/quarkus-app/quarkus-run.jar java -jar -Dquarkus.http.port=8082 target/quarkus-app/quarkus-run.jar After one of the apps takes the leadership, delete the /tmp/cluster.lock/ns file and observe that the backup application becomes live
    • 0
    • +

      • The Camel file cluster service doesn't have a robust locking mechanism in place. If the lock file is deleted, both the live and standby routes become active, the same happens when the NFS server hosting the file is unavailable for some time and then becomes available.

              jnethert@redhat.com James Netherton
              rhn-support-adongre Avinash Dongre
              Andrej Vano Andrej Vano
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: