adoroszlai commented on code in PR #10194:
URL: https://github.com/apache/ozone/pull/10194#discussion_r3193779260


##########
hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml:
##########
@@ -48,6 +57,9 @@ services:
     volumes:
       - ../../libexec/transformation.py:/opt/transformation.py
     command: [ "hadoop", "kms" ]
+    depends_on:
+      kdc:
+        condition: service_healthy

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



##########
hadoop-ozone/dist/src/main/compose/xcompat/new-cluster.yaml:
##########
@@ -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

Review Comment:
   - 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](https://docs.docker.com/reference/dockerfile/#healthcheck) in the 
[image](https://github.com/apache/ozone-docker-testkrb5/blob/master/Dockerfile) 
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`](https://github.com/apache/ozone/blob/c3ffd0562e86d7188b128b2f7503fc69dee3bdf9/hadoop-ozone/dist/pom.xml#L33))



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to