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

Docker provider e2e test #2188

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

stevenhorsman
Copy link
Member

This is based on Wainer's PR #1965, with some work done to make it fit into the new e2e world

Add a callable workflow that run the e2e tests for the docker provider. This
workflow is similar to e2e_libvirt.yaml.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
Signed-off-by: stevenhorsman <[email protected]>
This will make the e2e tests for docker to run. Initially it's disabled
on pull requests, so only running with the nightly and manual triggers.

Notice that's set continue-on-error so that the e2e_run_all workflow
exit status won't change, i.e. any failure on e2e_docker is disregarded.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
@wainersm
Copy link
Member

wainersm commented Dec 5, 2024

Thanks @stevenhorsman !

I ran on my fork but it failed to install caa: https://github.com/wainersm/cc-cloud-api-adaptor/actions/runs/12180636082/job/33975999946

I will add a step to gather logs at the end of the job on fail, as we do for libvirt.

Created the ./hack/ci-e2e-debug-fail.sh script out of the debug
step of e2e_libvirt. Added such as step to e2e_docker and calls
the new script.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
Use the common debug script: ./hack/ci-e2e-debug-fail.sh

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
@wainersm
Copy link
Member

wainersm commented Dec 5, 2024

@stevenhorsman pushed two new commits to enable debug on docker workflow.

On https://github.com/wainersm/cc-cloud-api-adaptor/actions/runs/12185682757/job/33993001651, it fail to start caa:

  Usage: cloud-api-adaptor <provider-name> [options] | help | version
  
  Supported cloud providers are:
  	gcp
  	azure
  	aws
  	ibmcloud
  	vsphere

The caa image being used has no support for docker... is the support built in by default?

@stevenhorsman
Copy link
Member Author

So we need to use the dev image to get libvirt support due to libvirt using cgo bindings.

@stevenhorsman
Copy link
Member Author

I think there is also an issue with CAA_IMAGE envs (and properties) just being ignored, so I might switch docker to use the same mechanism as libvirt and do the kustomize rather than install directory.

As discussed in confidential-containers#2171 the CAA_IMAGE envs are not working in the e2e code
and combined with the installation directory, it seems seems to add confusion
when we need different CAA images for decoupling of different architectures,
so switch docker to use the same approach as libvirt for consistency.
@stevenhorsman
Copy link
Member Author

@wainersm I've made and pushed the change that should fix the CAA issue and testing it now. I think it can be fixup'd into a previous commit, but as it might be controversial I wanted to give you the chance to see it first

@wainersm
Copy link
Member

wainersm commented Dec 6, 2024

Hi @stevenhorsman !

@wainersm I've made and pushed the change that should fix the CAA issue and testing it now. I think it can be fixup'd into a previous commit, but as it might be controversial I wanted to give you the chance to see it first

I accepted the pre_install stuff makes no sense anymore. Yep, let's remove it completely when we finish the removal of packer workflows. Ah, I think we should leave your last commit as is, the commit message has a nice explanation for the history of this git repository.

Did the test finish? Worked out?

@stevenhorsman
Copy link
Member Author

stevenhorsman commented Dec 6, 2024

Did the test finish? Worked out?

The test failed: https://github.com/stevenhorsman/cloud-api-adaptor/actions/runs/12196066119/job/34023415633 We only seem to get the last ~10 lines of the CAA log which isn't super helpful in this case. I think it might have to be a manual debug, though I tried that a few weeks ago when I first wrote some of this code and didn't get very far. I'm not sure if we still get this problem: https://github.com/confidential-containers/cloud-api-adaptor/tree/main/src/cloud-api-adaptor/docker#troubleshooting that used to always happy on the docker provider?

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
@wainersm
Copy link
Member

wainersm commented Dec 6, 2024

Did the test finish? Worked out?

The test failed: https://github.com/stevenhorsman/cloud-api-adaptor/actions/runs/12196066119/job/34023415633 We only seem to get the last ~10 lines of the CAA log which isn't super helpful in this case. I think it might have to be a manual debug, though I tried that a few weeks ago when I first wrote some of this code and didn't get very far. I'm not sure if we still get this problem: https://github.com/confidential-containers/cloud-api-adaptor/tree/main/src/cloud-api-adaptor/docker#troubleshooting that used to always happy on the docker provider?

Yeah, I will reserve some time to debug locally. In any case I sent an fixup to print all caa log messages.

For the records, I never made the docker provider to work locally (nor on my tentative to introduce the CI workflow) :(

@stevenhorsman
Copy link
Member Author

For the records, I never made the docker provider to work locally (nor on my tentative to introduce the CI workflow) :(

Yeah, I haven't had it working for a long time. I think Pradipta might have though.

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

Successfully merging this pull request may close these issues.

2 participants