)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea854f2b7b12a59385a17e23e98ffc56c14df2ed","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The 0 value of the disk parameter of the flavor is only meaningfull"},{"line_number":10,"context_line":"if the instance is booted from volume as in any other case the"},{"line_number":11,"context_line":"instance will use local disk. The previous statemtent which says that"},{"line_number":12,"context_line":"in case of disk\u003d0 the real image size will be used is simply not true."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6b3ba2fb323341071eae6b9e9f54ef833fdbaff7"},{"line_number":15,"context_line":"Closes-Bug: #1599787"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dada55a8_73aa021b","line":12,"updated":"2016-07-25 10:03:02.000000000","message":"I believe you are missing something here, please see my comment inline.\n\nYou should really be looking for nova hypervisor-stats output and checking disk_available_least value which takes into account virtual sizes of disks like qcow2.","commit_id":"0f1c40bf22584134baa785c025bb7bcf8173f61d"}],"api-ref/source/parameters.yaml":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea854f2b7b12a59385a17e23e98ffc56c14df2ed","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"  required: true"},{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance."},{"line_number":1556,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_13d626c3","side":"PARENT","line":1553,"updated":"2016-07-25 10:03:02.000000000","message":"This actually was correct and you can see it here - https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L6856-L6937 - the virt driver in nova-compute will check all running VMs on this node in the periodic task and sum the virtual sizes (in case images like qcow2 are used) of local disks - in other words resource tracking does not depend on flavors in this case and everything will be accounted correctly.\n\nubuntu@rpodolyaka-devstack:~/devstack$ qemu-img info cirros-0.3.0-x86_64-disk.img \nimage: cirros-0.3.0-x86_64-disk.img\nfile format: qcow2\nvirtual size: 2.0G (2188610048 bytes)\ndisk size: 9.8M\ncluster_size: 65536\nFormat specific information:\n    compat: 0.10\n    refcount bits: 16\n\nbefore boot:\n\nubuntu@rpodolyaka-devstack:~/devstack$ nova hypervisor-stats\n+----------------------+-------+\n| Property             | Value |\n+----------------------+-------+\n| count                | 1     |\n| current_workload     | 1     |\n| disk_available_least | 67    |\n| free_disk_gb         | 77    |\n| free_ram_mb          | 7215  |\n| local_gb             | 77    |\n| local_gb_used        | 0     |\n| memory_mb            | 7983  |\n| memory_mb_used       | 768   |\n| running_vms          | 4     |\n| vcpus                | 4     |\n| vcpus_used           | 4     |\n+----------------------+-------+\n\n\nafter boot:\n\nubuntu@rpodolyaka-devstack:~/devstack$ nova hypervisor-stats\n+----------------------+-------+\n| Property             | Value |\n+----------------------+-------+\n| count                | 1     |\n| current_workload     | 0     |\n| disk_available_least | 65    |\n| free_disk_gb         | 77    |\n| free_ram_mb          | 7215  |\n| local_gb             | 77    |\n| local_gb_used        | 0     |\n| memory_mb            | 7983  |\n| memory_mb_used       | 768   |\n| running_vms          | 4     |\n| vcpus                | 4     |\n| vcpus_used           | 4     |\n+----------------------+-------+\n\nflavor:\n\nubuntu@rpodolyaka-devstack:~/devstack$ nova flavor-show m1.nano\n+----------------------------+---------+\n| Property                   | Value   |\n+----------------------------+---------+\n| OS-FLV-DISABLED:disabled   | False   |\n| OS-FLV-EXT-DATA:ephemeral  | 0       |\n| disk                       | 0       |\n| extra_specs                | {}      |\n| id                         | 42      |\n| name                       | m1.nano |\n| os-flavor-access:is_public | True    |\n| ram                        | 64      |\n| rxtx_factor                | 1.0     |\n| swap                       |         |\n| vcpus                      | 1       |\n+----------------------------+---------+\n\n\ninstance:\n\nubuntu@rpodolyaka-devstack:~/devstack$ nova show demo-2gb              \n\t+--------------------------------------+----------------------------------------------------------+\n| Property                             | Value                                                    |\n+--------------------------------------+----------------------------------------------------------+\n| OS-DCF:diskConfig                    | MANUAL                                                   |\n| OS-EXT-AZ:availability_zone          | nova                                                     |\n| OS-EXT-SRV-ATTR:host                 | rpodolyaka-devstack                                      |\n| OS-EXT-SRV-ATTR:hostname             | demo-2gb                                                 |\n| OS-EXT-SRV-ATTR:hypervisor_hostname  | rpodolyaka-devstack                                      |\n| OS-EXT-SRV-ATTR:instance_name        | instance-00000006                                        |\n| OS-EXT-SRV-ATTR:kernel_id            |                                                          |\n| OS-EXT-SRV-ATTR:launch_index         | 0                                                        |\n| OS-EXT-SRV-ATTR:ramdisk_id           |                                                          |\n| OS-EXT-SRV-ATTR:reservation_id       | r-1w4ybjfm                                               |\n| OS-EXT-SRV-ATTR:root_device_name     | /dev/vda                                                 |\n| OS-EXT-SRV-ATTR:user_data            | -                                                        |\n| OS-EXT-STS:power_state               | 1                                                        |\n| OS-EXT-STS:task_state                | -                                                        |\n| OS-EXT-STS:vm_state                  | active                                                   |\n| OS-SRV-USG:launched_at               | 2016-07-25T09:56:31.000000                               |\n| OS-SRV-USG:terminated_at             | -                                                        |\n| accessIPv4                           |                                                          |\n| accessIPv6                           |                                                          |\n| config_drive                         | True                                                     |\n| created                              | 2016-07-25T09:56:23Z                                     |\n| description                          | -                                                        |\n| flavor                               | m1.nano (42)                                             |\n| hostId                               | 7579f4bf4f7eae47e4f74a6862efa33e3a9f46fd865caf8daf4348b0 |\n| host_status                          | UP                                                       |\n| id                                   | 6bcd1c07-46d0-436c-8ecb-85f4a546fffd                     |\n| image                                | 2gb (acd21aa9-0624-43fe-b1d2-624b36024b72)               |\n| key_name                             | -                                                        |\n| locked                               | False                                                    |\n| metadata                             | {}                                                       |\n| name                                 | demo-2gb                                                 |\n| os-extended-volumes:volumes_attached | []                                                       |\n| private network                      | 10.0.0.11, fd4f:747:a01f:0:f816:3eff:fe88:e99f           |\n| progress                             | 0                                                        |\n| security_groups                      | default                                                  |\n| status                               | ACTIVE                                                   |\n| tags                                 | []                                                       |\n| tenant_id                            | 84383a1f11ff4a519ea33e588a597f13                         |\n| updated                              | 2016-07-25T09:56:31Z                                     |\n| user_id                              | 76f58cd7a9d24a9eaf11273bdfac9c47                         |\n+--------------------------------------+----------------------------------------------------------+","commit_id":"8e51a653c2d37571e7583d101b476e7531af1035"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a513e40d6945a722f01b0e64e9ca8d418f2cff93","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"  required: true"},{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance."},{"line_number":1556,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_b330fa08","side":"PARENT","line":1553,"in_reply_to":"dada55a8_13d626c3","updated":"2016-07-25 10:05:16.000000000","message":"Disk size is actually 2gb:\n\nubuntu@rpodolyaka-devstack:~/devstack$ qemu-img info /opt/stack/data/nova/instances/6bcd1c07-46d0-436c-8ecb-85f4a546fffd/disk\nimage: /opt/stack/data/nova/instances/6bcd1c07-46d0-436c-8ecb-85f4a546fffd/disk\nfile format: qcow2\nvirtual size: 2.0G (2188610048 bytes)\ndisk size: 1.4M\ncluster_size: 65536\nbacking file: /opt/stack/data/nova/instances/_base/a57c0caf5d04623c61bd591d17155553dc47607f\nFormat specific information:\n    compat: 1.1\n    lazy refcounts: false\n    refcount bits: 16\n    corrupt: false","commit_id":"8e51a653c2d37571e7583d101b476e7531af1035"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f628df53a73e018f498b859f786f8f93c82a2142","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"  required: true"},{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance."},{"line_number":1556,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_5771530b","side":"PARENT","line":1553,"in_reply_to":"dada55a8_62f218d4","updated":"2016-07-26 16:57:14.000000000","message":"The last part actually sucks :(\n\nnova hypervisor-stats                                                                                      Tue Jul 26 16:55:56 2016\n\n+----------------------+-------+\n| Property             | Value |\n+----------------------+-------+\n| count                | 1     |\n| current_workload     | 0     |\n| disk_available_least | -37   |\n| free_disk_gb         | 77    |\n| free_ram_mb          | 7343  |\n| local_gb             | 77    |\n| local_gb_used        | 0     |\n| memory_mb            | 7983  |\n| memory_mb_used       | 640   |\n| running_vms          | 2     |\n| vcpus                | 4     |\n| vcpus_used           | 2     |\n+----------------------+-------+\n\nI was sure we check the virtual size on the nova-compute side on boot, so that we can trigger a reschedule if there is not enough space available, but apparently we do not :(","commit_id":"8e51a653c2d37571e7583d101b476e7531af1035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"844d8279914c7bab1e0f3a452df2cc1218c2555d","unresolved":false,"context_lines":[{"line_number":1550,"context_line":"  required: true"},{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance."},{"line_number":1556,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_62f218d4","side":"PARENT","line":1553,"in_reply_to":"dada55a8_b330fa08","updated":"2016-07-25 16:23:52.000000000","message":"I double checked the disk_available_least is calculated properly. I can drop the resource tracker form the problem statement. However I the scheduler still use 0 as requested_disk in the filtering so we have to state in the doc that scheduling does not use the exact image size for the host selection. Therefore if the flavor defines 0 disk but the VM is booted from image then it is possible that a host is selected that doesn\u0027t have enough space to store the image. It is even possible that initially a qcow2 image fits to the local disk of the compute but later as the qcow disk grows it cannot fit any more.","commit_id":"8e51a653c2d37571e7583d101b476e7531af1035"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea854f2b7b12a59385a17e23e98ffc56c14df2ed","unresolved":false,"context_lines":[{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB."},{"line_number":1554,"context_line":"    The 0 value shall only be used for volume booted instances."},{"line_number":1555,"context_line":"flavor_ephem_disk:"},{"line_number":1556,"context_line":"  in: body"},{"line_number":1557,"context_line":"  required: true"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_13fd863b","line":1554,"updated":"2016-07-25 10:03:02.000000000","message":"or testing?","commit_id":"0f1c40bf22584134baa785c025bb7bcf8173f61d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"844d8279914c7bab1e0f3a452df2cc1218c2555d","unresolved":false,"context_lines":[{"line_number":1551,"context_line":"  type: int"},{"line_number":1552,"context_line":"  description: |"},{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB."},{"line_number":1554,"context_line":"    The 0 value shall only be used for volume booted instances."},{"line_number":1555,"context_line":"flavor_ephem_disk:"},{"line_number":1556,"context_line":"  in: body"},{"line_number":1557,"context_line":"  required: true"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dada55a8_62a058a0","line":1554,"in_reply_to":"dada55a8_13fd863b","updated":"2016-07-25 16:23:52.000000000","message":"I tried to be more precise about what 0 means.","commit_id":"0f1c40bf22584134baa785c025bb7bcf8173f61d"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8b822e146b85d95b9dae0f84344e6509b03cd536","unresolved":false,"context_lines":[{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance. However in this case filter scheduler cannot"},{"line_number":1556,"context_line":"    select the compute host based on the actual image size. Therefore"},{"line_number":1557,"context_line":"    0 shall only be used for volume booted instances or for testing"},{"line_number":1558,"context_line":"    purposes."},{"line_number":1559,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dada55a8_f7b20795","line":1556,"updated":"2016-07-26 17:00:05.000000000","message":"s/actual/virtual? (the term used by qemu-img)","commit_id":"6d5ecb726f4887a2b1a201aadb105aacd757d5eb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3634f23086420980b1a6cfce1739633ac6e56364","unresolved":false,"context_lines":[{"line_number":1553,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance. However in this case filter scheduler cannot"},{"line_number":1556,"context_line":"    select the compute host based on the actual image size. Therefore"},{"line_number":1557,"context_line":"    0 shall only be used for volume booted instances or for testing"},{"line_number":1558,"context_line":"    purposes."},{"line_number":1559,"context_line":"flavor_ephem_disk:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dada55a8_2fcd4066","line":1556,"in_reply_to":"dada55a8_f7b20795","updated":"2016-07-27 10:26:10.000000000","message":"Done","commit_id":"6d5ecb726f4887a2b1a201aadb105aacd757d5eb"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8b822e146b85d95b9dae0f84344e6509b03cd536","unresolved":false,"context_lines":[{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance. However in this case filter scheduler cannot"},{"line_number":1556,"context_line":"    select the compute host based on the actual image size. Therefore"},{"line_number":1557,"context_line":"    0 shall only be used for volume booted instances or for testing"},{"line_number":1558,"context_line":"    purposes."},{"line_number":1559,"context_line":"flavor_ephem_disk:"},{"line_number":1560,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dada55a8_d76ee3fe","line":1557,"updated":"2016-07-26 17:00:05.000000000","message":"s/shall/should\n\nNot a native speaker, but I think you meant the latter here :P","commit_id":"6d5ecb726f4887a2b1a201aadb105aacd757d5eb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3634f23086420980b1a6cfce1739633ac6e56364","unresolved":false,"context_lines":[{"line_number":1554,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1555,"context_line":"    deploy the instance. However in this case filter scheduler cannot"},{"line_number":1556,"context_line":"    select the compute host based on the actual image size. Therefore"},{"line_number":1557,"context_line":"    0 shall only be used for volume booted instances or for testing"},{"line_number":1558,"context_line":"    purposes."},{"line_number":1559,"context_line":"flavor_ephem_disk:"},{"line_number":1560,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dada55a8_8fe26cd3","line":1557,"in_reply_to":"dada55a8_d76ee3fe","updated":"2016-07-27 10:26:10.000000000","message":"Done. I\u0027m also not a native speaker. :)","commit_id":"6d5ecb726f4887a2b1a201aadb105aacd757d5eb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"35b188469644252042a911c3a25ca32773ae926a","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"  description: |"},{"line_number":1769,"context_line":"    The size of the root disk that will be created in GiB. If 0 the"},{"line_number":1770,"context_line":"    root disk will be set to exactly the size of the image used to"},{"line_number":1771,"context_line":"    deploy the instance. However in this case filter scheduler cannot"},{"line_number":1772,"context_line":"    select the compute host based on the virtual image size. Therefore"},{"line_number":1773,"context_line":"    0 should only be used for volume booted instances or for testing"},{"line_number":1774,"context_line":"    purposes."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"1ac06dbe_ec565f05","line":1771,"range":{"start_line":1771,"start_character":46,"end_line":1771,"end_character":62},"updated":"2016-08-19 10:49:03.000000000","message":"nit: *the filter scheduler","commit_id":"9d08e805a8889d84ff1076da2373c37057670f23"}]}
