metal3-io / metal3-dev-env

Metal³ Development Environment
Apache License 2.0
109 stars 117 forks source link

[WIP] PoC Hostnetworkless Ironic with VirtualMedia Using MetalLB LoadBalancer #1435

Open mboukhalfa opened 1 week ago

mboukhalfa commented 1 week ago

⚠️ Do not merge this is only to demonstrate a PoC

This is a small PoC part of the short focus discussion https://github.com/metal3-io/baremetal-operator/discussions/1739. It demonstrate running Ironic without hostNetwork, limited to the virtualMedia use case, using a LoadBalancer service.

Changes Needed

  1. Edit Ironic Deployment:

    • Remove hostNetwork: true.
    • Remove dnsmasq container.
    • Remove keepalived container.
    • Remove security restrictions to allow root access for debugging inside the containers.
  2. Add MetalLB Service: Enable MetalLB on Minikube : minikube addons enable metallb and install it on the target cluster : kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.5/config/manifests/metallb-native.yaml and create an ip pool:

    apiVersion: metallb.io/v1beta1
    kind: IPAddressPool
    metadata:
      name: ironic-pool
      namespace: metallb-system
    spec:
      addresses:
      - 172.22.0.2-172.22.0.2
    ---
    apiVersion: metallb.io/v1beta1
    kind: L2Advertisement
    metadata:
      name: ironic
      namespace: metallb-system
    spec:
      ipAddressPools:
          - ironic-pool
  3. Add LoadBalancer Service:

    apiVersion: v1
    kind: Service
    metadata:
      name: ironic
      annotations:
        metallb.universe.tf/loadBalancerIPs: 172.22.0.2
    spec:
      ports:
        - name: ironic
          port: 6385
          targetPort: 6385
        - name: inspector
          port: 5050
          targetPort: 5050
        - name: httpd
          port: 6180
          targetPort: 6180
      selector:
        name: ironic
      type: LoadBalancer
  4. Edit Ironic ConfigMap:

    • Remove PROVISIONING_IP so that the runironic script uses the pod's IP from the eth0 interface.
    • Add external Ironic IPs to be published to external components like IPA.
  5. Provisioning Networks:

    • No need to configure the ironicendpoint with 172.22.0.2

/hold

metal3-io-bot commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from mboukhalfa. For more information see the Kubernetes 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: - **[OWNERS](https://github.com/metal3-io/metal3-dev-env/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mboukhalfa commented 1 week ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 1 week ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 1 week ago

Quite strange error:

22:07:56  TASK [run_tests : Set fact for NIC names for the first BMH found] **************
22:07:56  An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'status'
22:07:56  task path: /home/metal3ci/tested_repo/tests/roles/run_tests/tasks/generate_templates.yml:9
22:07:56  fatal: [localhost]: FAILED! => {"changed": false}

Retriggering the PR is not changing the templates !

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 1 week ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 1 week ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 1 week ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 6 days ago

/test metal3-dev-env-integration-test-centos-main

mboukhalfa commented 3 days ago

Seems the issue seenRETRYING: Wait until no metal3cluster is remaining 132/150 relate to changes here since the issue has not been seen on the other periodic tests or the PR tests

mboukhalfa commented 3 days ago

/test ?

metal3-io-bot commented 3 days ago

@mboukhalfa: The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/metal3-io/metal3-dev-env/pull/1435#issuecomment-2202095151): >/test ? Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
mboukhalfa commented 3 days ago

/test metal3-centos-e2e-basic-test-main

metal3-io-bot commented 3 days ago

@mboukhalfa: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
metal3-dev-env-integration-test-centos-main 7674368fbe6d41f4ede17aa369a282adf6441511 link false /test metal3-dev-env-integration-test-centos-main
metal3-centos-e2e-basic-test-main 7674368fbe6d41f4ede17aa369a282adf6441511 link false /test metal3-centos-e2e-basic-test-main
Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
metal3-io-bot commented 3 days ago

@mboukhalfa: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
metal3-dev-env-integration-test-centos-main 7674368fbe6d41f4ede17aa369a282adf6441511 link false /test metal3-dev-env-integration-test-centos-main
metal3-centos-e2e-basic-test-main 7674368fbe6d41f4ede17aa369a282adf6441511 link false /test metal3-centos-e2e-basic-test-main

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).