Bug 1536102 - Free_disk_gb is negative when over-commit is enabled
Summary: Free_disk_gb is negative when over-commit is enabled
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Eoghan Glynn
QA Contact: Archit Modi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-18 15:59 UTC by Archit Modi
Modified: 2019-09-09 14:58 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-19 09:54:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1533161 0 high CLOSED migration with block migration fails as disk_available_least is negative 2023-01-13 10:46:17 UTC

Internal Links: 1533161

Description Archit Modi 2018-01-18 15:59:11 UTC
+++ This bug was introduced by the fix for Bug #1533161 +++

Description of problem:
Free_disk_gb becomes negative when over-commit is enabled and available disk space is consumed by launching multiple VMs

Version-Release number of selected component (if applicable):
python-nova-16.0.2-8.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Launch VMs to consume available disk space and exceed it
(overcloud) [stack@undercloud-0 ~]$ openstack server list
+--------------------------------------+-----------+--------+-----------------+--------+-----------+
| ID                                   | Name      | Status | Networks        | Image  | Flavor    |
+--------------------------------------+-----------+--------+-----------------+--------+-----------+
| 3f4a0d5f-4485-445a-a437-4f7ee7cf96d4 | test_vm_4 | ACTIVE | nova=10.0.0.212 | CirrOS | m1.custom |
| 7964db7d-c587-4a94-9645-f54bd995c242 | test_vm_3 | ACTIVE | nova=10.0.0.213 | CirrOS | m1.custom |
| 9f8b15aa-a761-4f68-908a-bfa89806a949 | test_vm_2 | ACTIVE | nova=10.0.0.214 | CirrOS | m1.custom |
| 78ff31c3-433a-4e50-bac6-6c4bf86e7aca | test_vm   | ACTIVE | nova=10.0.0.219 | CirrOS | m1.custom |
+--------------------------------------+-----------+--------+-----------------+--------+-----------+

2. free_disk_gb becomes negative:
(overcloud) [stack@undercloud-0 ~]$ nova hypervisor-show 7c7afcb3-a7fe-4ff1-8f86-e1f0875392da
+---------------------------+------------------------------------------+
| Property                  | Value                                    |
+---------------------------+------------------------------------------+
| cpu_info_arch             | x86_64                                   |
| cpu_info_features         | ["pge", "avx", "xsaveopt", "clflush",    |
|                           | "sep", "syscall", "tsc-deadline",        |
|                           | "invpcid", "tsc", "fsgsbase", "xsave",   |
|                           | "vmx", "erms", "cmov", "smep", "fpu",    |
|                           | "pat", "lm", "msr", "nx", "fxsr",        |
|                           | "sse4.1", "pae", "sse4.2", "pclmuldq",   |
|                           | "pcid", "fma", "vme", "mmx", "osxsave",  |
|                           | "cx8", "mce", "de", "aes", "mca", "pse", |
|                           | "lahf_lm", "abm", "popcnt", "pdpe1gb",   |
|                           | "apic", "sse", "f16c", "pni", "rdtscp",  |
|                           | "avx2", "sse2", "ss", "hypervisor",      |
|                           | "bmi1", "bmi2", "ssse3", "cx16",         |
|                           | "pse36", "mtrr", "movbe", "rdrand",      |
|                           | "x2apic"]                                |
| cpu_info_model            | Haswell-noTSX                            |
| cpu_info_topology_cells   | 1                                        |
| cpu_info_topology_cores   | 1                                        |
| cpu_info_topology_sockets | 2                                        |
| cpu_info_topology_threads | 1                                        |
| cpu_info_vendor           | Intel                                    |
| current_workload          | 0                                        |
| disk_available_least      | -9                                       |
| free_disk_gb              | -3                                       |
| free_ram_mb               | 1023                                     |
| host_ip                   | 172.17.1.18                              |
| hypervisor_hostname       | compute-1.localdomain                    |
| hypervisor_type           | QEMU                                     |
| hypervisor_version        | 2009000                                  |
| id                        | 7c7afcb3-a7fe-4ff1-8f86-e1f0875392da     |
| local_gb                  | 19                                       |
| local_gb_used             | 22                                       |
| memory_mb                 | 6143                                     |
| memory_mb_used            | 5120                                     |
| running_vms               | 2                                        |
| service_disabled_reason   | None                                     |
| service_host              | compute-1.localdomain                    |
| service_id                | 4f27375f-1b51-49be-81c8-bbeeca36dedc     |
| state                     | up                                       |
| status                    | enabled                                  |
| vcpus                     | 2                                        |
| vcpus_used                | 2                                        |
+---------------------------+------------------------------------------+

Actual results: free_disk_gb is negative


Expected results: free_disk_gb should be positive 


Additional info:

Comment 1 Matthew Booth 2018-01-19 09:54:31 UTC
This looks weird, but it's actually accurate. It's reporting the amount of free disk space available to an unprivileged user (e.g. the Nova user), which on this system is -3GB, because we've used all unreserved space and 3GB of reserved space. See 'tune2fs -m' for details.

Incidentally, although I'm closing this bug I've created bug 1536375 to track the incorrect disk space check during live migration.

Comment 2 Eric Sandeen 2018-01-24 20:42:48 UTC
I might suggest that if the intent is to show space available to the unpriviledged users, you might clamp the value at 0 to avoid confusion with the negative numbers.


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