errose28 commented on a change in pull request #1798: URL: https://github.com/apache/ozone/pull/1798#discussion_r560346680
########## File path: hadoop-ozone/dist/src/main/compose/ozone-om-prepare/.env ########## @@ -0,0 +1,22 @@ +# 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. + +HDDS_VERSION=1.1.0-SNAPSHOT +OZONE_RUNNER_VERSION=20200625-1 +OZONE_IMAGE=apache/ozone-runner:20200625-1 +OZONE_DIR=/opt/hadoop +OZONE_VOLUME=. +OM_HA_ARGS=-- Review comment: I should probably add a comment here to explain this. The command line args are passed to the OM in the docker compose file. When docker compose expands an environment variable and the variable is unset or empty, it will expand it to an empty string `''` and pass that literally to OM, which is an invalid argument. To get around this, I used `--` as the default value instead of empty, which tells the CLI parser that optional flags are done and everything following is an argument. For example, `ls -- -l` gives: `ls: cannot access '-l': No such file or directory`. In this case, since there are no arguments on either side, it is used to indicate that the OM has no arguments, without using an empty string. If you have a better way to implement this, let me know. This is just what I came up with to make it work. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
