Bug 2168019

Summary: [CephFS] cephfs-top not working
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: julpark
Component: CephFSAssignee: Jos Collin <jcollin>
Status: CLOSED ERRATA QA Contact: julpark
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.3CC: ceph-eng-bugs, cephqe-warriors, hyelloji, jcollin, kdreyer, neesingh, tserlin, vshankar
Target Milestone: ---Keywords: TestBlocker
Target Release: 5.3z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.2.10-136.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 10:06:27 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: 2073273, 2083468, 2158690    

Description julpark 2023-02-08 03:22:44 UTC
Description of problem:

cephfs-top is not working

Version-Release number of selected component (if applicable):

ceph version 16.2.10-122.el8cp

How reproducible:


Steps to Reproduce:
1.install cephfs-top
2.mount cephfs
3.run 'cephfs-top'

Actual results:

> [root@ceph-julpark-fclg3e-node9 cephuser]# cephfs-top
> exception: module 'curses' has no attribute 'A_ITALIC'

Expected results:

cephfs-top should be running fine

Additional info:

Comment 3 Venky Shankar 2023-02-08 05:49:05 UTC
Jos, would something like this work in create_clients():

import sys

curses_display_flag = curses.A_BOLD
if sys.version_info >= (3,7):
    curses_display_flag |= curses.A_ITALIC
self.fsstats.addstr(self.tablehead_y, 0, FS_TOP_NAME_TOPL_FMT.format(
    fs_name=fs_name, client_count=client_cnt), curses_display_flag)

WDYT?

Comment 4 Jos Collin 2023-02-08 06:26:31 UTC
(In reply to Venky Shankar from comment #3)
> Jos, would something like this work in create_clients():
> 
> import sys
> 
> curses_display_flag = curses.A_BOLD
> if sys.version_info >= (3,7):
>     curses_display_flag |= curses.A_ITALIC
> self.fsstats.addstr(self.tablehead_y, 0, FS_TOP_NAME_TOPL_FMT.format(
>     fs_name=fs_name, client_count=client_cnt), curses_display_flag)
> 
> WDYT?

I have used A_BOLD | A_ITALIC, just to make the "Filesystem:" heading visually distinguish from the rows under it.
So I'm okay with this^ fix, checking the version (3.7). 
Alternatively you can use A_BOLD | A_UNDERLINE or just having A_BOLD also distinguishes it from the rows below.

Comment 5 Venky Shankar 2023-02-08 06:28:38 UTC
(In reply to Jos Collin from comment #4)
> (In reply to Venky Shankar from comment #3)
> > Jos, would something like this work in create_clients():
> > 
> > import sys
> > 
> > curses_display_flag = curses.A_BOLD
> > if sys.version_info >= (3,7):
> >     curses_display_flag |= curses.A_ITALIC
> > self.fsstats.addstr(self.tablehead_y, 0, FS_TOP_NAME_TOPL_FMT.format(
> >     fs_name=fs_name, client_count=client_cnt), curses_display_flag)
> > 
> > WDYT?
> 
> I have used A_BOLD | A_ITALIC, just to make the "Filesystem:" heading
> visually distinguish from the rows under it.
> So I'm okay with this^ fix, checking the version (3.7). 
> Alternatively you can use A_BOLD | A_UNDERLINE or just having A_BOLD also
> distinguishes it from the rows below.

Fair enough. Let's just use A_BOLD then?

Comment 6 Jos Collin 2023-02-08 06:33:43 UTC
(In reply to Venky Shankar from comment #5)
> (In reply to Jos Collin from comment #4)
> > (In reply to Venky Shankar from comment #3)
> > > Jos, would something like this work in create_clients():
> > > 
> > > import sys
> > > 
> > > curses_display_flag = curses.A_BOLD
> > > if sys.version_info >= (3,7):
> > >     curses_display_flag |= curses.A_ITALIC
> > > self.fsstats.addstr(self.tablehead_y, 0, FS_TOP_NAME_TOPL_FMT.format(
> > >     fs_name=fs_name, client_count=client_cnt), curses_display_flag)
> > > 
> > > WDYT?
> > 
> > I have used A_BOLD | A_ITALIC, just to make the "Filesystem:" heading
> > visually distinguish from the rows under it.
> > So I'm okay with this^ fix, checking the version (3.7). 
> > Alternatively you can use A_BOLD | A_UNDERLINE or just having A_BOLD also
> > distinguishes it from the rows below.
> 
> Fair enough. Let's just use A_BOLD then?

That's fine with me, just drop A_ITALIC. Still it's good.

Comment 32 errata-xmlrpc 2023-02-28 10:06:27 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: Red Hat Ceph Storage 5.3 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.

https://access.redhat.com/errata/RHSA-2023:0980