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

Bug 2015418

Summary: Project Filesystem query returns No datapoints found
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: MonitoringAssignee: Philip Gough <pgough>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: high    
Version: 4.10CC: amuller, anpicker, aos-bugs, erooth, juzhao, rawagner, spasquie, yapei
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2018455 (view as bug list) Environment:
Last Closed: 2022-03-10 16:20:14 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:
Bug Depends On:    
Bug Blocks: 2018455    

Description Yadan Pei 2021-10-19 07:21:41 UTC
Description of problem:
console shows empty Filesystem usage in project Utilization charts 

Version-Release number of selected component (if applicable):
4.9.0-0.nightly-2021-10-18-141510

How reproducible:
Always

Steps to Reproduce:
1. cluster admin user goes to /k8s/cluster/projects/openshift-apiserver page and check project Utilization charts
2.
3.

Actual results:
1. Filesystem data is Not available, it shows 'No datapoints found'
The query console using is: query=sum(pod:container_fs_usage_bytes:sum{container="",pod!="",namespace='openshift-apiserver'}) BY (namespace)

Expected results:
1. Filesystem data should be returned

Additional info:
Cluster Filesystem usage can be returned correctly and it is using 

      sum(
        (
          max by (device, instance) (node_filesystem_size_bytes{device=~"/.*"})
          -
          max by (device, instance) (node_filesystem_free_bytes{device=~"/.*"})
        )
        *
        on(instance) group_left(role) (
          label_replace(max by (node) (kube_node_role{role=~".+"}), "instance", "$1", "node", "(.*)")
        )
      )

Comment 1 Yadan Pei 2021-10-19 08:00:05 UTC
pod Filesystem query also returns 'No datapoints found', it is using query: pod:container_fs_usage_bytes:sum{pod='console-5ff588fc68-2gkhn',namespace='openshift-console'}

Comment 3 Rastislav Wagner 2021-10-29 08:33:00 UTC
@monitoring team
can you please advise what queries Console UI should now use ?

Current queries are: 

namespace filesystem usage
sum(pod:container_fs_usage_bytes:sum{container="",pod!="",namespace='openshift-apiserver'}) BY (namespace)

top pod filesystem consumers in namespace
topk(25, sort_desc(sum(pod:container_fs_usage_bytes:sum{container="",pod!="",namespace='openshift-apiserver'}) BY (pod, namespace)))

top project consumers
topk(25, sort_desc(
        sum by (namespace) (
          (
            sum(avg_over_time(pod:container_fs_usage_bytes:sum{container="", pod!=""}[5m])) BY (namespace, pod)
            *
            on(pod,namespace) group_left(node) (node_namespace_pod:kube_pod_info:)
          )
          *
          on(node) group_left(role) (max by (node) (kube_node_role{role=~"<%= nodeType %>"}))
        )
      ))

pod filesystem usage
pod:container_fs_usage_bytes:sum{pod='apiserver-56c4b75c74-4tkz9',namespace='openshift-apiserver'}

other resource filesystem usage
sum(pod:container_fs_usage_bytes:sum * on(pod) group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{workload='foo', workload_type='bar'}) by (pod)

Comment 4 Philip Gough 2021-10-29 14:00:23 UTC
Hi @rawagner - we are going to reinstate the `container_fs_usage_bytes` metric. Already merged to 4.10 and I have the back port underway for 4.9.z

Comment 7 Junqi Zhao 2021-11-01 01:35:26 UTC
checked with 4.10.0-0.nightly-2021-10-31-133814, could see the project and pod filesystem usuage on UI, see the pricture

Comment 13 errata-xmlrpc 2022-03-10 16:20:14 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 (Moderate: OpenShift Container Platform 4.10.3 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.

https://access.redhat.com/errata/RHSA-2022:0056

Comment 14 Red Hat Bugzilla 2023-09-15 01:16:21 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days