Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21202

When any chain is missing its ACL object, no dependencies can be added to a plan by non-admin users

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 8.0.10, 8.1.9, 8.2.5
    • 6.7.2, 6.9.2, 6.10.6
    • Dependencies
    • None

    Description

      Issue Summary

      When any chain is missing its ACL object, no dependencies can be added to any plan by non-admin users.

      Steps to Reproduce

      1. Create two or three plans
      2. Manually delete a ACL_OBJECT_IDENTITY for one of the plans of class com.atlassian.bamboo.chains.DefaultChain
      3. Try to add a child plan dependency to a non affected plan

      Expected Results

      Plan dependencies can be added.
      If the ACL object is a requirement, skip the corrupted plan and log an error but still allow other plans to be added as dependencies.
      ACL objects don't go missing in the first place (unknown how this occurs at this point)

      Actual Results

      The below exception is thrown in the $BAMBOO_HOME/logs/atlassian-bamboo.log file:

      2019-03-23 00:08:53,276 INFO [http-nio-127.0.0.1-8085-exec-83] [AccessLogFilter] user GET https://bamboo/chain/admin/config/editChainDependencies.action?buildKey=PROJ-PLAN 6632571kb
      ...
      2019-03-23 00:09:04,471 INFO [http-nio-127.0.0.1-8085-exec-142] [AccessLogFilter] user GET https://bamboo/rest/api/latest/search/plans?fuzzy=true&permission=BUILD&searchTerm=&_=1553314135264 4284492kb
      ...
      2019-03-23 00:09:06,048 TRACE [http-nio-127.0.0.1-8085-exec-142] [BambooPermissionManagerImpl] Checking permission BUILD for hibernate identity: HibernateObjectIdentityImpl{Java Type=class com.atlassian.bamboo.chains.DefaultChain, Identifier=287638344}
      2019-03-23 00:09:06,049 WARN [http-nio-127.0.0.1-8085-exec-142] [BambooRuntimeExceptionMapper] Unexpected error from REST call
      com.google.common.util.concurrent.UncheckedExecutionException: org.acegisecurity.acls.NotFoundException: Could not find ACL
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
      	at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl$BambooCachingPermissionManager.readAclById(BambooCachingPermissionManagerFacadeImpl.java:47)
      	at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:377)
      	at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:355)
      	at com.atlassian.bamboo.security.BambooPermissionManagerImpl.hasPermission(BambooPermissionManagerImpl.java:96)
      	at com.atlassian.bamboo.security.BambooCachingPermissionManagerFacadeImpl.hasPermission(BambooCachingPermissionManagerFacadeImpl.java:87)
      	at com.atlassian.bamboo.plugins.rest.service.PlanRestServiceImpl.lambda$null$8(PlanRestServiceImpl.java:342)
      	at java.util.function.Predicate.lambda$and$0(Predicate.java:69)
      	at java.util.function.Predicate.lambda$and$0(Predicate.java:69)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
      	at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742)
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.concurrent.ConcurrentHashMap$KeySpliterator.forEachRemaining(ConcurrentHashMap.java:3527)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      

      Workaround

      Workaround 1

      Have Bamboo administrators add the required dependencies to the plan. This doesn't fix the problems but will at least allow the plan configuration to be updated in the interim.

      Workaround 2

      Identify the plans that are missing the ACL object and causing the error by running the below SQL query on your Bamboo database:

      SELECT * FROM BUILD WHERE BUILD_TYPE = 'CHAIN' AND BUILD_ID NOT IN (SELECT OBJECT_ID_IDENTITY FROM ACL_OBJECT_IDENTITY WHERE OBJECT_ID_CLASS = 'com.atlassian.bamboo.chains.DefaultChain');
      

      The plan(s) that is causing the issue is unlikely to be the plan you're trying to add the dependency to. Due the corruption, the plan must be removed to get dependencies working again.

      Unfortunately cloning the plan will also clone the corruption, so its recommended if you need to backup and restore the the plan, to do so with Bamboo Specs: Actions > View plan as Java Specs

      If the affected plans history, builds and artifacts are too important to lose, please open a support ticket at https://support.atlassian.com/ and we can work with you to assess the missing ACL objects and recreate them via direct database modifications.

      Attachments

        Activity

          People

            mgardias Marcin Gardias
            jowen@atlassian.com Jeremy Owen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: