red-hat-storage / openshift-cic

CNS Inventory file Creator (CIC) , also works for OCS
GNU General Public License v3.0
31 stars 7 forks source link

Add 'Warning your Total Storage available is less than the Total Storage allocated' #39

Closed netzzer closed 6 years ago

netzzer commented 6 years ago

Need to add another Warning if storage is oversubscribed in addition to having a PV size larger than the storage device. Something like this. User would have to start over similar to Warning for PV size being too large compared to storage device size.

Examples below.

Enter your choice [1-5] : 4
------------------------------------------------------------
For this configuration 7 nodes are recommended
With a minimum of 3 required 
------------------------------------------------------------
How many nodes are available ?:  3                    
What hosts will be used for application storage (IP/FQDN) ?: aaa.com bbb.com ccc.com
What are the raw storage devices for these hosts(/dev/<device>) ?: /dev/sdb
What is the size of each raw storage device (GB) ?: 100
What is the size for the registry persistent volume (GB)?: 50
How many replicas for logging ?: 3
What is the size for each logging persistent volume (GB) ?: 50
What is the size for each metrics persistent volume (GB) ?: 20
# Cluster 1
# Total Storage allocated (GB) = 271
# Total Storage available (GB) = 100
Warning your Total Storage available is less 
than the Total Storage allocated

AND condition could have both Warning messages.

Enter your choice [1-5] : 1
------------------------------------------------------------
 For this configuration 4 nodes are recommended 
 With a minimum of 3 required.
------------------------------------------------------------
How many nodes are available ?:  3
What hosts will be used for application storage (IP/FQDN) ?:  aaa.com bbb.com ccc.com
What are the raw storage devices for these hosts (/dev/<device>) ?: /dev/sdb
What is the size of each raw storage device (GB) ?: 100
What is the size for the registry persistent volume (GB)?: 150
# Cluster 1
# Total Storage allocated (GB) = 150
# Total Storage available (GB) = 100
Warning one or more persistent volumes are
larger than the raw storage device size
Warning your Total Storage available is less 
than the Total Storage allocated