From 8bab8b775240818b60935531dd2b27144ed8edc1 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Mon, 4 Jun 2012 19:37:56 +0000 Subject: [PATCH] HDFS-3501. Checkpointing with security enabled will stop working after ticket lifetime expires. Contributed by Aaron T. Myers git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1346106 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/GetImageServlet.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 61b50f875b0..5b41cd1ea47 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -301,6 +301,9 @@ Release 2.0.1-alpha - UNRELEASED HDFS-3442. Incorrect count for Missing Replicas in FSCK report. (Andrew Wang via atm) + HDFS-3501. Checkpointing with security enabled will stop working + after ticket lifetime expires. (atm via eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java index 6461dca729f..958cb14b9db 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java @@ -160,6 +160,11 @@ public class GetImageServlet extends HttpServlet { return null; } + // We may have lost our ticket since last checkpoint, log in again, just in case + if (UserGroupInformation.isSecurityEnabled()) { + UserGroupInformation.getCurrentUser().reloginFromKeytab(); + } + // issue a HTTP get request to download the new fsimage MD5Hash downloadImageDigest = TransferFsImage.downloadImageToStorage(