Bug 2074243 - DefaultPlacement API allow empty enum value and remove default
Summary: DefaultPlacement API allow empty enum value and remove default
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.11
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: aos-network-edge-staff
QA Contact: Hongan Li
Depends On:
TreeView+ depends on / blocked
Reported: 2022-04-11 21:03 UTC by Omer Tuchfeld
Modified: 2022-08-10 11:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2022-08-10 11:05:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift api pull 1172 0 None open Bug 2074243: `DefaultPlacement` allow empty enum value and remove default 2022-04-11 21:05:16 UTC
Github openshift cluster-config-operator pull 243 0 None open Bug 2074243: Bump `openshift/api` to `c3bb724c28` 2022-04-11 21:24:44 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:06:44 UTC

Description Omer Tuchfeld 2022-04-11 21:03:18 UTC
Description of problem:
The DefaultPlacement config status field should allow the "" value
to be used during an Update for this subresource. This should allow the
status subresource to be updated even when DefaultPlacement has an
empty value.

OpenShift release version:

Cluster Platform:

How reproducible:

Steps to Reproduce (in detail):
1. n/a

Actual results:
Updating the ingress config status subresource is impossible while the `DefaultPlacement` field is empty

Expected results:
It should be possible

Impact of the problem:
Clusters which don't have this field set (because they were installed before the installer learnt how to set that field) cannot update the ingress config subresource

Additional info:
Also remove the kubebuilder:default:="Workers" specifier because the
controller already regards an empty value as "Workers", there's no
need for it to be explicitly set when omitted.

** Please do not disregard the report template; filling the template out as much as possible will allow us to help you. Please consider attaching a must-gather archive (via `oc adm must-gather`). Please review must-gather contents for sensitive information before attaching any must-gathers to a bugzilla report.  You may also mark the bug private if you wish.

Comment 1 Miciah Dashiel Butler Masters 2022-04-11 21:07:29 UTC
No docs update because the issue was introduced and will be fixed in the same release.

Comment 4 Hongan Li 2022-04-22 06:57:21 UTC
verified with 4.11.0-0.nightly-2022-04-21-192140 and `DefaultPlacement` field can be updated to empty by api access. 

# fresh installed cluster
$ oc get ingress.config cluster -ojson | jq '.status'
  "defaultPlacement": "Workers"

# update the status by api access
curl -k -X PUT "$APISERVER/apis/config.openshift.io/v1/ingresses/cluster/status/" \
    -d $WITH_STATUS \
    --header "Authorization: Bearer $TOKEN" \
    --header "Content-Type: application/json"

$ oc get ingress.config cluster -ojson | jq '.status'
  "defaultPlacement": ""

Comment 7 errata-xmlrpc 2022-08-10 11:05:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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