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

Image-builder and ansible incompatibility #8117

Open
thecloudgarage opened this issue May 8, 2024 · 4 comments
Open

Image-builder and ansible incompatibility #8117

thecloudgarage opened this issue May 8, 2024 · 4 comments

Comments

@thecloudgarage
Copy link

Trying to run the image-builder utility to create the ubuntu OVA.

I have installed ansible using

python3 -m pip install --user ansible

which defaults to ansible version 9.5.1 and ansible-core-2.16.6

Upon running the image-builder utility, it errors out saying

The version of ansible-core (ansible [core 2.16.6]) does not match the version (2.15.9) which has been tested by the EKS-A team. (Recommened) Remove this version and rerun your image build and the correct version of ansible-core will be installed.

So I uninstalled ansible-core using pip uninstall ansible-core and re-ran the image-builder utility

Now ansible errors out stating ansible version 9.5.1 requires ansible-core-2.16.6 and ansible-core-2.15.9 is incompatible.

Can you please ensure a clarity of the exact version of ansible to be installed such that it satisfies the EKS-A validated procedure for latest version Image-builder

@sp1999
Copy link
Member

sp1999 commented May 14, 2024

Hey @thecloudgarage, can you please provide the following information?

  • OS version of the machine on which image-builder is run
  • EKS-A version used to download the image builder CLI
  • Image builder version
  • Python3 version
  • Ubuntu version for which the OVA is built (20.04 or 22.04)
  • Release channel when running the image builder CLI

@thecloudgarage
Copy link
Author

  • OS version of the machine on which image-builder is run: ubuntu 20.04
  • EKS-A version used to download the image builder CLI: v0.19.5
  • Image builder version: v0.4.0
  • Python3 version: 3.10.12
  • Ubuntu version for which the OVA is built (20.04 or 22.04): 20.04
  • Release channel when running the image builder CLI: 1-29

I managed to get it done using a workaround by exporting the variable EKSA_SKIP_VALIDATE_DEPENDENCIES=true. Thereafter the image-builder rendered a successful image.

However, this issue and incompatibility is not adequately documented and neither is this workaround. EKS-A has been validated with ansible-core which is 2.15 and is only compatible with ansible 8.x which is now in an Unmaintained (end of life) after Ansible 8.7.0.

@Cajga
Copy link
Contributor

Cajga commented May 16, 2024

@thecloudgarage ,

We run into the same problem. A "better workaround" is to install the proper version. In our case it was the following on our Ubuntu 22 based build host:

sudo apt install python3-pip && python3 -m pip install --user ansible==8.7.0 ansible-core==2.15.9
export PATH=$HOME/.local/bin:$PATH

Since then there have been some version updates of EKS-A so, you may need to adjust the versions in the command...

@abhay-krishna
Copy link
Member

abhay-krishna commented May 20, 2024

Hello @thecloudgarage, we align with the version of Ansible that upstream image-builder checks for in the preflight script. This is true for all other tools such as Packer, goss, etc. These are the versions we build and test in CI, and hence we have a validation that image-builder CLI users also use the same build toolchain. Hence, as @Cajga says, we highly recommend to use these versions to build your images.

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

No branches or pull requests

4 participants