Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1519535 - Required space check is calculated incorrectly when there are mounted volumes
Summary: Required space check is calculated incorrectly when there are mounted volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Satellite Clone
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: John Mitsch
QA Contact: Katello QA List
URL:
Whiteboard:
: 1523495 1523790 (view as bug list)
Depends On:
Blocks: 1533259
TreeView+ depends on / blocked
 
Reported: 2017-11-30 20:54 UTC by sthirugn@redhat.com
Modified: 2018-04-03 14:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-03 13:08:14 UTC


Attachments (Terms of Use)

Description sthirugn@redhat.com 2017-11-30 20:54:59 UTC
Description of problem:
Required space check is calculated incorrectly when there are mounted volumes

Version-Release number of selected component (if applicable):
satellite-clone-1.1.4-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
Code in pre_install_check.yml:

- name: find root partition's free space
  set_fact:
    root_free_space: "{{ (item.size_available | int) / 1000000000 }}"
    cacheable: true
  when: item.mount == "/"
  with_items: "{{ hostvars[inventory_hostname] ['ansible_mounts'] }}"

The above logic ignores the mounted volume space so an error is thrown although the user has enough space on the mounted volumes.

Sample file system where this check failed:
$ df -h
Filesystem                          Size  Used Avail Use% Mounted on
/dev/mapper/root_vg-root_lv         2.0G   74M  2.0G   4% /
/dev/mapper/root_vg-usr_lv          6.0G  2.1G  4.0G  35% /usr
/dev/mapper/root_vg-home_lv         2.0G   33M  2.0G   2% /home
/dev/mapper/root_vg-var_lv          6.0G  2.2G  3.9G  36% /var
/dev/mapper/data_vg-rhsatVarLib_lv  800G  184M  800G   1% /var/lib

Actual results:
Space check failed although mounted volumes had a lot of space.

Expected results:
Space check logic should consider the mounted volumes too.

Additional info:

Comment 2 sthirugn@redhat.com 2018-01-02 16:47:39 UTC
Workaround: Go to /etc/satellite-clone/satellite-clone-vars.yml -> Change the value of `required_root_free_space` to 0

Comment 3 sthirugn@redhat.com 2018-01-02 16:49:05 UTC
*** Bug 1523790 has been marked as a duplicate of this bug. ***

Comment 4 Glenn SNead 2018-01-02 17:14:03 UTC
As my bug (1523790) was merged into this one, I'd add this:

Per the 6.3 beta document, Upgrading and Updating Red Hat Satellite, the Before You Begin (2.1.2) section says this:

The target server must have capacity to store the backup files, which the source server transfers to the target server, and the backup files when they are restored.

This document does not say how much space the source server should have, or how to calculate how much space to provision.  The command line entry only suggests an output directory of /backup/

In section 2.1.4, Step 10:  The satellite-clone command does not specify which server the administrator should use.

Comment 5 sthirugn@redhat.com 2018-01-15 20:30:53 UTC
*** Bug 1523495 has been marked as a duplicate of this bug. ***

Comment 7 John Mitsch 2018-02-02 17:43:22 UTC
upstream PR merged

Comment 8 sthirugn@redhat.com 2018-04-03 13:08:14 UTC
Space check is already removed in production in current release.  This bug is not applicable anymore.


Note You need to log in before you can comment on or make changes to this bug.