Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cephfs-top: make cephfs-top display scrollable #48090

Merged
merged 3 commits into from
Oct 29, 2022

Conversation

joscollin
Copy link
Member

@joscollin joscollin commented Sep 14, 2022

Fixes: https://tracker.ceph.com/issues/55197

  • Implements Vertical and Horizontal scrolling of cephfs-top display. Use Up/Down Arrow Keys, PgUp/PgDn Keys or mouse for Vertical scrolling. Use Left/Right Arrow Keys and Home/End keys for Horizontal scrolling.
  • Maintains the run_display and run_all_display applications separately for customising, if needed.
  • Avoids the horizontal length (hlen) calculations of screen width. From now onwards, add n number of columns/fields and just Increase the PAD_WIDTH appropriately. Don't calculate the horizontal length anymore.
  • This code currently supports a PAD_HEIGHT of 10,000, which means I'm expecting nearly 10,000 clients only. We could make it configurable or calculate it either (later). The important thing to notice is that the PAD_HEIGHT and PAD_WIDTH are constant with in the run display application. It could be configured, but it's not meant for changing dynamically. It's not meant for resizing and recreating dynamically. Create the pad once and use it until the end of the application. Only a portion of the viewport (clipping box) is refreshed at a time.
  • The cephfs-top new UI with scrolling displays best in a maximised terminal window. It works in a tiny sized terminal window too, but the user has to give enough window size for him to see it fully functioning.

To test this well, try great number of clients like:

$ for i in {1..175}; do sudo mkdir -p /mnt/cephfs$i/; done
$ for i in {1..100}; do sudo ./bin/ceph-fuse -m <ip>:<port>  /mnt/cephfs$i/; done
$ for i in {101..150}; do sudo ./bin/ceph-fuse --client_mds_namespace fs1 -m <ip>:<port>  /mnt/cephfs$i/; done
$ for i in {151..175}; do sudo ./bin/ceph-fuse --client_mds_namespace fs2 -m <ip>:<port>  /mnt/cephfs$i/; done

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@github-actions github-actions bot added the cephfs Ceph File System label Sep 14, 2022
@vshankar vshankar requested a review from a team September 14, 2022 10:50
@joscollin joscollin force-pushed the wip-F55197-cephfs-top-scroll branch 11 times, most recently from 80de4e3 to 684a45c Compare September 20, 2022 11:40
@joscollin joscollin force-pushed the wip-F55197-cephfs-top-scroll branch 4 times, most recently from a0beb62 to a7ed3e1 Compare October 3, 2022 12:05
@joscollin joscollin force-pushed the wip-F55197-cephfs-top-scroll branch 4 times, most recently from ff6408d to 5493030 Compare October 19, 2022 12:05
@joscollin joscollin requested a review from a team as a code owner October 19, 2022 12:05
@joscollin joscollin removed the request for review from a team October 19, 2022 12:06
@joscollin
Copy link
Member Author

jenkins test api

@joscollin joscollin force-pushed the wip-F55197-cephfs-top-scroll branch 3 times, most recently from 0ee2aa1 to fbdd127 Compare October 24, 2022 11:04
@joscollin
Copy link
Member Author

Test passed:
http://pulpito.front.sepia.ceph.com/jcollin-2022-10-24_10:06:27-fs-wip-F55197-cephfs-top-scroll-distro-default-smithi/

@joscollin
Copy link
Member Author

jenkins test api

1 similar comment
@tchaikov
Copy link
Contributor

jenkins test api

Fixes: https://tracker.ceph.com/issues/55197
Signed-off-by: Jos Collin <jcollin@redhat.com>
Fixes: https://tracker.ceph.com/issues/55197
Signed-off-by: Jos Collin <jcollin@redhat.com>
* drop the blank FS Menu when there is no FS
* cleanup display_fs_menu() code

Signed-off-by: Jos Collin <jcollin@redhat.com>
@joscollin joscollin changed the title cephfs-top: make cephfs-top display scrollable like top cephfs-top: make cephfs-top display scrollable Oct 26, 2022
@joscollin
Copy link
Member Author

jenkins test windows

1 similar comment
@joscollin
Copy link
Member Author

jenkins test windows

@vshankar
Copy link
Contributor

Waiting for an ACK from @neesingh-rh for merge.

@joscollin
Copy link
Member Author

Waiting for an ACK from @neesingh-rh for merge.

Now this delay blocks me from creating a new PR (rebased). @vshankar Can you approve instead?

@joscollin joscollin merged commit 1e79490 into ceph:main Oct 29, 2022
@joscollin joscollin deleted the wip-F55197-cephfs-top-scroll branch October 29, 2022 02:10
@vshankar
Copy link
Contributor

Waiting for an ACK from @neesingh-rh for merge.

Now this delay blocks me from creating a new PR (rebased). @vshankar Can you approve instead?

Well ok :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants