Project

General

Profile

Actions

action #117511

open

Take into account units when using library filesystem_utils in snapper_cleanup_timeline

Added by JERiveraMoya over 1 year ago. Updated 9 months ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
2022-10-04
Due date:
% Done:

0%

Estimated time:

Description

Motivation

The convert2numeric subroutine is completely agnostic to size units. In the actual run this means:

  • $disk_size = 38 (Gigabytes).
  • $group_space =16.88 (Megabytes)
  • $space_limit = 0.2 (20 %)

So luckily with this numbers the test in line 44 results in false.

Subroutine convert2numeric does what is supposed to do, therefore we need to extend functionality when suing df -h in library filesystem_utils, otherwise we compare Megabytes with Gigabytes which is obviously wrong. However you do this, keep an eye on where the values are used, because this might affect the $block_number variable used in the dd command.

Acceptance criteria

AC1: Take into account units when getting partition size with library filesystem_utils

Additional information

We could also discuss, if the test in line 44 is really needed in this test module. Current disk usages by snapshots is 16.88 Megabytes compared to 38 Gigabytes of disk size. This test module is only used in the snapper_cleanup_timeline test suite which is chained directly after create_hdd_textmode, so the chances are low that we run into a situation where snapshots occupy more than 50% of the disk space.


Related issues 1 (0 open1 closed)

Related to qe-yam - action #117211: Add sync after dd in snapper_cleanup_timelineResolvedcoolgw2022-09-26

Actions
Actions

Also available in: Atom PDF