Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6210

Fabric Port Service not cleaning up ports properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • jboss-fuse-6.2.1
    • Fabric8 v1
    • % %
    • Hide

      Start a fresh 6.3 or 6.2.1 R4 and follow these commands:

      fabric:create --clean --wait-for-provisioning --profile fabric
      profile-edit --feature fabric-zookeeper-commands fabric
      
      zk:list -r /fabric/registry/ports/ip
      
      # check what ports are reserved
      zk:get /fabric/registry/ports/ip/<ip>
      
      profile-create port
      profile-edit --pid org.ops4j.pax.web/org.osgi.service.http.port='${port:8501,8544}' port
      
      container-create-child --profile fabric root child
      
      list = [1 2 3 4 5 6 ]; each ($list) { container-add-profile child port ; sleep 3000 ; container-remove-profile child port ; sleep 3000 }
      # watch Pax-Web starting up on new ports all the time
      
      # note how many ports of the range [8501,8544] are blocked now
      zk:get /fabric/registry/ports/ip/<ip>
      
      container-delete child
      zk:get /fabric/registry/ports/ip/a185977e84c7
      
      # only the ports currently in use by the deleted container got removed from list. All previous ports are still blocked, slowly exhausting the port range, but won't be used at all by any containers.
      
      Show
      Start a fresh 6.3 or 6.2.1 R4 and follow these commands: fabric:create --clean --wait- for -provisioning --profile fabric profile-edit --feature fabric-zookeeper-commands fabric zk:list -r /fabric/registry/ports/ip # check what ports are reserved zk:get /fabric/registry/ports/ip/<ip> profile-create port profile-edit --pid org.ops4j.pax.web/org.osgi.service.http.port= '${port:8501,8544}' port container-create-child --profile fabric root child list = [1 2 3 4 5 6 ]; each ($list) { container-add-profile child port ; sleep 3000 ; container-remove-profile child port ; sleep 3000 } # watch Pax-Web starting up on new ports all the time # note how many ports of the range [8501,8544] are blocked now zk:get /fabric/registry/ports/ip/<ip> container-delete child zk:get /fabric/registry/ports/ip/a185977e84c7 # only the ports currently in use by the deleted container got removed from list. All previous ports are still blocked, slowly exhausting the port range, but won't be used at all by any containers.

    Description

      The Fabric port service does not clean up reserved ports when a profile configuration for a specific container gets modified or when a profile is removed or added to the container.

      This can exhaust all ports within a specified port range at some time, raising
      io.fabric8.api.FabricException: Could not find port within range [8501,8544] for pid org.ops4j.pax.web
      at container creation time.

      See Steps to Reproduce for details.

      Attachments

        Activity

          People

            pantinor@redhat.com Paolo Antinori
            rhn-support-tmielke Torsten Mielke
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: