stackabletech / stackabletech/hdfs-operator

KERBEROS_REALM is unset when creating a shell on HDFS pods

Open
#763 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Rust
Stars
53
Forks
9
Avg merge
1d 13h
Merged PRs (30d)
10

Description

Affected Stackable version

25.11

Affected Apache HDFS version

3.4.2

Current and expected behavior

When I shell into a pod to run an HDFS admin command and run hdfs haadmin -getAllServiceState to see the namenode HA status I receive an error message:

stackable@simple-hdfs-namenode-default-0 /stackable/hadoop-3.4.2-stackable25.11.0 $ hdfs haadmin -getAllServiceState
2026-03-10 14:28:00,336 WARN  ipc.Client (Client.java:run(749)) - Exception encountered while connecting to the server simple-hdfs-namenode-default-0.simple-hdfs-namenode-default.default.svc.cluster.local/10.1.17.125:8020
javax.security.sasl.SaslException: Bad Kerberos server principal configuration [Caused by java.lang.IllegalArgumentException: Server has invalid Kerberos principal: nn/simple-hdfs.default.svc.cluster.local@KNAB.COM, expecting: nn/simple-hdfs.default.svc.cluster.local@${env.KERBEROS_REALM}]

core-site.xml contains references to the environment variable KERBEROS_REALM in place of the actual Kerberos realm name and this variable is not set in the shell.

Possible solution

Set the KERBEROS_REALM environment variable so that command line tools use the correct realm name.

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect how the operator generates core-site.xml and the environment for HDFS pods, starting with the KERBEROS_REALM reference and the shell context for hdfs haadmin. Done when running hdfs haadmin -getAllServiceState from a pod uses the actual Kerberos realm and no longer reports an invalid principal.

Written by the indexing model from the issue text.

Assessment

Tech stack
hadoop, kubernetes
Domain
devops, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.