check-requirements.yml disk space available checks fail on > 1 TB drives

Bug #1536726 reported by David Wilde
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Fix Released
Undecided
David Wilde
Kilo
Fix Released
Undecided
David Wilde
Liberty
Fix Released
Undecided
David Wilde
Trunk
Fix Released
Undecided
David Wilde

Bug Description

The check-requirements.yml bootstrap role fails when the bootstrap_host_data_disk_device is greater than 1 TB because it is splitting on the string ' GB' and the ansible fact reports the size in ' TB'.

TASK: [bootstrap-host | Fail if there is not enough disk space available (disk specified)] ***
fatal: [localhost] => error while evaluating conditional: (ansible_devices[bootstrap_host_data_disk_device]['size'] | replace(' GB','')) | int
>= bootstrap_host_data_disk_min_size | int

Snippet from ansible_devices dump:

            "sdc": {
                "holders": [],
                "host": "Serial Attached SCSI controller: LSI Logic / Symbios Logic SSS6200 PCI-Express Flash SSD (rev 03)",
                "model": "NWD-BLP4-1600",
                "partitions": {
                    "sdc1": {
                        "sectors": "3124997632",
                        "sectorsize": 512,
                        "size": "1.46 TB",
                        "start": "2048"
                    }
                },
                "removable": "0",
                "rotational": "0",
                "scheduler_mode": "deadline",
                "sectors": "3124999680",
                "sectorsize": "512",
                "size": "1.46 TB",
                "support_discard": "512",
                "vendor": "LSI"
            }

David Wilde (dave-wilde)
Changed in openstack-ansible:
assignee: nobody → David Wilde (david-wilde-rackspace)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/271049

Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/271049
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=ef1a45fc05cae35e899ada44f0cf61baf63b0fba
Submitter: Jenkins
Branch: master

commit ef1a45fc05cae35e899ada44f0cf61baf63b0fba
Author: d34dh0r53 <email address hidden>
Date: Thu Jan 21 15:44:01 2016 -0600

    Convert available and minimum disk sizes to bytes.

    Previously the check-requirements role would assume GB as the unit
    of space when gathering disk sizes from ansible_devices. With
    drives larger than 1 TB ansible_devices reports the size as a
    float. This converts all disk sizes to bytes for consistency within
    the comparisons regardless of the size of the disk.

    Change-Id: I07b81a8a35197f73cd338fa02cb7b112df15a012
    Closes-Bug: 1536726

Changed in openstack-ansible:
status: In Progress → Fix Released
Changed in openstack-ansible:
milestone: none → 11.3.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (liberty)

Reviewed: https://review.openstack.org/272647
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=aac713dcb00a3e1e4c153b4e3c68faf3d544c6c1
Submitter: Jenkins
Branch: liberty

commit aac713dcb00a3e1e4c153b4e3c68faf3d544c6c1
Author: d34dh0r53 <email address hidden>
Date: Thu Jan 21 15:44:01 2016 -0600

    Convert available and minimum disk sizes to bytes.

    Previously the check-requirements role would assume GB as the unit
    of space when gathering disk sizes from ansible_devices. With
    drives larger than 1 TB ansible_devices reports the size as a
    float. This converts all disk sizes to bytes for consistency within
    the comparisons regardless of the size of the disk.

    Change-Id: I07b81a8a35197f73cd338fa02cb7b112df15a012
    Closes-Bug: 1536726
    (cherry picked from commit 85aad72a910538732cd668676e1d4c88e814ba22)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (kilo)

Reviewed: https://review.openstack.org/272649
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=0908c1f1d3e79816cb8c906e87eacca614cb370f
Submitter: Jenkins
Branch: kilo

commit 0908c1f1d3e79816cb8c906e87eacca614cb370f
Author: d34dh0r53 <email address hidden>
Date: Thu Jan 21 15:44:01 2016 -0600

    Convert available and minimum disk sizes to bytes.

    Previously the check-requirements role would assume GB as the unit
    of space when gathering disk sizes from ansible_devices. With
    drives larger than 1 TB ansible_devices reports the size as a
    float. This converts all disk sizes to bytes for consistency within
    the comparisons regardless of the size of the disk.

    Change-Id: I07b81a8a35197f73cd338fa02cb7b112df15a012
    Closes-Bug: 1536726
    (cherry picked from commit 85aad72a910538732cd668676e1d4c88e814ba22)

Changed in openstack-ansible:
milestone: 11.3.0 → 11.2.9
Changed in openstack-ansible:
milestone: 11.2.9 → mitaka-2
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.11

This issue was fixed in the openstack/openstack-ansible 11.2.11 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 12.0.8

This issue was fixed in the openstack/openstack-ansible 12.0.8 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 11.2.12

This issue was fixed in the openstack/openstack-ansible 11.2.12 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 12.0.9

This issue was fixed in the openstack/openstack-ansible 12.0.9 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 13.0.0

This issue was fixed in the openstack/openstack-ansible 13.0.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

This issue was fixed in the openstack/openstack-ansible 13.0.0 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 12.0.11

This issue was fixed in the openstack/openstack-ansible 12.0.11 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.14

This issue was fixed in the openstack/openstack-ansible 11.2.14 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 11.2.15

This issue was fixed in the openstack/openstack-ansible 11.2.15 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers