Bug 2078119 - Ipaddresspools field does not work in BGP Advertisement and L2 Advertisement
Summary: Ipaddresspools field does not work in BGP Advertisement and L2 Advertisement
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-23 19:31 UTC by elevin
Modified: 2022-04-29 16:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-29 16:56:55 UTC
Target Upstream Version:
Embargoed:
pepalani: needinfo-
pepalani: needinfo-


Attachments (Terms of Use)

Description elevin 2022-04-23 19:31:22 UTC
Description of problem:
The BGPadvertisement and L2advertisement do not look at the Ipaddresspools field and advertise all IPAddresspools regardless of name

apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
  name: addresspool
  namespace: metallb-system
  annotations:
   metallb.universe.tf/address-pool: addresspool
spec:
  addresses:   
    - 4.4.4.0/24
  autoAssign: false
  avoidBuggyIPs: true


apiVersion: metallb.io/v1beta1
kind: BGPAdvertisement
metadata:
  name: bgpadvertisement
  namespace: metallb-system
spec:
    ipaddresspools:
      - dsfdsfsd
    communities:
      - 65535:65282
    aggregationLength: 32
    localPref: 100

apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
  name: l2advertisement
  namespace: metallb-system
spec:
    ipaddresspools:
      - fdsfdsfsdfsd  


  Type    Reason        Age                  From                Message
  ----    ------        ----                 ----                -------
  Normal  IPAllocated   14m                  metallb-controller  Assigned IP ["4.4.4.1"]
  Normal  nodeAssigned  11m                  metallb-speaker     announcing from node "helix09.lab.eng.tlv2.redhat.com" with protocol "layer2"
  Normal  nodeAssigned  108s (x13 over 10m)  metallb-speaker     announcing from node "helix09.lab.eng.tlv2.redhat.com" with protocol "bgp"
  Normal  nodeAssigned  108s (x13 over 10m)  metallb-speaker     announcing from node "helix10.lab.eng.tlv2.redhat.com" with protocol "bgp"


Version-Release number of selected component (if applicable):
OCP 4.10
Metallb 4.11 (upstream)

How reproducible:
100%

Steps to Reproduce:
1. Create IPaddresspool with name "addresspool"
2. Create BGPadvertisement or/and L2advertisement
3. Create Loadbalancer Service with the IPaddresspool


Actual results:
IPaddresspool IPs were advertised

Expected results:
IPaddresspool IPs were not advertised due to different names

Additional info:

Comment 3 Maciej Szulik 2022-04-29 16:56:55 UTC
We explicitly disabled client-side validation in oc, since we don't have properly defined OpenAPI schema for all of OpenShift resources which would be confusing our users.
We've decided to always rely on the server-side validation as the only source of truth. Additionally, a similar approach is being currently investigated and
client-side validation in the long run will be also turned off in kubectl in favor of more reliable and complete server-side validation.


Note You need to log in before you can comment on or make changes to this bug.