diff --git a/hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml b/hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml index 3de29df026d4..f5c614c03853 100644 --- a/hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml +++ b/hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml @@ -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: @@ -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 kms: image: ${HADOOP_IMAGE}:${HADOOP_VERSION} hostname: kms @@ -48,6 +57,9 @@ services: volumes: - ../../libexec/transformation.py:/opt/transformation.py command: [ "hadoop", "kms" ] + depends_on: + kdc: + condition: service_healthy datanode: <<: *new-config hostname: dn diff --git a/hadoop-ozone/dist/src/main/compose/xcompat/old-cluster.yaml b/hadoop-ozone/dist/src/main/compose/xcompat/old-cluster.yaml index e3df1b3dda0b..7b28eea7d9cb 100644 --- a/hadoop-ozone/dist/src/main/compose/xcompat/old-cluster.yaml +++ b/hadoop-ozone/dist/src/main/compose/xcompat/old-cluster.yaml @@ -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: @@ -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 @@ -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