Skip to content
Open
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
12 changes: 12 additions & 0 deletions hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ x-new-config:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
- ./krb5.conf:/etc/krb5.conf
depends_on:
kdc:
condition: service_healthy

services:
kdc:
Expand All @@ -35,6 +38,12 @@ services:
- ../..:/opt/hadoop
- ../_keytabs:/etc/security/keytabs
command: ["/opt/hadoop/compose/common/init-kdc.sh"]
healthcheck:
test: ["CMD-SHELL", "test -s /etc/security/keytabs/scm.keytab && nc -z 127.0.0.1 88"]
interval: 2s
timeout: 3s
retries: 45
start_period: 5s
Comment on lines +41 to +46
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Checking existence of scm.keytab is not necessary, since KDC is started (in init-kdc.sh) only after exporting all keytabs.
  • I think it would be better to add the healthcheck in the image itself to reduce duplication. Base command may need to be set (krb5kdc -n), too. With that, we only need depends_on in compose files (and update docker.ozone-testkr5b.image)

kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
hostname: kms
Expand All @@ -48,6 +57,9 @@ services:
volumes:
- ../../libexec/transformation.py:/opt/transformation.py
command: [ "hadoop", "kms" ]
depends_on:
kdc:
condition: service_healthy
Comment on lines +60 to +62
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unnecessary, since /etc/security/keytabs is not mounted, so KMS cannot use keytabs created by KDC.

datanode:
<<: *new-config
hostname: dn
Expand Down
12 changes: 12 additions & 0 deletions hadoop-ozone/dist/src/main/compose/xcompat/old-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ x-old-config:
- ../..:/opt/ozone
- ../_keytabs:/etc/security/keytabs
- ./krb5.conf:/etc/krb5.conf
depends_on:
kdc:
condition: service_healthy

services:
kdc:
Expand All @@ -35,6 +38,12 @@ services:
- ../..:/opt/ozone
- ../_keytabs:/etc/security/keytabs
command: ["/opt/ozone/compose/common/init-kdc.sh"]
healthcheck:
test: ["CMD-SHELL", "test -s /etc/security/keytabs/scm.keytab && nc -z 127.0.0.1 88"]
interval: 2s
timeout: 3s
retries: 45
start_period: 5s
kms:
image: ${HADOOP_IMAGE}:${HADOOP_VERSION}
hostname: kms
Expand All @@ -48,6 +57,9 @@ services:
volumes:
- ../../libexec/transformation.py:/opt/transformation.py
command: [ "hadoop", "kms" ]
depends_on:
kdc:
condition: service_healthy
datanode:
<<: *old-config
hostname: dn
Expand Down