Bug 2168019 - [CephFS] cephfs-top not working
Summary: [CephFS] cephfs-top not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 5.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.3z1
Assignee: Jos Collin
QA Contact: julpark
URL:
Whiteboard:
Depends On:
Blocks: 2073273 2083468 2158690
TreeView+ depends on / blocked
 
Reported: 2023-02-08 03:22 UTC by julpark
Modified: 2023-02-28 10:07 UTC (History)
8 users (show)

Fixed In Version: ceph-16.2.10-136.el8cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-28 10:06:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 58663 0 None None None 2023-02-08 10:26:42 UTC
Red Hat Issue Tracker RHCEPH-6105 0 None None None 2023-02-08 03:23:46 UTC
Red Hat Product Errata RHSA-2023:0980 0 None None None 2023-02-28 10:07:21 UTC

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


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