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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Implement BMH provisioning E2E test #1403

Merged
merged 1 commit into from Oct 30, 2023

Conversation

maxrantil
Copy link
Member

Introduce an end-to-end test validating the provisioning and deprovisioning flow of a BareMetalHost.

Fixes #1367

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 25, 2023
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!
I'm very excited to get this in, since it means we cover all the most important operations.

hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Outdated Show resolved Hide resolved
test/e2e/basic_provisioning_test.go Outdated Show resolved Hide resolved
}, e2eConfig.GetIntervals(specName, "wait-provisioned")...)

By("Triggering the deprovisioning of the BMH")
bmhPatch = client.MergeFrom(bmh.DeepCopy())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest the same patch helper here

test/e2e/config/ironic.yaml Outdated Show resolved Hide resolved
test/e2e/config/fixture.yaml Outdated Show resolved Hide resolved
test/e2e/config/fixture.yaml Outdated Show resolved Hide resolved
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch 2 times, most recently from be75aca to 07e7981 Compare October 25, 2023 12:36
hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/ci-e2e.sh Show resolved Hide resolved
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch 2 times, most recently from b4d0777 to 25044fa Compare October 25, 2023 15:22
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more comments. This is progressing really nicely!
/metal3-bmo-e2e-test

hack/ci-e2e.sh Outdated Show resolved Hide resolved
hack/clean-e2e.sh Outdated Show resolved Hide resolved
@lentzi90
Copy link
Member

/metal3-bmo-e2e-test

@lentzi90
Copy link
Member

Great job! Please squash and I will put LGTM on it 馃檪 (no need to add me as co-author for those small fixes 馃槄 )

@maxrantil
Copy link
Member Author

I did change the image to the latest CirrOS (I think I took 0.5.2 because of how the MD5SUM file looked and thought that was the latest at first glance). Now I experiment with the export of variables to the conf file from the ci-hack script and got some problems. I will squash the commits after I got this fixed.

@maxrantil
Copy link
Member Author

maxrantil commented Oct 26, 2023

this part:

# These variables are used by the tests. They override variables in the config file.
# This IP is defined by the network we created above.
# Together with the VBMC_PORT this becomes the BMC_ADDRESS used by the BMH in the test.
IP_ADDRESS="192.168.222.1"
export BMC_ADDRESS="ipmi://${IP_ADDRESS}:${VBMC_PORT}"
export BOOT_MAC_ADDRESS
# These are the VBMC defaults (used since we did not specify anything else for `vbmc add`).
export BMC_USER=admin
export BMC_PASSWORD=password
IMAGE_FILE="cirros-0.6.2-x86_64-disk.img"
export IMAGE_MD5SUM="c8fc807773e5354afe61636071771906"
export IMAGE_URL="http://${IP_ADDRESS}/${IMAGE_FILE}"

After testing it, they do NOT override the variables in the config file. Any thoughts on that @lentzi90 ? Should I take back the function I had earlier for doing that?

@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from 9d23463 to d7842ee Compare October 26, 2023 08:16
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@lentzi90
Copy link
Member

/metal3-bmo-e2e-test

@lentzi90
Copy link
Member

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

@lentzi90
Copy link
Member

/cc @kashifest @dtantsur

@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from d7842ee to bb41e6e Compare October 26, 2023 09:44
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@lentzi90
Copy link
Member

New changes were fixing a mismatch in variable naming between the hack script and e2e config. (It did not fail any tests since we anyway had the same value in both places.)
/lgtm
/metal3-bmo-e2e-test

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@lentzi90
Copy link
Member

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

@lentzi90
Copy link
Member

/test-centos-e2e-integration-main

1 similar comment
@maxrantil
Copy link
Member Author

/test-centos-e2e-integration-main

Copy link
Member

@mquhuy mquhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome, and I think it's a great improvement.
Just some tiny bit comments, otherwise lgtm.

hack/ci-e2e.sh Outdated Show resolved Hide resolved
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from bb41e6e to 24e3f6e Compare October 27, 2023 10:31
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2023
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch 2 times, most recently from 7b54276 to f5302b9 Compare October 27, 2023 10:43
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from f5302b9 to cbc8963 Compare October 27, 2023 11:31
@lentzi90
Copy link
Member

/metal3-bmo-e2e-test

@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from cbc8963 to b15a370 Compare October 27, 2023 11:52
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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

/metal3-bmo-e2e-test

@lentzi90
Copy link
Member

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

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
Great job on your first PR @maxrantil

One question in line.
/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 Oct 27, 2023
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2023
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from b15a370 to ad250ef Compare October 30, 2023 08:31
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2023
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from ad250ef to afa14f6 Compare October 30, 2023 09:00
@maxrantil
Copy link
Member Author

/metal3-bmo-e2e-test

Introduce an end-to-end test validating the provisioning and
deprovisioning flow of a BareMetalHost.
@maxrantil maxrantil force-pushed the add-provisioning-e2e-test/max branch from afa14f6 to bde3a84 Compare October 30, 2023 09:56
@maxrantil
Copy link
Member Author

/metal3-bmo-e2e-test

@maxrantil
Copy link
Member Author

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

@lentzi90
Copy link
Member

/hold cancel

@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 Oct 30, 2023
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2023
@lentzi90
Copy link
Member

Previous test lost contact to jenkins worker...
/test-ubuntu-integration-main

@metal3-io-bot metal3-io-bot merged commit 3dccd97 into metal3-io:main Oct 30, 2023
12 checks passed
@maxrantil maxrantil deleted the add-provisioning-e2e-test/max branch October 30, 2023 13:03
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.

Add provisioning e2e test
5 participants