Bug 1882279 - Network Out/In data in charts for pod with multiple network interface are not correct
Summary: Network Out/In data in charts for pod with multiple network interface are no...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Rastislav Wagner
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-24 08:47 UTC by Yanping Zhang
Modified: 2020-10-27 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:44:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
networkin-chart (88.38 KB, image/png)
2020-09-24 08:47 UTC, Yanping Zhang
no flags Details
networkout-chart (91.21 KB, image/png)
2020-09-24 08:50 UTC, Yanping Zhang
no flags Details
tooltip-contains-2-old-names (187.35 KB, image/png)
2020-10-09 08:34 UTC, Yanping Zhang
no flags Details
tooltip-contains-1-old-names (187.41 KB, image/png)
2020-10-09 08:34 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:45:15 UTC

Description Yanping Zhang 2020-09-24 08:47:05 UTC
Created attachment 1716253 [details]
networkin-chart

Description of problem:
Create a pod with multiple network interface, check network in/out charts on the pod detail page, the data are not precise.

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-09-23-022756

How reproducible:
Always

Steps to Reproduce:
1.Create a pod with multiple network interface in project.
$ cat ipvlan-host-local.yaml
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ipvlan-host-local
spec:
  config: '{
        "cniVersion": "0.3.1",
      "name": "ipvlan-host-local",
      "master": "ens5",     // this needs to be updated per cluster, ssh node -- ip route
      "type": "ipvlan",
      "ipam": {
             "type": "host-local",
             "subnet": "22.2.2.0/24"
}
}'


$ cat pod_multi_interface.yaml 
apiVersion: v1
kind: Pod
metadata:
  name: pod-ipvlan-host-local
  annotations:
    k8s.v1.cni.cncf.io/networks: ipvlan-host-local
spec:
  containers:
  - name: pod-name
    image: quay.io/openshifttest/multus-pod@sha256:48da37205f9b43424e0983d4c5e7e07f77b7ba1504bbe35e2f264c75dcb4cd15

After created pod, check the annotation ofpod:
annotations:
    k8s.v1.cni.cncf.io/network-status: |-
      [{
          "name": "testtest", <= add a name make sure not empty

2.Check pod network out/in charts
3.

Actual results:
2. The sum of data for each interface are not exactly equal to the total number.
Refer to attachments.

Expected results:
2. The data should be correct.

Additional info:

Comment 1 Yanping Zhang 2020-09-24 08:50:40 UTC
Created attachment 1716254 [details]
networkout-chart

Comment 2 Rastislav Wagner 2020-10-01 05:45:43 UTC
Should be fixed by https://github.com/openshift/console/pull/6775

Comment 4 Yanping Zhang 2020-10-09 08:32:50 UTC
Checked on ocp 4.6 cluster with payload 4.6.0-0.nightly-2020-10-08-182439.

1. Create a cni NetworkAttachmentDefinition for a project:
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ipvlan-host-local
spec:
  config: '{
        "cniVersion": "0.3.1",
      "name": "ipvlan-host-local",
      "master": "ens5",
      "type": "ipvlan",
      "ipam": {
             "type": "host-local",
             "subnet": "22.2.2.0/24"
}
}'

2. Create a pod:
apiVersion: v1
kind: Pod
metadata:
  name: pod-ipvlan-host-local
  annotations:
    k8s.v1.cni.cncf.io/networks: ipvlan-host-local
spec:
  containers:
  - name: pod-name
    image: quay.io/openshifttest/multus-pod@sha256:48da37205f9b43424e0983d4c5e7e07f77b7ba1504bbe35e2f264c75dcb4cd15

3. Check the annotation for the pod which contains empty value here: 
$oc get pod pod-ipvlan-host-local -o json|jq .metadata.annotations

annotations:
    k8s.v1.cni.cncf.io/network-status: |-
      [{
          "name": ""

Check the network in/out chart, they show correct charts for current interface. 
After update "name" value in above pod annotations, eg, update to "name": "test", "name":"prozyp/ipvlan-host-local-test".
The interfaces in tooltips still contains the interfaces with old names. Wait for more than half an hour, one of the old interface name disappeared. These old interface names should not show in tooltip for later timepoint. Pls refer to attachments. Assigned back the bug.

Comment 5 Yanping Zhang 2020-10-09 08:34:04 UTC
Created attachment 1720179 [details]
tooltip-contains-2-old-names

Comment 6 Yanping Zhang 2020-10-09 08:34:44 UTC
Created attachment 1720180 [details]
tooltip-contains-1-old-names

Comment 7 Rastislav Wagner 2020-10-09 10:47:44 UTC
Data for the charts are fetched from Prometheus, we dont look at pod specs. Please compare the chart with prometheus data.
If Prometheus data are not updated correctly, its probably a Networking issue, not UI.

Comment 9 Yanping Zhang 2020-10-10 07:54:41 UTC
According to Comment 7, prometheus data shows the old name, so move the bug to Verified. And will check prometheus data issue with other component team members later.

Comment 11 errata-xmlrpc 2020-10-27 16:44: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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196


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