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

Add baremeral support for reboot from iso images. #2606

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkopilov
Copy link
Contributor

@bkopilov bkopilov commented Jan 12, 2025

Allow to test infra run test on baremetal managed by redfish (Dell) The redfish API allows to boot from iso and reboot the node. The management allows us to run test-infra code on physical boxes

Added :

  • RedfishController code to manage the nodes and allow boot from iso, reboot. Each node managed by kfish plugin, it may support other vendors too.

  • AdpaterController code used to add additional support based on cluster inverntoy Example get info about disk or get ip address for sshing to baremetal nodes

  • We have to enable NFS share from CI in order to run /tmp/test_images The redfish support booting from NFS , all nodes use the same ISO.

Example of test

 @pytest.mark.parametrize("redfish_machines", [["10.6.49.60", "10.6.49.61", "10.6.49.63",
                                                 "10.6.49.64 ", "10.6.49.65"]])
    @pytest.mark.parametrize("redfish_user", ["root"])
    @pytest.mark.parametrize("redfish_enabled", [True])
    @pytest.mark.parametrize("redfish_password", ["calvin"])
    @pytest.mark.regression3
    def test_baremetal_redfish_operators(
        self, cluster, record_property, redfish_machines, redfish_user,
		 redfish_password, redfish_enabled,
    ):
        record_property("polarion-testcase-id", "OCP-XXXX")

        cluster.generate_and_download_infra_env()
        # NFS mount - > jumpbox address
        cluster.nodes.controller.set_nfs_mount_path("10.9.76.8",
		 cluster._infra_env._config.iso_download_path)
        # Adapter will add support for list disks ,ip's for ssh node based on cluster inventory
        cluster.nodes.controller.set_adapter_controller(cluster)
        cluster.nodes.prepare_nodes()
        cluster.wait_until_hosts_are_discovered()

@openshift-ci openshift-ci bot requested review from rccrdpccl and tsorya January 12, 2025 07:39
Copy link

openshift-ci bot commented Jan 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bkopilov
Once this PR has been reviewed and has the lgtm label, please assign eifrach for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 12, 2025
Copy link

openshift-ci bot commented Jan 12, 2025

Hi @bkopilov. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 12, 2025
@bkopilov
Copy link
Contributor Author

@adriengentil
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 13, 2025
Allow to test infra run test on baremetal managed by redfish (Dell)
The redfish API allows to boot from iso and reboot the node.
The management allows us to run test-infra code on physical boxes

Added :
 - RedfishController code to manage the nodes and allow boot from iso, reboot.
   Each node managed by kfish plugin, it may support other vendors too.

- AdpaterController code used to add additional support based on cluster inverntoy
  Example get info about disk or get ip address for sshing to baremetal nodes

- We have to enable NFS share from CI in order to run /tmp/test_images
The redfish support booting from NFS , all nodes use the same ISO.

Example of test

 @pytest.mark.parametrize("redfish_machines", [["10.6.49.60", "10.6.49.61", "10.6.49.63",
                                                 "10.6.49.64 ", "10.6.49.65"]])
    @pytest.mark.parametrize("redfish_user", ["root"])
    @pytest.mark.parametrize("redfish_enabled", [True])
    @pytest.mark.parametrize("redfish_password", ["calvin"])
    @pytest.mark.regression3
    def test_baremetal_redfish_operators(
        self, cluster, record_property, redfish_machines, redfish_user,
		 redfish_password, redfish_enabled,
    ):
        record_property("polarion-testcase-id", "OCP-XXXX")

        cluster.generate_and_download_infra_env()
        # NFS mount - > jumpbox address
        cluster.nodes.controller.set_nfs_mount_path("10.9.76.8",
		 cluster._infra_env._config.iso_download_path)
        # Adapter will add support for list disks ,ip's for ssh node based on cluster inventory
        cluster.nodes.controller.set_adapter_controller(cluster)
        cluster.nodes.prepare_nodes()
        cluster.wait_until_hosts_are_discovered()
@eifrach
Copy link
Contributor

eifrach commented Jan 16, 2025

/test e2e-metal-assisted-static-ip-suite-4-18

Copy link

openshift-ci bot commented Jan 16, 2025

@bkopilov: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@bkopilov
Copy link
Contributor Author

Attaching example of running test in kni-test-infra based on this code.

https://gitlab.cee.redhat.com/ocp-edge-qe/kni-assisted-installer-auto/-/merge_requests/1427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants