[ https://issues.apache.org/jira/browse/HDDS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HDDS-6163: --------------------------------- Labels: pull-request-available (was: ) > Unable to start Ozone kubernetes examples with self built container image > ------------------------------------------------------------------------- > > Key: HDDS-6163 > URL: https://issues.apache.org/jira/browse/HDDS-6163 > Project: Apache Ozone > Issue Type: Bug > Components: build, dist, docker, kubernetes > Affects Versions: 1.2.0 > Environment: * Ubuntu 20.04.3 LTS > * Docker Engine - Community Version 20.10.12 > * Kubernetes Server v1.21.1, Client v1.22.4 > * AMD Ryzen 9 5900HX with Radeon Graphics > > Reporter: Kiyoshi Mizumaru > Priority: Major > Labels: pull-request-available > > The "scm" StatefulSet never starts with a self-built Docker container image. > > We can build our custom Docker image by running Maven like: > > {code:java} > $ mvn -Pdocker -Ddocker.image=pfnmaru/ozone:1.3.0-SNAPSHOT -DskipTests -Pdist > clean package > {code} > But we cannot start any StatefulSets under the "kubernetes/examples" > directory. For example: > > > {code:java} > $ cd hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT/kubernetes/examples/ozone > $ kubectl apply -f config-configmap.yaml > configmap/config created > $ kubectl apply -f scm-statefulset.yaml > statefulset.apps/scm created > $ kubectl get pods > NAME READY STATUS RESTARTS AGE > scm-0 0/1 Init:Error 2 21s > $ kubectl get pods > NAME READY STATUS RESTARTS AGE > scm-0 0/1 Init:CrashLoopBackOff 2 33s > $ kubectl logs scm-0 -c init > /opt/hadoop/libexec/entrypoint.sh: line 162: exec: ozone: not found > {code} > As we can see from the above log, the initial container cannot be succeeded > since the "ozone" executable file doesn't exist within its {{PATH}} > environment variable. > > > {{docker inspect}} command reveals the reason. The {{PATH}} environment > variable in the container image's metadata looks like this: > {code:java} > "Env": [ > > "PATH=/opt/hadoop/libexec:/opt/hadoop/bin:/home/maru/.sdkman/candidates/scala/current/bin:/home/maru/.sdkman/candidates/maven/current/bin:/home/maru/.sdkman/candidates/java/current/bin:/home/maru/.goenv/versions/1.17.5/bin:/home/maru/.goenv/shims:/home/maru/.goenv/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/maru/go/1.17.5/bin", > "JAVA_HOME=/usr/lib/jvm/jre/", > "LD_LIBRARY_PATH=/usr/local/lib", > "HADOOP_LOG_DIR=/var/log/hadoop", > "HADOOP_CONF_DIR=/etc/hadoop" > ],{code} > According to {{apache/ozone:1.2.0}} container image, this should be: > {code:java} > "Env": [ > > "PATH=/opt/hadoop/libexec:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/hadoop/bin", > "JAVA_HOME=/usr/lib/jvm/jre/", > "LD_LIBRARY_PATH=/usr/local/lib", > "OZONE_LOG_DIR=/var/log/hadoop", > "OZONE_CONF_DIR=/etc/hadoop" > ], {code} > Not sure about how the official ozone container images are created/released, > but I guess they are managed by a separate repository (maybe > [https://github.com/apache/ozone-docker/blob/latest/Dockerfile] ?) > > Once I got a HDDS-xxxx number, I would send a PR to fix this issue via GitHub. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org