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

control_plane_ee_image still uses "latest" tag in release #1484

Closed
3 tasks done
bartowl opened this issue Jul 7, 2023 · 7 comments · Fixed by #1740
Closed
3 tasks done

control_plane_ee_image still uses "latest" tag in release #1484

bartowl opened this issue Jul 7, 2023 · 7 comments · Fixed by #1740
Labels
community good first issue Good for newcomers help wanted Extra attention is needed needs_triage type:enhancement New feature or request

Comments

@bartowl
Copy link
Contributor

bartowl commented Jul 7, 2023

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

While image_version is based on DEFAULT_AWX_VERSION environment variable that gets injected during staging process, I have found out, that control_plane_ee_image via _control_plane_ee_image is still hardcoded to awx-ee:latest.
This can cause unexpected behaviour, when used with default EE (which is also awx-ee:latest), as the default EE seems to be pulled with each job run when there is an update to that tag.
After such unaware change of awx-ee:latest image, when the awx-task pod terminates for whatever reason, it will start with never code as intended.

As now finally awx-ee images are tagged with tags matching awx, I would recommend to use the same tag on ee as well.

For me, as a workaround, i use following:

spec:
...
  init_container_image: "{{ _image }}-ee"
  init_container_image_version: "{{ _image_version }}"
  control_plane_ee_image: "{{ _image }}-ee:{{ _image_version }}"
...

but this should not be needed if implemented properly.

AWX Operator version

2.3.0

AWX version

22.4.0

Kubernetes platform

other (please specify in additional information)

Kubernetes/Platform version

k3d 5.4.3, kubernetes version v1.23.6+k3s1

Modifications

no

Steps to reproduce

  • install default k3d
  • wait for awx-ee:latest tag to move
  • run any job, that will fetch updated awx-ee:latest
  • delete awx-task pod
  • new awx-task will have changed controlplane image

Expected results

After installation of AWX via awx-operator, no image should change automatically until deployment of new awx-operator version

Actual results

awx-ee and control_plane images might get changed when latest tag moves

Additional information

No response

Operator Logs

No response

@fosterseth fosterseth added type:enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jul 12, 2023
@fosterseth
Copy link
Member

@bartowl I agree, I think the default behavior should be for the control_plane_ee_image to use the _image_version instead of just "latest"

would you mind putting up a PR to address this?

@bartowl
Copy link
Contributor Author

bartowl commented Jul 20, 2023

Hi. Sorry for such delay, but I started preparing a PR and stumbled upon a potential problem.
You see - during build process, you discover the latest AWX release. This of course matches the tag on AWX Image.
But - can we be sure, that together with awx, also the awx-ee image will be available with the same tag?
I mean tagging of awx-ee is rather fresh thing, as through last years there was no tags and everything was only available as latest...
I do not want to cause a problem, when let's say new AWX is released, but that same tag is missing on awx-ee image... I do not know AWX project that well. If this is no issue, then I would not only adjust the tags for control_plane image, but also define the default EE as not (latest) but matching AWX release.

@kurokobo
Copy link
Contributor

F.Y.I., tagging awx-ee is automated as a part of release process of AWX itself. So for the recent releases, awx-ee that have same tag as awx is always on quay.io

As @fosterseth mentioned above, there is a variable _image_version that contains versioned tag (refer to this line, the DEFAULT_AWX_VERSION is passed from stage job above during building AWX Operator), so for your PR simply replacing latest in the default value for _control_plane_ee_image with that variable is good starting point, I guess.

@fosterseth
Copy link
Member

@bartowl what @kurokobo pointed out is correct ^ for every awx version tag there should be a corresponding awx-ee version tag

@bartowl
Copy link
Contributor Author

bartowl commented Jul 27, 2023

Great, then i'll prepare a PR shortly, maybe i make it even today...

@Denney-tech
Copy link

It would be nice if it was more like the other *_image specs as well:

control_plane_ee_image: quay.io/ansible/awx-ee
control_plane_ee_image_version: 23.8.1

@bartowl
Copy link
Contributor Author

bartowl commented Mar 7, 2024

just as a side note for air-gapped environments - it is not enough to replace all documented images (image, redis_image, ee_images[] etc), as there is also the undocumented (yet) init_container_image and init_container_image_version. Its default is based on _control_plane_ee_image and not control_plane_ee_image so just keep that in mind, otherwise your containers will not be able to start. Maybe it would be worth to mention in the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community good first issue Good for newcomers help wanted Extra attention is needed needs_triage type:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants