Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11810. Secure acceptance test on arm64 fails with LoginException: Checksum failed #7498

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hadoop-ozone/dist/dev-support/bin/dist-layout-stitching
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ run cp -p -r "${ROOT}/hadoop-ozone/dist/src/main/smoketest" .
run cp -p -r "${ROOT}/hadoop-ozone/dist/target/k8s" kubernetes
run cp -p -r "${ROOT}/hadoop-ozone/dist/target/Dockerfile" .

#Copy pre-generated keytabs
run cp -p -R "${ROOT}/hadoop-ozone/dist/src/main/keytabs" compose/_keytabs
run mkdir compose/_keytabs

for file in $(find "${ROOT}" -path '*/target/classes/*.classpath' | sort); do
# We need to add the artifact manually as it's not part the generated classpath desciptor
Expand Down
86 changes: 86 additions & 0 deletions hadoop-ozone/dist/src/main/compose/common/init-kdc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eux -o pipefail

# This script exports keytabs and starts KDC server.

export_keytab() {
kadmin.local -q "ktadd -norandkey -k /etc/security/keytabs/$2.keytab $1@EXAMPLE.COM"
}

rm -f /etc/security/keytabs/*.keytab

export_keytab scm/scm scm
export_keytab HTTP/scm scm
export_keytab testuser/scm scm
export_keytab testuser2/scm scm

export_keytab testuser/dn testuser
export_keytab testuser/httpfs testuser
export_keytab testuser/om testuser
export_keytab testuser/recon testuser
export_keytab testuser/s3g testuser
export_keytab testuser/scm testuser

export_keytab testuser2/dn testuser2
export_keytab testuser2/httpfs testuser2
export_keytab testuser2/om testuser2
export_keytab testuser2/recon testuser2
export_keytab testuser2/s3g testuser2
export_keytab testuser2/scm testuser2

export_keytab om/om om
export_keytab HTTP/om om
export_keytab testuser/om om
export_keytab testuser2/om om

export_keytab s3g/s3g s3g
export_keytab HTTP/s3g s3g
export_keytab testuser/s3g s3g
export_keytab testuser2/s3g s3g

export_keytab httpfs/httpfs httpfs
export_keytab HTTP/httpfs httpfs
export_keytab testuser/httpfs httpfs
export_keytab testuser2/httpfs httpfs

export_keytab recon/recon recon
export_keytab HTTP/recon recon
export_keytab testuser/recon recon
export_keytab testuser2/recon recon

export_keytab dn/dn dn
export_keytab HTTP/dn dn
export_keytab testuser/dn dn
export_keytab testuser2/dn dn

export_keytab HTTP/scm HTTP
export_keytab HTTP/s3g HTTP
export_keytab HTTP/httpfs HTTP
export_keytab HTTP/ozone HTTP

export_keytab hadoop/rm hadoop

export_keytab rm/rm rm
export_keytab nm/nm nm
export_keytab jhs/jhs jhs

chmod 755 /etc/security/keytabs/*.keytab
chown 1000. /etc/security/keytabs/*.keytab

krb5kdc -n
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
volumes:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
command: ["krb5kdc","-n"]
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
networks:
ozone_net:
ipv4_address: 172.25.0.100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
volumes:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
command: ["krb5kdc","-n"]
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
dns_search: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
volumes:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
command: ["krb5kdc","-n"]
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
hostname: kms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ x-volumes:

services:
kdc:
command: ["krb5kdc","-n"]
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
hostname: kdc
image: ${OZONE_TESTKRB5_IMAGE}
networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
volumes:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
command: [ "krb5kdc","-n" ]
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
hostname: kms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
volumes:
- ../..:/opt/ozone
- ../_keytabs:/etc/security/keytabs
command: [ "krb5kdc","-n" ]
command: ["/opt/ozone/compose/common/init-kdc.sh"]
kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
hostname: kms
Expand Down
Binary file removed hadoop-ozone/dist/src/main/keytabs/HTTP.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/dn.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/hadoop.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/httpfs.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/jhs.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/nm.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/om.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/recon.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/rm.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/s3g.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/scm.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/testuser.keytab
Binary file not shown.
Binary file removed hadoop-ozone/dist/src/main/keytabs/testuser2.keytab
Binary file not shown.
98 changes: 0 additions & 98 deletions hadoop-ozone/dist/src/main/keytabs/update-keytabs.sh

This file was deleted.