Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2701

Supervisor crashed if blob has bad permission

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      When

      storm.blobstore.acl.validation.enabled: true
      

      is set and we submit a topology with topology.blobstore.map. If the topology has no access to any one blob in the map, the supervisor will crash.

      Error:

      2017-08-21 14:21:56.597 o.a.s.d.s.Slot SLOT_6701 [ERROR] Error when processing event
      java.util.concurrent.ExecutionException: AuthorizationException(msg:[ethan] does not have access to key1)
              at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_131]
              at java.util.concurrent.FutureTask.get(FutureTask.java:206) ~[?:1.8.0_131]
              at org.apache.storm.localizer.LocalDownloadedResource$NoCancelFuture.get(LocalDownloadedResource.java:63) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.daemon.supervisor.Slot.handleWaitingForBlobLocalization(Slot.java:410) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.daemon.supervisor.Slot.stateMachineStep(Slot.java:305) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.daemon.supervisor.Slot.run(Slot.java:789) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      Caused by: org.apache.storm.generated.AuthorizationException
              at org.apache.storm.generated.Nimbus$getBlobMeta_result$getBlobMeta_resultStandardScheme.read(Nimbus.java:24484) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.generated.Nimbus$getBlobMeta_result$getBlobMeta_resultStandardScheme.read(Nimbus.java:24461) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.generated.Nimbus$getBlobMeta_result.read(Nimbus.java:24392) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86) ~[libthrift-0.9.3.jar:0.9.3]
              at org.apache.storm.generated.Nimbus$Client.recv_getBlobMeta(Nimbus.java:785) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.generated.Nimbus$Client.getBlobMeta(Nimbus.java:772) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.blobstore.NimbusBlobStore.getBlobMeta(NimbusBlobStore.java:306) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.utils.ServerUtils.nimbusVersionOfBlob(ServerUtils.java:375) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.localizer.Localizer.downloadBlob(Localizer.java:508) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.localizer.Localizer.access$000(Localizer.java:68) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.localizer.Localizer$DownloadBlob.call(Localizer.java:497) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.localizer.Localizer$DownloadBlob.call(Localizer.java:473) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
      2017-08-21 14:21:56.597 o.a.s.u.Utils SLOT_6700 [ERROR] Halting process: Error when processing an event
      java.lang.RuntimeException: Halting process: Error when processing an event
              at org.apache.storm.utils.Utils.exitProcess(Utils.java:437) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.daemon.supervisor.Slot.run(Slot.java:823) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      2017-08-21 14:21:56.597 o.a.s.u.Utils SLOT_6701 [ERROR] Halting process: Error when processing an event
      java.lang.RuntimeException: Halting process: Error when processing an event
              at org.apache.storm.utils.Utils.exitProcess(Utils.java:437) ~[storm-client-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
              at org.apache.storm.daemon.supervisor.Slot.run(Slot.java:823) ~[storm-server-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
      2017-08-21 14:21:56.610 o.a.s.d.s.Supervisor Thread-6 [INFO] Shutting down supervisor 9cd8089d-5847-47f2-869a-708345b829b4-10.88.213.187
      2017-08-21 14:21:56.611 o.a.s.e.EventManagerImp Thread-5 [INFO] Event manager interrupted
      

      To reproduce:

      1. Create a blobstore with permission set to one user (e.g mapredqa).

      sudo -u mapredqa storm blobstore create --file test-blobstore.txt --acl u:mapredqa:rwa key1
      

      2. Submit a topology with topology.blobstore.map config as someone else (e.g. ethan).

      sudo -u ethan storm jar /tmp/storm-starter-2.0.0-SNAPSHOT.jar org.apache.storm.starter.WordCountTopology wc -c topology.blobstore.map='{"key1":{"localname":"test-blobstore.txt", "uncompress":false}}'
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ethanli Ethan Li
                Reporter:
                ethanli Ethan Li
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m