Bug 1377689

Summary: RHEL OSP 9 wont accept instackenv template if no value for cpu/mem/disk is given.
Product: Red Hat OpenStack Reporter: VIKRANT <vaggarwa>
Component: python-tripleoclientAssignee: RHOS Maint <rhos-maint>
Status: CLOSED WORKSFORME QA Contact: Arik Chernetsky <achernet>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0 (Mitaka)CC: dtantsur, hbrock, jcoufal, jslagle, mburns, rhel-osp-director-maint, srevivo, tim.darnell
Target Milestone: ---   
Target Release: 10.0 (Newton)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-17 09:08:11 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:

Description VIKRANT 2016-09-20 11:36:46 UTC
Description of problem:

RHEL OSP 9 Wont accept instackenv template if no value for cpu/mem/disk is given. 


Version-Release number of selected component (if applicable):
RHEL OSP 9

How reproducible:
Everytime.

Steps to Reproduce:
1. Keep the memory, disk, and cpu parameter empty in instackenv.json file.
2. Try to import the node information from file. 
3. it's getting failed with below error.

~~~
$ openstack baremetal import --json ~/instackenv.json
The following properties for node 262779b3-4e43-4610-9648-1ec3157c8556 should be non-negative integers, but provided values are: local_gb=, cpus=, memory_mb= (HTTP 400)
~~~

Actual results:
It's not able to import the node into ironic DB.

Expected results:
It should allow us to do it because same was working fine with OSP 8.

Additional info:

Easily reproducible in test lab. 

If we are going to remove the option parameters or giving random value for optional parameters then import is working fine.

Comment 2 Lucas Alvares Gomes 2016-09-20 12:14:59 UTC
Thanks for reporting.

The "openstack baremetal import" command is part of the TripleO project, it's basically a wrapper that uses the Ironic CLI/API to import enroll nodes in Ironic. I'm changing the component to python-tripleoclient where this OSC command lives.

Comment 3 Dmitry Tantsur 2016-10-17 09:08:11 UTC
Hi! "Keep empty" sounds suspicious, empty strings are NOT expected to be allowed there. I've tried with these keys completely missing, and it works fine in OSP 10. IIRC setting them to null also works.