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

Update base image to AlmaLinux 10 non-minimal #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

amotl
Copy link
Member

@amotl amotl commented Feb 6, 2025

About

Better safe than sorry, use the non-minimal AlmaLinux image until we validated the minimal variant on all environments thoroughly.

@goat-ssh reported:

gcp: /crate/bin/crate: line 199: hostname: command not found 
....
ERROR: setting [node.attr.zone] must not be empty

NB: Please merge at your disposal.

@amotl amotl requested review from mfussenegger and seut February 6, 2025 07:42
Copy link
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

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

hostname is not used by the bin/crate script, where is that coming from?

In general only the documented commands (crate and crash) are supported.

If hostname or other commands are required for some cases, we'd need test cases and docs for it, otherwise this is bound to regress again in the future.

@amotl
Copy link
Member Author

amotl commented Feb 6, 2025

Yes. I experimented with minimal images when transitioning from CentOS, and decided against them due to too many possible obstacles and reported about it.

Even if the hostname command is present, other things might be missing that possibly lead to other subtle problems. Minimal images should not be used lightheartedly, in the same spirit why we also don't use AlpineLinux.

@amotl amotl requested a review from mfussenegger February 6, 2025 08:25
@goat-ssh
Copy link

goat-ssh commented Feb 6, 2025

Here is the code requiring hostname https://github.com/crate/crate-operator/blob/master/crate/operator/create.py#L437-L456
"-Cnode.name": f"{crate_node_name_prefix}$(hostname | rev | cut -d- -f1 | rev)",

@amotl
Copy link
Member Author

amotl commented Feb 6, 2025

@matriv reported this patch also fixes this issue:

@amotl amotl requested review from matriv and removed request for seut February 6, 2025 08:36
@mfussenegger
Copy link
Member

Here is the code requiring hostname https://github.com/crate/crate-operator/blob/master/crate/operator/create.py#L437-L456 "-Cnode.name": f"{crate_node_name_prefix}$(hostname | rev | cut -d- -f1 | rev)",

This is even worse because it additionally relies on bin/crate doing shell expansion on the argument, which is more an accident than intentionally supported.
We might break that in the future.

Switching to non-minimal is okay as a quickfix, but we can't keep supporting any unknowns. Undocumented = Unsupported

@seut
Copy link
Member

seut commented Feb 6, 2025

@matriv reported this patch also fixes this issue:

* [Impossible to run CrateDB 5.9.9 in Docker crate#17354](https://github.com/crate/crate/issues/17354)

This issue is already fixed by c83963c.

@matriv
Copy link
Contributor

matriv commented Feb 6, 2025

So, for the time being should we merge this and re-release the docker image, to remedy the situation?
Or should we wait to fix the issue in our tooling?

@goat-ssh
Copy link

goat-ssh commented Feb 6, 2025

@mfussenegger can you spot a more viable way of getting this w/o shell expansion ?
Jfyi, we're also relying on curl being present on the image: https://github.com/crate/crate-operator/blob/master/crate/operator/create.py#L505-L523

@amotl
Copy link
Member Author

amotl commented Feb 6, 2025

I experimented with minimal images when transitioning from CentOS, and decided against them due to too many possible obstacles and reported about it.

I am proposing to merge this, in oder to fix any downstream problems, and perform a baseline image update in a more controlled environment, accompanying a solid testing procedure 1.

Footnotes

  1. Possibly also add relevant software tests, seconding @mfussenegger's advise.

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.

5 participants