Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-12167. Cannot use sample compose definition with SHA-based image #40

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Sample docker-compose.yaml sets OZONE_IMAGE_FLAVOR to -rocky, if unset or empty. This makes it cumbersome to use the definition with images identified by commit SHA. Straightforward way results in error:

export OZONE_IMAGE=ghcr.io/adoroszlai/ozone
export OZONE_IMAGE_VERSION=8ed8e020dc69b2c6ed53a5a31cafc2af161876e2
export OZONE_IMAGE_FLAVOR=""
docker compose up -d --scale datanode=3
...
Error response from daemon: manifest unknown

Possible workaround: splitting the SHA value between OZONE_IMAGE_VERSION and OZONE_IMAGE_FLAVOR as:

export OZONE_IMAGE_VERSION=8ed8e020dc69b2c6ed53a5a31cafc2af161876
export OZONE_IMAGE_FLAVOR=e2

Since we plan to publish images also without -rocky suffix anyway, and all existing images are available both with and without (although those without it may be outdated, except 1.4.1), I think it's safe to make flavor optional (use empty value by default).

https://issues.apache.org/jira/browse/HDDS-12167

How was this patch tested?

$ OZONE_IMAGE=ghcr.io/adoroszlai/ozone
$ OZONE_IMAGE_VERSION=8ed8e020dc69b2c6ed53a5a31cafc2af161876e2

$ docker compose up -d --scale datanode=3
[+] Running 7/8
 ⠏ Network docker-ozone_default       Created
 ✔ Container docker-ozone-scm-1       Started
 ✔ Container docker-ozone-recon-1     Started
 ✔ Container docker-ozone-s3g-1       Started
 ✔ Container docker-ozone-datanode-2  Started
 ✔ Container docker-ozone-om-1        Started
 ✔ Container docker-ozone-datanode-1  Started
 ✔ Container docker-ozone-datanode-3  Started

@adoroszlai adoroszlai self-assigned this Jan 30, 2025
@adoroszlai adoroszlai requested a review from smengcl January 31, 2025 04:22
Copy link

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai . lgtm

@adoroszlai adoroszlai merged commit e441af8 into apache:latest Feb 2, 2025
1 check passed
@adoroszlai adoroszlai deleted the HDDS-12167 branch February 2, 2025 08:46
@adoroszlai
Copy link
Contributor Author

Thanks @smengcl for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants