Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1489 [Umbrella] Work-preserving ApplicationMaster restart
  3. YARN-2371

Wrong NMToken is issued when NM preserving restarts with containers running

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 2.5.0
    • resourcemanager
    • None

    Description

      When application is submitted with "ApplicationSubmissionContext.getKeepContainersAcrossApplicationAttempts() == true", and NM is restarted with containers running, wrong NMToken is issued to AM through RegisterApplicationMasterResponse.
      See the NM log:

      2014-07-30 11:59:58,941 ERROR org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl: Unauthorized request to start container.-
      NMToken for application attempt : appattempt_1406691610864_0002_000001 was used for starting container with container token issued for application attempt : appattempt_1406691610864_0002_000002
      

      The reason is in below code:

       
      createAndGetNMToken(String applicationSubmitter,
            ApplicationAttemptId appAttemptId, Container container) {
            ......
                Token token =
                    createNMToken(container.getId().getApplicationAttemptId(),
                      container.getNodeId(), applicationSubmitter);
           ......
      }
      

      "appAttemptId" instead of "container.getId().getApplicationAttemptId()" should be passed to "createNMToken".

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zhiguohong Hong Zhiguo Assign to me
            zhiguohong Hong Zhiguo
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment