bug(services/hdfs-native): delegation tokens with NameNode addresses and viewfs:// name_node fail
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The fault is in services/hdfs-native, where the name_node value is turned into a nameservice or an address list before the token is chosen. Start with that parsing and with how the token service string is matched, then compare against hdfs_native::Client using the MiniDFS setup in the report. Done means the three name_node forms list / with a delegation token and viewfs:// uses the mount table.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
OpenDAL version or commit
main (d86cd9245) with #9016 (910c76a1b) merged on top
Affected service or component
services/hdfs-native
Describe the bug
#9016 routes default and logical nameservices through the Hadoop configuration. Two name_node forms still fail where hdfs_native::Client succeeds:
- NameNode addresses with a delegation token. For
hdfs://host:portandhdfs://nn1:port,nn2:port, the service names the nameservicenameservice. The client then uses only a token whose service isha-hdfs:nameservice. A token that the cluster issues has the servicehost:portorha-hdfs:<nameservice>, so the client skips it and SASL fails. - A
viewfs://name_node. The value contains:and/, so the service parses it as a list of NameNode addresses. The client retries the addressviewfs:, then fails.
Steps to Reproduce
I used MiniDFS from the hdfs-native repository. HADOOP_CONF_DIR points at the core-site.xml that it writes.
- Start MiniDFS with
security token(and withsecurity token ha). SetHADOOP_TOKEN_FILE_LOCATIONto itsdelegation_token. There is no Kerberos ticket. - Start MiniDFS with
viewfs.
async fn list(name_node: &str, path: &str) -> opendal_core::Result<()> {
let op = Operator::new(HdfsNative::default().name_node(name_node))?;
op.list(path).await.map(|_| ())
}
// 1
list("hdfs://127.0.0.1:9000", "/").await?;
list("hdfs://localhost:34991,localhost:35931,localhost:44035", "/").await?; // `ha`
// 2
list("viewfs://minidfs-viewfs", "/mount1/").await?;
Actual Behavior
name_node |
OpenDAL | hdfs_native::Client |
|---|---|---|
hdfs://127.0.0.1:9000, token |
GSSAPI error: GssMajorCodes { raw: "0x00070000", ... } |
lists / (URL hdfs://127.0.0.1:9000) |
| HA addresses, token | GSSAPI error: GssMajorCodes { raw: "0x00070000", ... } |
lists / (URL hdfs://minidfs-ns) |
default, token |
lists / |
|
viewfs://minidfs-viewfs |
invalid port value after about 175 s |
writes and lists /mount1 (URL viewfs://minidfs-viewfs) |
Expected Behavior
- With NameNode addresses, the service uses the token that the cluster issued for them.
- A
viewfs://name_node uses the ViewFS mount table, asname_node = "default"does whenfs.defaultFSisviewfs://....
Additional Context
- For a single address, passing
hdfs://host:porttoClientBuilder::with_urlmakes the client use the token servicehost:port, which matches the token that the cluster issues. For several addresses, a logical nameservice is the only form that matches a cluster token. That works with #9016. - For a
viewfs://name_node, passing the URL toClientBuilder::with_urlwithout change makes the client use the mount table.
Are you willing to submit a PR to fix this bug?
- I reproduced this issue against the affected component. For a service-specific report, I used the actual service rather than only a mock, emulator, or source-code analysis.
- Yes, I would like to submit a PR.
- Lingua principale
- Rust
- Stelle
- 5.5k
- Fork
- 869
- Merge medio
- 8h 2m
- PR unite (30g)
- 862
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryForse già presa @xgbtxy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
apache/opendal#9635 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
core enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/opendal#9572 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapForse già presa @rohan4naik l’ha presa oggi. Apertabindings/nodejs bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
apache/opendal#9569 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()Forse già presa @Xuanwo l’ha presa oggi. Apertabug core
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/opendal#9567 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
apache/opendal#9560 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/opendal
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Choochmeque/tauri-plugin-webdriver#134 ·
I maintainer di solito rispondono entro 17 giorni
-
bug(c-sdk): boxlite_box_exec does not check runtime liveness before dispatching streaming execApertabug rust SDK & CLI & REST API
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
boxlite-ai/boxlite#3292 ·
I maintainer di solito rispondono entro 1 giorno
-
Android bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anefzaoui/misterdownloadmanager#2516 ·
I maintainer di solito rispondono entro 1 giorno
-
editor ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
agent8-cash/ethpayserver#731 ·
I maintainer di solito rispondono entro 1 giorno