adoroszlai commented on a change in pull request #1826: URL: https://github.com/apache/ozone/pull/1826#discussion_r592244203
########## File path: hadoop-ozone/dist/src/main/compose/upgrade/delete-and-regenerate-data.sh ########## @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# 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. + +# This script can be run only if the cluster is already started +# one, and initialized (but not data is written, yet). + +set -e +COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +cd "${COMPOSE_DIR}" + +# shellcheck source=/dev/null +source "${COMPOSE_DIR}/../testlib.sh" + +#read OZONE_VOLUME from here +# shellcheck source=/dev/null +source "$COMPOSE_DIR"/.env + +rm -rf "${OZONE_VOLUME}"/{dn1,dn2,dn3,om,recon,s3g,scm} +mkdir -p "${OZONE_VOLUME}"/{dn1,dn2,dn3,om,recon,s3g,scm} + + +#During the first start, all the required VERSION and metadata files will be created +start_docker_env + +#data generation requires offline cluster +docker-compose stop + +#generate metadadata (-n1 means: only one container is generated) +docker-compose run scm ozone freon cgscm -n 1 +docker-compose run om ozone freon cgom -n 1 Review comment: Runner image user is the same `hadoop` for me. But `freon cgom` creates the volume with `ozone` as owner by default, so there is a mismatch. I thought this caused `ozone sh volume list` to not list `vol1` after running this script. But it turns out that even if owner is set to `hadoop` (via `-u`), the volume is still not included in the list: ``` $ ozone sh volume list | jq -r ".name" s3v ``` So now I guess `GeneratorOm` is missing this step in volume creation: https://github.com/apache/ozone/blob/9670e35e735e848b4cf8c9e0726c1c4aef769ad7/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/VolumeManagerImpl.java#L146-L147 ---------------------------------------------------------------- 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]
