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

[MetalLB] Remove unused resources #10004

Merged

Conversation

eugene-marchanka
Copy link
Contributor

@eugene-marchanka eugene-marchanka commented Apr 19, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Fix cluster deployment when MetalLB settings are specified

Which issue(s) this PR fixes:

Fixes #10003

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Cleanup MetalLB install following update

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 19, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 19, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @eugene-marchanka. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 19, 2023
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 20, 2023
@oomichi
Copy link
Contributor

oomichi commented Apr 20, 2023

Nice cleanup, the places of metallb_ip_range have been removed since the commit 709ae1d

/ok-to-test
/approve

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 20, 2023
@eugene-marchanka
Copy link
Contributor Author

I'm still getting weird errors when deploying.
Potentially there are more bugs in it

@oomichi
Copy link
Contributor

oomichi commented Apr 20, 2023

The scope of this pull request is changed after my review.
If you need to fix different issue of metallb, could you please try #9995 ?

/approve cancel

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 20, 2023
@eugene-marchanka
Copy link
Contributor Author

The scope of this pull request is changed after my review. If you need to fix different issue of metallb, could you please try #9995 ?

/approve cancel

reverted

Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

@eugene-marchanka Ok all good after revert, @oomichi wilm probably lgtm when dropping by 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eugene-marchanka, floryut

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2023
@luna-xenia
Copy link

I'm getting the following error trying to use this branch:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'dict object' has no attribute 'controller'
failed: [msh-k8s-c1-1] (item=metallb.yml) => {"ansible_loop_var": "item", "changed": false, "item": "metallb.yml", "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'controller'"}
changed: [msh-k8s-c1-1] => (item=pools.yaml)
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'dict object' has no attribute 'layer2'
failed: [msh-k8s-c1-1] (item=layer2.yaml) => {"ansible_loop_var": "item", "changed": false, "item": "layer2.yaml", "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'layer2'"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'dict object' has no attribute 'defaults'
failed: [msh-k8s-c1-1] (item=layer3.yaml) => {"ansible_loop_var": "item", "changed": false, "item": "layer3.yaml", "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'defaults'"}

My addons.yml has the following content for MetalLB:

metallb_protocol: "bgp"
metallb_config:
  address_pools:
    primary:
      ip_range:
        - 10.5.0.0/16
      auto_assign: true
  layer3:
    metallb_peers:
      peer1:
        peer_address: 10.0.50.1
        peer_asn: 65000
        my_asn: 65001
        address_pool:
          - primary

Could be my issue though if I'm doing something wrong here

@luna-xenia
Copy link

With metallb_speaker_enabled: true and defaults set at their default value I get the following error, not sure if this is part of this PR or not but thought it was worth mentioning:

TASK [kubernetes-apps/metallb : Kubernetes Apps | Check BGP peers for MetalLB] ************************************************************************************************************************************
fatal: [msh-k8s-c1-1]: FAILED! => {"changed": false, "msg": "metallb_peers is mandatory when metallb_protocol is bgp and metallb_speaker_enabled"}

@eugene-marchanka
Copy link
Contributor Author

With metallb_speaker_enabled: true and defaults set at their default value I get the following error, not sure if this is part of this PR or not but thought it was worth mentioning:

TASK [kubernetes-apps/metallb : Kubernetes Apps | Check BGP peers for MetalLB] ************************************************************************************************************************************
fatal: [msh-k8s-c1-1]: FAILED! => {"changed": false, "msg": "metallb_peers is mandatory when metallb_protocol is bgp and metallb_speaker_enabled"}

I'm very sorry but unfortunately issues you are describing are out of this PR scope.
Check this: #9995

@luna-xenia
Copy link

Thank you that is what I assumed

@eugene-marchanka eugene-marchanka changed the title Fix/metallb fix [MetalLB] Remove unused resources Apr 27, 2023
Copy link
Contributor

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

Thanks for making this simple.

/lgtm

@@ -45,7 +39,7 @@
src: "{{ item }}.j2"
dest: "{{ kube_config_dir }}/{{ item }}"
mode: 0644
with_items: ["metallb.yml", "metallb-config.yml", "pools.yaml", "layer2.yaml", "layer3.yaml"]
with_items: ["metallb.yml", "pools.yaml", "layer2.yaml", "layer3.yaml"]
Copy link
Contributor

Choose a reason for hiding this comment

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

A nice catch for non-existent metallb-config.yml.j2 under ./roles/kubernetes-apps/metallb/templates/

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2023
@k8s-ci-robot k8s-ci-robot merged commit c880b24 into kubernetes-sigs:master May 9, 2023
@Jeroen0494
Copy link
Contributor

This was already being addressed here: #9995
I rebased.

@eugene-marchanka eugene-marchanka deleted the fix/metallb-fix branch May 9, 2023 14:32
@yankay yankay mentioned this pull request May 15, 2023
pedro-peter pushed a commit to pedro-peter/kubespray that referenced this pull request May 8, 2024
* Fix MetalLB deploy

This will fix MetalLB deploy

* Remove `metallb_ip_range` check

* Remove missing `metallb-config.yml`

* fix template name

* make deployment of layer3 conditional

* revert

* revert
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MetalLB] playbook failed with msg: metallb_ip_range is mandatory to be specified for MetalLB
6 participants