Inconsistent unit of measure for journal size in system host-stor-update command

Bug #1858937 reported by Wendy Mitchell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Won't Fix
Low
Mihnea Saracin

Bug Description

Brief Description
-----------------
Inconsistent cli journal size unit of measure in the system host-stor command (GiB used in most places but system host-stor-update using MiB)

Severity
--------
standard

Steps to Reproduce
------------------
Confirm consistent output in GiB for the journal size in the system host-stor commands

1. The size is in GiB in host-stor-list

$ system host-stor-list controller-0
+--------------------------------------+----------+-------+------------+--------------------------------------+-----------------------------+------------+----------+-----------+
| uuid | function | osdid | state | idisk_uuid | journal_path | journal_no | journal_ | tier_name |
| | | | | | | de | size_gib | |
+--------------------------------------+----------+-------+------------+--------------------------------------+-----------------------------+------------+----------+-----------+
| 4f2a6d16-2f25-4445-be16-596d612c0222 | osd | 1 | configured | 8571c401-d275-4e56-839b-45561ab83a14 | /dev/disk/by-path/pci-0000: | /dev/sdb2 | 1 | storage |
| | | | | | 00:1f.2-ata-2.0-part2 | | | |
| | | | | | | | | |
+--------------------------------------+----------+-------+------------+--------------------------------------+-----------------------------+------------+----------+-----------+

2. The size is in GiB in host-stor-add

$ system host-stor-add
usage: system host-stor-add [--journal-location [<journal_location>]]
                            [--journal-size [<size of the journal GiB>]]
                            [--tier-uuid [<storage tier uuid>]]
                            <hostname or id> [<function>] <idisk_uuid>
system host-stor-add: error: too few arguments

$ system help host-stor-add
usage: system host-stor-add [--journal-location [<journal_location>]]
                            [--journal-size [<size of the journal GiB>]]
                            [--tier-uuid [<storage tier uuid>]]
                            <hostname or id> [<function>] <idisk_uuid>

Add a storage to a host.

Positional arguments:
  <hostname or id> Name or ID of host [REQUIRED]
  <function> Type of the stor (default: osd)
  <idisk_uuid> uuid of disk [REQUIRED]

Optional arguments:
  --journal-location [<journal_location>]
                        Location of stor's journal
  --journal-size [<size of the journal (GiB)>]
                        Size of stor's journal, in GiB
  --tier-uuid [<storage tier uuid>]
                        storage tier to assign this OSD

3.
$ system host-stor-update --journal-location 4f2a6d16-2f25-4445-be16-596d612c0222 --journal-size
usage: system host-stor-update [--journal-location [<journal_location>]]
                               [--journal-size [<size of the journal MiB>]]
                               <osd stor uuid>
system host-stor-update: error: too few arguments

$ system help host-stor-update
usage: system host-stor-update [--journal-location [<journal_location>]]
                               [--journal-size [<size of the journal MiB>]]
                               <osd stor uuid>

Modify journal attributes for OSD.

Positional arguments:
  <osd stor uuid> UUID of osd[REQUIRED]

Optional arguments:
  --journal-location [<journal_location>]
                        Location of stor's journal
  --journal-size [<size of the journal (MiB)>]
                        Size of stor's journal, in MiB

4. $ system host-stor-update --journal-location cbfbf28f-d7b8-4437-9402-611787b1b6f7 --journal-size 10 3f9a6686-2b76-4278-b997-b029211d7632
+------------------+-------------------------------------------------+
| Property | Value |
+------------------+-------------------------------------------------+
| osdid | 1 |
| function | osd |
| state | configuring-on-unlock |
| journal_location | cbfbf28f-d7b8-4437-9402-611787b1b6f7 |
| journal_size_gib | 10240 |
| journal_path | /dev/disk/by-path/pci-0000:84:00.0-nvme-1-part1 |
| journal_node | /dev/nvme1n1p1 |
| uuid | 3f9a6686-2b76-4278-b997-b029211d7632 |
| ihost_uuid | b3f5dd04-f8e8-4f3e-9011-791d16d7abe8 |
| idisk_uuid | eff63bd4-aaa2-486e-bcfc-cffedf07ee3a |
| tier_uuid | f4626531-86fd-45fb-af9f-8417af1a46ff |
| tier_name | storage |
| created_at | 2019-11-13T15:49:59.427588+00:00 |
| updated_at | 2019-11-13T17:39:36.615134+00:00

Expected Behavior
------------------
Expect the journal size to consistently use the same units of measure (ie. GiB) thoughout for system host-stor commands

Actual Behavior
----------------
In step 3 and 4, there are inconsistencies in the unit representation for the journal size on $system host-stor-update operations.
eg.
system host-stor-update command in still using the units MiB
update command specifies 10 but it is converted to 10240

Reproducibility
---------------
100%

System Configuration
--------------------
Storage

Branch/Pull Time/Commit
-----------------------
2019-11-11_20-00-00 (or 2019-12-13_19-03-42)

description: updated
Ghada Khalil (gkhalil)
tags: added: stx.4.0 stx.config stx.storage
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Mihnea Saracin (msaracin)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.4.0 / medium priority - inconsistency with storage system cli cmds

Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
tags: added: stx.retestneeded
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Lowering the priority - this is still a would-be-nice to fix, but should not gate stx.4.0 given it's a minor inconsistency with some cli cmds

tags: removed: stx.4.0
Changed in starlingx:
importance: Medium → Low
Revision history for this message
Ramaswamy Subramanian (rsubrama) wrote :

No progress on this bug for more than 2 years. Candidate for closure.

If there is no update, this issue is targeted to be closed as 'Won't Fix' in 2 weeks.

Revision history for this message
Ramaswamy Subramanian (rsubrama) wrote :

Changing the status to 'Won't Fix' as there is no activity.

Changed in starlingx:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.