Bug 1260991

Summary: Running the same deploy command twice results with :"Deployment failed: Not enough nodes - available: 2, requested: 5"
Product: Red Hat OpenStack Reporter: Udi Kalifon <ukalifon>
Component: python-rdomanager-oscpluginAssignee: RHOS Maint <rhos-maint>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: calfonso, jprovazn, jslagle, kbasil, mburns, mcornea, ohochman, rhel-osp-director-maint
Target Milestone: y1   
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-rdomanager-oscplugin-0.0.10-2.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-08 12:18:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Udi Kalifon 2015-09-08 11:23:31 UTC
Description of problem:
After deployment, if you re-run the same deployment command again you would get an error about not having enough free nodes. The deployment script should realize that no additional nodes are required since we're not adding any nodes.


Version-Release number of selected component (if applicable):
openstack-tripleo-common-0.0.1.dev6-2.git49b57eb.el7ost.noarch


How reproducible:
100%


Steps to Reproduce:
1. Run the same command twice in a row, for example: openstack overcloud deploy --plan overcloud --ntp-server clock.redhat.com --control-scale 3 --compute-scale 2 --neutron-tunnel-types vxlan --neutron-network-type vxlan   


Actual results:
Deployment failed:  Not enough nodes - available: 2, requested: 5


Expected results:
The overcloud is up-to-date, so there should be a message that nothing needs to be changed.


Additional info:
This happens when using either the templates or tuskar

Comment 3 Udi Kalifon 2015-09-08 18:38:27 UTC
This bug is critical. It is impossible to scale up a cloud because the validation requires that there will be enough free nodes for a whole new deployment, and not just enough free nodes for the scale up.

Comment 4 Jan Provaznik 2015-09-08 20:39:52 UTC
Overall number of cloud nodes is checked against remaining available nodes (instead of all nodes in ironic) https://github.com/rdo-management/python-rdomanager-oscplugin/blob/master/rdomanager_oscplugin/utils.py#L417

Comment 5 Jan Provaznik 2015-09-09 09:59:59 UTC
A patch which should fix this is here:
https://review.gerrithub.io/#/c/246266/

Comment 6 Jan Provaznik 2015-09-09 10:10:39 UTC
Correct patch url is: https://review.openstack.org/#/c/221679/

Comment 8 Marius Cornea 2015-09-17 10:56:19 UTC
[stack@instack ~]$ rpm -qa | grep oscplugin
python-rdomanager-oscplugin-0.0.10-3.el7ost.noarch

[stack@instack ~]$ openstack overcloud deploy --templates ~/templates/my-overcloud -e ~/templates/my-overcloud/environments/network-isolation.yaml -e ~/templates/network-environment.yaml --control-scale 3 --compute-scale 2 --ceph-storage-scale 0 --ntp-server clock.redhat.com
WARNING: rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud There are 13 ironic nodes with no profile that will not be used: 8757e689-4913-4b62-a08a-73a4c5b50eae, f5cae3e7-3a9a-47ef-804e-0b45d884f87a, cee7d1d1-4ceb-44a2-91d3-77a0cdd08c9c, 6a1f3602-eadb-43a4-a8cc-117bb60e68d5, 1a833e27-51ce-4709-8fb7-31f300008b42, 25a3eb46-ccf9-478b-b97f-be07f8de95d6, 09ca2f4b-0ddc-4795-96cc-dbee885debdf, f0b020df-c578-4287-b9dd-cadfa7980743, 1d5150f6-6aea-4c25-8594-18168ca13f36, 8301df60-b946-416b-8a06-a80c4bbadca5, e2b30d65-f053-47fb-8ecd-a982a62916d4, c935399f-512c-4400-be4a-734790eeefb7, b6c1ab0f-e087-4326-8b54-61f566745df2
ERROR: rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud Configuration has 1 warnings, fix them before proceeding. 
Deploying templates in the directory /home/stack/templates/my-overcloud
Overcloud Endpoint: http://172.16.23.10:5000/v2.0/
Overcloud Deployed

[stack@instack ~]$ 
[stack@instack ~]$ openstack overcloud deploy --templates ~/templates/my-overcloud -e ~/templates/my-overcloud/environments/network-isolation.yaml -e ~/templates/network-environment.yaml --control-scale 3 --compute-scale 10 --ceph-storage-scale 0 --ntp-server clock.redhat.com
WARNING: rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud There are 13 ironic nodes with no profile that will not be used: 8757e689-4913-4b62-a08a-73a4c5b50eae, f5cae3e7-3a9a-47ef-804e-0b45d884f87a, cee7d1d1-4ceb-44a2-91d3-77a0cdd08c9c, 6a1f3602-eadb-43a4-a8cc-117bb60e68d5, 1a833e27-51ce-4709-8fb7-31f300008b42, 25a3eb46-ccf9-478b-b97f-be07f8de95d6, 09ca2f4b-0ddc-4795-96cc-dbee885debdf, f0b020df-c578-4287-b9dd-cadfa7980743, 1d5150f6-6aea-4c25-8594-18168ca13f36, 8301df60-b946-416b-8a06-a80c4bbadca5, e2b30d65-f053-47fb-8ecd-a982a62916d4, c935399f-512c-4400-be4a-734790eeefb7, b6c1ab0f-e087-4326-8b54-61f566745df2
ERROR: rdomanager_oscplugin.v1.overcloud_deploy.DeployOvercloud Configuration has 1 warnings, fix them before proceeding. 
Deploying templates in the directory /home/stack/templates/my-overcloud
Overcloud Endpoint: http://172.16.23.10:5000/v2.0/
Overcloud Deployed

Comment 10 errata-xmlrpc 2015-10-08 12:18:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1862