Comment 6 for bug 1457517

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

My patch just avoid raising FlavorDiskTooSmall error in some ways.

So,the best way is that we don't have to check disk size with flavor if booting from volume.

like this:
        if root_gb and not boot_from_volume: # add a judgment condition
            if int(image.get('size') or 0) > root_gb * (1024 ** 3):
                raise exception.FlavorDiskTooSmall()
            if int(image.get('min_disk') or 0) > root_gb:
                    raise exception.FlavorDiskTooSmall()

is it looks ok?