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 8 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 #1

Updated by JERiveraMoya over 1 year ago

filesystem_utils is a shared library, so we need to find where it is used as it might no be trivial to change it. We should add that info to the ticket as well.

Actions #2

Updated by JERiveraMoya over 1 year ago

  • Related to action #117211: Add sync after dd in snapper_cleanup_timeline added
Actions #3

Updated by JERiveraMoya 8 months ago

YaM focus is focusing on reducing yaml schedule files and making test coverage more uniform for products and for that it is more important to simplify validation and not make them more complex like in this ticket although it is a valid point in it for enhancing code. Let's hold a bit how we progress with epic #119836

Actions

Also available in: Atom PDF