Red Hat Bugzilla – Bug 858030
Provider HWP with 0 storage should be valid
Last modified: 2014-08-17 18:27:54 EDT
Description of problem:
Conductor considers a provider hardware profile with 0GB of storage be invalid, and will refuse to save a HWP in that case. Since this is tied to adding a provider account, the whole transaction will fail.
There's no reason that zero should be invalid for storage. The validation should be changed to just require that it be non-negative (i.e., >= 0, not just >0.)
A little outside the scope of this task, but perhaps importing provider HWPs should be moved into a background task after the Provider Account is added.
Version-Release number of selected component (if applicable):
Upstream master, but probably all releases
Steps to Reproduce:
1. Outside Conductor, set up a cloud provider with a 0GB hardware profile. (OpenStack seems to do this out of the box.) I have a box on the internal network that does this if need be.
2. Add that as a provider.
3. Attempt to save a provider account for it.
Save fails, with:
Cannot add the Provider Account.
1 error prohibited this Provider Account from being saved
Failed to populate hardware_profiles: Validation failed: Storage is invalid
Save should succeed because 0GB is valid.
I cannot find a previous BZ for this, but have a strong feeling of deja vu here.
Pull request sent: https://github.com/aeolusproject/conductor/pull/64
On 1.1, cherry-picked from master:
Author: Matt Wagner <email@example.com>
Date: Mon Sep 17 17:40:54 2012 -0400
BZ 858030 - Allow 0 storage in HWPs
A hardware profile with no storage is a valid configuration,
so Conductor should accept it.
(cherry picked from commit f684804bd558e658fa1543c85ff6be0a572a442e)