Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2078119

Summary: Ipaddresspools field does not work in BGP Advertisement and L2 Advertisement
Product: OpenShift Container Platform Reporter: elevin
Component: ocAssignee: Maciej Szulik <maszulik>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aos-bugs, fpaoline, grajaiya, mfojtik, pepalani
Version: 4.11Flags: pepalani: needinfo-
pepalani: needinfo-
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-29 16:56:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.