<font size=2 face="sans-serif">Currently, a flavor with its root_gb is
0 should be only used for volume booted or for testing purposes:</font>
<br><a href="https://github.com/openstack/nova/blob/master/api-ref/source/parameters.yaml#L1782~L1787"><font size=2 face="sans-serif">https://github.com/openstack/nova/blob/master/api-ref/source/parameters.yaml#L1782~L1787</font></a>
<br>
<br>
<br><font size=2 face="sans-serif">I have a use case:</font>
<br><font size=2 face="sans-serif">Users may create some virtual machines
for the processing of their business, these </font><font size=2>virtual
machines</font><font size=2 face="sans-serif"> use customized images which
can meet their requirement. When users create virtual machines using these
customized images in batches, they don't need to know the size of instance's
root_gb, so they can use flavor with its disk size as 0.</font>
<br><font size=2 face="sans-serif">In this case, the value of root_gb's
filed in db table of instances is 0 for every </font><font size=2>virtual
machine</font><font size=2 face="sans-serif">, but it's real value is not
0. This will lead to live migrate failure since live-migration's destination
compute node's disk_available_least is always less than 0.</font>
<br><font size=2 face="sans-serif">We often enable disk_filter to control
compute nodes's disk space, but when </font><font size=2>the value of root_gb's
filed in db table of instances is 0</font><font size=2 face="sans-serif">,
this filter does not work.</font>
<br>
<br>
<br><font size=2 face="sans-serif">For this case, I think testing purposes
for a flavor with its root_gb is 0 would mislead users. User probably didn't
notice this tips and they found instance with flavor's root_gb is 0 could
be booted successfully. Many problems occur after cloud environment running
for many a period, but its too late for rebuild this cloud environment.
I think it's dangerous.</font>
<br>
<br>
<br><font size=2 face="sans-serif">I have two optional solution.</font>
<br>
<br><font size=2 face="sans-serif">1. First option:</font>
<br><font size=2 face="sans-serif">When an instances booted from image
and  its flavor's root_gb is 0, this instance boot failed.</font>
<br>
<br><font size=2 face="sans-serif">2. Second option:</font>
<br><font size=2>When an instances booted from image and  its flavor's
root_gb is 0</font><font size=2 face="sans-serif">, </font><font size=2>the
value of root_gb's filed in db table of instances</font><font size=2 face="sans-serif">
should be equal to image's virtual size, min_size or size which is max.</font>
<br>
<br>
<br><font size=2 face="sans-serif">I submitted a bug for this question:
</font><a href="https://bugs.launchpad.net/nova/+bug/1414947"><font size=2 face="sans-serif">https://bugs.launchpad.net/nova/+bug/1414947</font></a>
<br><font size=2 face="sans-serif">I submitted second optional solution
code: </font><a href=https://review.openstack.org/398891><tt><font size=1 color=#0021bf>https://review.openstack.org/398891</font></tt></a><font size=3>
</font>
<br><a href="https://launchpad.net/~balazs-gibizer"><font size=2 color=#0021bf face="sans-serif">Balazs
Gibizer (balazs-gibizer)</font></a><font size=2 face="sans-serif"> wrote
a </font><font size=2 color=#2f2f2f face="sans-serif">a clarification to
the doc about disks == 0 case: </font><a href=https://review.openstack.org/#/c/339034/><font size=2 color=#0021bf face="sans-serif">https://review.openstack.org/#/c/339034/</font></a><font size=2 face="sans-serif">
</font>
<br>
<br><font size=3>I need you advice, thank you very much.</font>
<br>
<br><tt><font size=2>Best,<br>
</font></tt>
<br><tt><font size=2>Charlotte Han</font></tt>
<br>