kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
15.86k stars 6.41k forks source link

Refactor the CI based docker-machine on Equinix Metal #11049

Open yankay opened 5 months ago

yankay commented 5 months ago

Which jobs are failing ?

Any job is based docker-machine on Equinix Metal

The error job: https://github.com/kubernetes-sigs/kubespray/pull/11048/checks?check_run_id=23389220718

Which tests are failing ?

The molecule_* tests

Since when has it been failing ?

2024-04-02

Reason for failure

The CI may be broken because the docker-machine metal uses the API "factory"; it's deprecated. The error logs from the docker-machine:

Apr  3 10:10:00 localhost gitlab-runner[4139064]: #033[31;1mERROR: Error creating machine: Error in driver during machine creation: POST https://api.equinix.com/metal/v1/projects/55a99bbb-8584-4d2b-8d24-2c60b4141118/devices: 422 The 'facility' parameter is not supported for organization 670f523c-7a91-4757-b152-a2160ca4c807. For more details, see https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros #033[0;m  #033[31;1mdriver#033[0;m=metal #033[31;1mname#033[0;m=runner-pu4ihlzh-c3-small-1712138995-42fb3699 #033[31;1moperation#033[0;m=create

When I try to run it mannly

root@docker-machine-runner:/tmp# /usr/local/bin/docker-machine create --driver metal --metal-api-key=yALRNfFrpfH8hkGAMqM48Z8Pq5zmNSfR --metal-project-id=55a99bbb-8584-4d2b-8d24-2c60b4141118 --metal-os=ubuntu_18_04 --metal-plan=c3.medium.x86 --metal-spot-price-max=0.5 --metal-spot-instance=true --metal-facility-code=am2 --metal-ttl=4h --engine-install-url=https://miouge1.github.io/docker-install/install.sh haha
Running pre-create checks...
Creating machine...
(haha) Creating SSH key...
(haha) Provisioning Equinix Metal server...
Error creating machine: Error in driver during machine creation: POST https://api.equinix.com/metal/v1/projects/55a99bbb-8584-4d2b-8d24-2c60b4141118/devices: 422 The 'facility' parameter is not supported for organization 670f523c-7a91-4757-b152-a2160ca4c807. For more details, see https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros

Anything else we need to know

Related to https://github.com/kubernetes-sigs/kubespray/issues/10505

The Docker Machine is too old. There are two solutions:

  1. update the docker-machine metal driver to make the test run correctly.
  2. migrate the test to Kubevirt is more reasonable than fixing it.
yankay commented 5 months ago

Planning to use the https://ansible.readthedocs.io/projects/molecule/examples/kubevirt/

zhan9san commented 3 months ago

I'd like to help on this issue. Is there any other options?

The molecule ecosystem is not better than before. I was one of active maintainer of molecule and molecule-plugins. But it seems Ansible business team make decision without caring about the community, which makes active contributers from community not happy.

https://github.com/ansible-community/molecule-plugins/issues/194

I come from this link, https://github.com/cncf/mentoring/pull/1247/files#diff-feec40218d4ff9fac2214561a58bf68633ef4a8dfc7f30b9f33e63be50070c56R31