Skip to content

Commit

Permalink
Merge pull request #314 from gildub/instance_prov-allow-disk-0
Browse files Browse the repository at this point in the history
Instances workflow: Allow flavors with disk size of 0

(cherry picked from commit 5598b27)

https://bugzilla.redhat.com/show_bug.cgi?id=1643042
  • Loading branch information
mansam authored and simaishi committed Nov 6, 2018
1 parent a2345e7 commit d7e44d6
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -14,7 +14,8 @@ def allowed_instance_types(_options = {})
minimum_memory_required = source.hardware.memory_mb_minimum.to_i * 1.megabyte
end
flavors.each_with_object({}) do |flavor, h|
next if flavor.root_disk_size < minimum_disk_required
# Allow flavors with 0 disk size: The instance will grow disk based upon image build definition
next if flavor.root_disk_size.positive? && flavor.root_disk_size < minimum_disk_required
next if flavor.memory < minimum_memory_required
h[flavor.id] = display_name_for_name_description(flavor)
end
Expand Down

0 comments on commit d7e44d6

Please sign in to comment.