Bug 1897526
Summary: | [Kuryr] Available port count not correctly calculated for alerts | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | OpenShift BugZilla Robot <openshift-bugzilla-robot> |
Component: | Networking | Assignee: | Maysa Macedo <mdemaced> |
Networking sub component: | kuryr | QA Contact: | Jon Uriarte <juriarte> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | bbennett, juriarte, ltomasbo, mdulko |
Version: | 4.6 | ||
Target Milestone: | --- | ||
Target Release: | 4.6.z | ||
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: | 2021-04-27 14:20:49 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1890630 | ||
Bug Blocks: |
Description
OpenShift BugZilla Robot
2020-11-13 11:02:08 UTC
Verified in OCP 4.6.0-0.nightly-2021-04-17-182039 on top of OSP 13.0.16 (2021-04-09.1). Verification steps: For checking the alerts in prometheus, make sure you have the next entry in the /etc/hosts: <APPS_FIP> prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com How to check the alerts from CLI: $ token=`oc sa get-token prometheus-k8s -n openshift-monitoring` List all the alerts: $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname) | .labels.alertname' Get a specific alert (i.e. LimitedPortsOnNetwork): $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname == "LimitedPortsOnNetwork")' ## Create new project (will create a /23 subnet -> room for 510 ports) $ oc new-project test ## Create 499 ports in the ns/test network (so there are 500 in use in total) $ openstack subnet list | grep test | 29ea4014-b75d-435c-8be3-0e1d3a6b5e12 | ns/test-subnet | 2359dce9-28bf-4f19-8639-1fe2cbd8fcd9 | 10.128.116.0/23 | $ openstack port list | grep 10.128.116 | 44276942-d449-47b5-856f-4bbbdfeb2f47 | | fa:16:3e:33:fa:43 | ip_address='10.128.116.1', subnet_id='29ea4014-b75d-435c-8be3-0e1d3a6b5e12' | ACTIVE | $ for i in `seq 2 500`; do openstack port create --network 2359dce9-28bf-4f19-8639-1fe2cbd8fcd9 port--$i; sleep 3; done ## Check LimitedPortsOnNetwork alarm is not raised, as there are still 10 available ports $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname) | .labels.alertname' | grep -v -e AlertmanagerReceiversNotConfigured -e CannotRetrieveUpdates -e Watchdog $ ## Create one port more, so there are 9 available ports $ openstack port create --network 2359dce9-28bf-4f19-8639-1fe2cbd8fcd9 port--501 ## Check LimitedPortsOnNetwork alarm is raised, as there are less than 10 available ports (there are 9) $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname) | .labels.alertname' | grep -v -e AlertmanagerReceiversNotConfigured -e CannotRetrieveUpdates -e Watchdog "LimitedPortsOnNetwork" ## Create 8 more ports, so there will be 1 available por only $ for i in `seq 502 509`; do openstack port create --network 2359dce9-28bf-4f19-8639-1fe2cbd8fcd9 port--$i; sleep 3; done ## Check InsuficientPortsOnNetwork alarm is not raised, as there is still 1 available port $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname) | .labels.alertname' | grep -v -e AlertmanagerReceiversNotConfigured -e CannotRetrieveUpdates -e Watchdog "LimitedPortsOnNetwork" ## Create one port more, so there are 0 available ports $ openstack port create --network 2359dce9-28bf-4f19-8639-1fe2cbd8fcd9 port--510 ## Check InsuficientPortsOnNetwork alarm is raised, as there are no available port $ curl -sk -H "Authorization: Bearer $token" 'https://prometheus-k8s-openshift-monitoring.apps.ostest.shiftstack.com/api/v1/alerts' | jq '.data.alerts[] | select(.labels.alertname) | .labels.alertname' | grep -v -e AlertmanagerReceiversNotConfigured -e CannotRetrieveUpdates -e Watchdog "InsuficientPortsOnNetwork" Removing the ports will clear the alarms as expected. 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 (OpenShift Container Platform 4.6.26 bug fix 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. https://access.redhat.com/errata/RHBA-2021:1232 |