Skip to content

🌱 E2E: Install independent Metal3 IPAM after upgrade #2382

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

Merged

Conversation

lentzi90
Copy link
Member

@lentzi90 lentzi90 commented Mar 7, 2025

What this PR does / why we need it:

The Metal3 IPAM was previously bundled with CAPM3. Now we deploy it
separately as a CAPI IPAM provider. In clusterctl upgrade tests going
from a version where IPAM is bundled, to a version where it is not, we
must install it after the upgrade.
This commit adds a post upgrade hook to the clusterctl upgrade tests
that installs the Metal3 IPAM.

NOTE: This also includes #2380 we can merge that first or we can close it. I just wanted to make sure I don't hit that issue when testing the upgrade.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 7, 2025
@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from f25f534 to ef7f5cc Compare March 7, 2025 13:30
@lentzi90
Copy link
Member Author

lentzi90 commented Mar 7, 2025

/test metal3-e2e-clusterctl-upgrade-test-main

@peppi-lotta
Copy link
Member

peppi-lotta commented Mar 10, 2025

You are using metal3 as provider name but currently it's actually metal3ipam and this is why the test is not passing probably.

I created a PR to change it to Metal3 because that is a better and more correct name.
PR is here: metal3-io/metal3-dev-env#1509

@adilGhaffarDev
Copy link
Member

/test metal3-e2e-clusterctl-upgrade-test-main

@adilGhaffarDev
Copy link
Member

let's change the provider name here too:

Metal3ipamProviderName = "metal3ipam"

@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from ef7f5cc to 03dd3e7 Compare March 10, 2025 10:59
@lentzi90
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main

2 similar comments
@tuminoid
Copy link
Member

/test metal3-e2e-clusterctl-upgrade-test-main

@tuminoid
Copy link
Member

/test metal3-e2e-clusterctl-upgrade-test-main

@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from 03dd3e7 to 3612a78 Compare March 12, 2025 13:52
@metal3-io-bot metal3-io-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 12, 2025
@lentzi90
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main

@tuminoid
Copy link
Member

It is still complaining about target provider components for IPAM, even with the new name. I don't see open PRs anymore in any repo related to this, besides this one. What are we missing?

@lentzi90
Copy link
Member Author

There is something wrong with the clusterctl-config. It doesn't have the Metal3 IPAM provider listed. 🤔

@tuminoid
Copy link
Member

There is something wrong with the clusterctl-config. It doesn't have the Metal3 IPAM provider listed. 🤔

We added it here and adjusted that here ... hmm.

@adilGhaffarDev
Copy link
Member

There is something wrong with the clusterctl-config. It doesn't have the Metal3 IPAM provider listed. 🤔

We can move the following code to ci-e2e.sh

https://github.com/metal3-io/metal3-dev-env/blob/d831cba0825498a685d3b116183ee79dad00e358/03_launch_mgmt_cluster.sh#L499C1-L505C4

and try again. But I am not sure why dev-env is not setting it.
It should be fine to move it there for the main branch.

@lentzi90
Copy link
Member Author

Dev-env is setting it but possibly not in the place that is used by this test. There could also be something with the overrides structure that need to be adjusted.

@lentzi90
Copy link
Member Author

This is from earlier in the test. Does it look correct? I'm getting very confused with all the overrides and provider=... 😵

 + clusterctl init --core cluster-api:v1.9.5 --bootstrap kubeadm:v1.9.5 --control-plane kubeadm:v1.9.5 --infrastructure=metal3:v1.10.99 -v5 --ipam=metal3:v1.10.99
 Using configuration file="/home/metal3ci/.config/cluster-api/clusterctl.yaml"
 Installing the clusterctl inventory CRD
 Creating CustomResourceDefinition="providers.clusterctl.cluster.x-k8s.io"
 Fetching providers
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/cluster-api/v1.9.5/core-components.yaml" provider="cluster-api" version="v1.9.5"
 Fetching file="core-components.yaml" provider="cluster-api" type="CoreProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/bootstrap-kubeadm/v1.9.5/bootstrap-components.yaml" provider="bootstrap-kubeadm" version="v1.9.5"
 Fetching file="bootstrap-components.yaml" provider="kubeadm" type="BootstrapProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/control-plane-kubeadm/v1.9.5/control-plane-components.yaml" provider="control-plane-kubeadm" version="v1.9.5"
 Fetching file="control-plane-components.yaml" provider="kubeadm" type="ControlPlaneProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/infrastructure-metal3/v1.10.99/infrastructure-components.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Using override="infrastructure-components.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/ipam-metal3/v1.10.99/ipam-components.yaml" provider="ipam-metal3" version="v1.10.99"
 Using override="ipam-components.yaml" provider="ipam-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/cluster-api/v1.9.5/metadata.yaml" provider="cluster-api" version="v1.9.5"
 Fetching file="metadata.yaml" provider="cluster-api" type="CoreProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/bootstrap-kubeadm/v1.9.5/metadata.yaml" provider="bootstrap-kubeadm" version="v1.9.5"
 Fetching file="metadata.yaml" provider="kubeadm" type="BootstrapProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/control-plane-kubeadm/v1.9.5/metadata.yaml" provider="control-plane-kubeadm" version="v1.9.5"
 Fetching file="metadata.yaml" provider="kubeadm" type="ControlPlaneProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/infrastructure-metal3/v1.10.99/metadata.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Using override="metadata.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/ipam-metal3/v1.10.99/metadata.yaml" provider="ipam-metal3" version="v1.10.99"
 Using override="metadata.yaml" provider="ipam-metal3" version="v1.10.99"

@adilGhaffarDev
Copy link
Member

