Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

GH-2298 - File used percentage slightly off #2302

Merged
merged 8 commits into from
Oct 5, 2020
Merged

GH-2298 - File used percentage slightly off #2302

merged 8 commits into from
Oct 5, 2020

Conversation

johnsonw
Copy link
Contributor

@johnsonw johnsonw commented Oct 2, 2020

Update percentage on chart and in retention to match the percentage
displayed by lustre.

Fixes #2298.

Signed-off-by: johnsonw wjohnson@whamcloud.com


This change is Reviewable

Update percentage on chart and in retention to match the percentage
displayed by lustre.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw johnsonw added the bug label Oct 2, 2020
@johnsonw johnsonw added this to the IML EX V3 milestone Oct 2, 2020
@johnsonw johnsonw self-assigned this Oct 2, 2020
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw
Copy link
Contributor Author

johnsonw commented Oct 2, 2020

In the process of testing this.

…l page

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw
Copy link
Contributor Author

johnsonw commented Oct 2, 2020

image

image
Note, I have two filesystems here.

[root@oss1 fs]# lfs df -h
UUID                       bytes        Used   Available Use% Mounted on
fs-MDT0000_UUID             2.8G        2.4M        2.5G   1% /mnt/fs[MDT:0]
fs-MDT0001_UUID             2.8G        2.4M        2.5G   1% /mnt/fs[MDT:1]
fs-OST0000_UUID             4.6G        2.0M        4.3G   1% /mnt/fs[OST:0]
fs-OST0001_UUID             4.6G        2.8G        1.5G  66% /mnt/fs[OST:1]
fs-OST0002_UUID             4.6G      129.9M        4.2G   3% /mnt/fs[OST:2]
fs-OST0003_UUID             4.6G        1.0G        3.3G  24% /mnt/fs[OST:3]
fs-OST0004_UUID             4.6G        2.0M        4.3G   1% /mnt/fs[OST:4]
fs-OST0005_UUID             4.6G        1.0G        3.3G  24% /mnt/fs[OST:5]
fs-OST0006_UUID             4.6G        1.0G        3.3G  24% /mnt/fs[OST:6]
fs-OST0007_UUID             4.6G        2.0M        4.3G   1% /mnt/fs[OST:7]
fs-OST0008_UUID             4.6G        1.0G        3.3G  24% /mnt/fs[OST:8]
fs-OST0009_UUID             4.6G        2.0M        4.3G   1% /mnt/fs[OST:9]

filesystem_summary:        45.8G        7.0G       36.1G  17% /mnt/fs

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw
Copy link
Contributor Author

johnsonw commented Oct 2, 2020

Also wanted to show that the files chart is still working as well:
image

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw johnsonw marked this pull request as ready for review October 2, 2020 20:01
@jgrund jgrund requested a review from a team October 2, 2020 20:03
@@ -24,7 +24,7 @@ pub fn used_to_color(used: f64) -> &'static str {
pub fn view<'a, T>(x: impl Into<Option<(f64, &'a str)>>) -> Node<T> {
match x.into() {
Some((used, color)) => {
let stroke_length = (1.0 - used) * CIRCUMFERENCE;
let stroke_length = (100.0f64 - used) / 100.0f64 * CIRCUMFERENCE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: f64 is unnecessary when using a decimal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I just thought I would be explicit :)

@ip1981
Copy link
Member

ip1981 commented Oct 2, 2020

Does CLI have the same issue?

@jgrund jgrund requested a review from a team October 2, 2020 20:15
@johnsonw
Copy link
Contributor Author

johnsonw commented Oct 2, 2020

@ip1981, I could be missing something but I think it's ok:

[root@adm report]# iml filesystem show fs
+-------------------+---------------------------------------+
| Name              | fs                                    |
+-------------------+---------------------------------------+
| Space Used/Avail  | 7 GiB / 36 GiB                        |
+-------------------+---------------------------------------+
| Inodes Used/Avail | 1M / 3M                               |
+-------------------+---------------------------------------+
| State             | available                             |
+-------------------+---------------------------------------+
| Management Server | mds1.local                            |
+-------------------+---------------------------------------+
| MDTs              | fs-MDT0000                            |
|                   | fs-MDT0001                            |
+-------------------+---------------------------------------+
| OSTs              | fs-OST0000                            |
|                   | fs-OST0004                            |
|                   | fs-OST0002                            |
|                   | fs-OST0003                            |
|                   | fs-OST0001                            |
|                   | fs-OST0008                            |
|                   | fs-OST0007                            |
|                   | fs-OST0009                            |
|                   | fs-OST0006                            |
|                   | fs-OST0005                            |
+-------------------+---------------------------------------+
| Clients           | 1                                     |
+-------------------+---------------------------------------+
| Mount Path        | 10.73.20.11@tcp0:10.73.20.12@tcp0:/fs |
+-------------------+---------------------------------------+

Let me know if there is a different command you are referring to.

@jgrund jgrund merged commit 9ff2e4c into master Oct 5, 2020
@jgrund jgrund deleted the GH-2298 branch October 5, 2020 13:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File used percentage slightly off
3 participants