This is from earlier in the test. Does it look correct? I'm getting very confused with all the overrides and provider=... 😵

 + clusterctl init --core cluster-api:v1.9.5 --bootstrap kubeadm:v1.9.5 --control-plane kubeadm:v1.9.5 --infrastructure=metal3:v1.10.99 -v5 --ipam=metal3:v1.10.99
 Using configuration file="/home/metal3ci/.config/cluster-api/clusterctl.yaml"
 Installing the clusterctl inventory CRD
 Creating CustomResourceDefinition="providers.clusterctl.cluster.x-k8s.io"
 Fetching providers
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/cluster-api/v1.9.5/core-components.yaml" provider="cluster-api" version="v1.9.5"
 Fetching file="core-components.yaml" provider="cluster-api" type="CoreProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/bootstrap-kubeadm/v1.9.5/bootstrap-components.yaml" provider="bootstrap-kubeadm" version="v1.9.5"
 Fetching file="bootstrap-components.yaml" provider="kubeadm" type="BootstrapProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/control-plane-kubeadm/v1.9.5/control-plane-components.yaml" provider="control-plane-kubeadm" version="v1.9.5"
 Fetching file="control-plane-components.yaml" provider="kubeadm" type="ControlPlaneProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/infrastructure-metal3/v1.10.99/infrastructure-components.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Using override="infrastructure-components.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/ipam-metal3/v1.10.99/ipam-components.yaml" provider="ipam-metal3" version="v1.10.99"
 Using override="ipam-components.yaml" provider="ipam-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/cluster-api/v1.9.5/metadata.yaml" provider="cluster-api" version="v1.9.5"
 Fetching file="metadata.yaml" provider="cluster-api" type="CoreProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/bootstrap-kubeadm/v1.9.5/metadata.yaml" provider="bootstrap-kubeadm" version="v1.9.5"
 Fetching file="metadata.yaml" provider="kubeadm" type="BootstrapProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/control-plane-kubeadm/v1.9.5/metadata.yaml" provider="control-plane-kubeadm" version="v1.9.5"
 Fetching file="metadata.yaml" provider="kubeadm" type="ControlPlaneProvider" version="v1.9.5"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/infrastructure-metal3/v1.10.99/metadata.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Using override="metadata.yaml" provider="infrastructure-metal3" version="v1.10.99"
 Potential override file searchFile="/home/metal3ci/.config/cluster-api/overrides/ipam-metal3/v1.10.99/metadata.yaml" provider="ipam-metal3" version="v1.10.99"
 Using override="metadata.yaml" provider="ipam-metal3" version="v1.10.99"

this seems fine to me, here --ipam=metal3 is working fine. This is coming from dev-env, which is launching a management cluster. What seems wrong here?

@lentzi90
Copy link
Member Author

It is probably correct. I'm just getting confused by at all.
I found another thing to check now... do we need to add it in the e2e config? We have config for all the other things there (core, control-plane, bootstrap and infra).

@adilGhaffarDev
Copy link
Member

I found another thing to check now... do we need to add it in the e2e config? We have config for all the other things there (core, control-plane, bootstrap and infra).

yes we need to add there, I forgot about that. For e2e it gets it from there.

@lentzi90 lentzi90 closed this Mar 13, 2025
@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from 3612a78 to 5dd8f6e Compare March 13, 2025 08:55
@metal3-io-bot metal3-io-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 13, 2025
@adilGhaffarDev
Copy link
Member

I was planning to use the release artifacts instead of taking it from main. Should we do that first? I'm happy either way. We can merge first and then I do it in a follow up or the other way

I think we can fix it in this PR. its a small change

@kashifest
Copy link
Member

I was planning to use the release artifacts instead of taking it from main. Should we do that first? I'm happy either way. We can merge first and then I do it in a follow up or the other way

It should be there now

@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from 2cc9596 to a8a4cff Compare March 27, 2025 10:16
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2025
@lentzi90
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2025
@adilGhaffarDev
Copy link
Member

let's also unhold
/unhold

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2025
@lentzi90
Copy link
Member Author

Wait, let's see that the clusterctl upgrade works also after the last changes
/hold

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2025
@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from a8a4cff to 53a8957 Compare March 27, 2025 10:48
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2025
@lentzi90
Copy link
Member Author

I forgot to set type: "url".

@lentzi90
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@lentzi90
Copy link
Member Author

Ugh, we still need to get the metadata.yaml...

@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from 53a8957 to c70e361 Compare March 27, 2025 11:53
@lentzi90
Copy link
Member Author

Let's see if this works...
/test metal3-e2e-clusterctl-upgrade-test-main
/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

The Metal3 IPAM was previously bundled with CAPM3. Now we deploy it
separately as a CAPI IPAM provider. In clusterctl upgrade tests going
from a version where IPAM is bundled, to a version where it is not, we
must install it after the upgrade.
This commit adds a post upgrade hook to the clusterctl upgrade tests
that installs the Metal3 IPAM.

Signed-off-by: Lennart Jern <[email protected]>
@lentzi90 lentzi90 force-pushed the lentzi90/clusterctl-upgrade-ipam branch from c70e361 to 4c02c7e Compare March 27, 2025 12:56
@lentzi90
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main

@lentzi90
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@lentzi90
Copy link
Member Author

Looks like a flake pulling ironic. Both tests passed and then it failed in AfterEach.

/test metal3-e2e-clusterctl-upgrade-test-main

@lentzi90
Copy link
Member Author

/hold cancel
All good now!

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 27, 2025
@kashifest
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2025
@metal3-io-bot metal3-io-bot merged commit 40a76be into metal3-io:main Mar 27, 2025
15 checks passed
@metal3-io-bot metal3-io-bot deleted the lentzi90/clusterctl-upgrade-ipam branch March 27, 2025 19:27
@metal3-io-bot metal3-io-bot added this to the CAPM3 - v1.10 milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants