Bug 1348685 - Fusor OpenStack api allows node registration with null value for ssh address of kvm host
Summary: Fusor OpenStack api allows node registration with null value for ssh address ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: fusor-server
Version: 1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ga
: 1.0
Assignee: cchase
QA Contact: Landon LaSmith
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-21 18:51 UTC by Landon LaSmith
Modified: 2016-09-13 16:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-13 16:30:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1862 0 normal SHIPPED_LIVE Red Hat Quickstart Installer 1.0 2016-09-13 20:18:48 UTC

Description Landon LaSmith 2016-06-21 18:51:17 UTC
Description of problem: While deploying OSP+CFME on libvirt using the fusor api, I was able to register a node for introspection with a null value for the ssh_address. HTTP Response was 202


QCI Media ID: 1465833946.593534
QCIOOO Media ID: 1464125766.757794


How reproducible: 100%


Steps to Reproduce:
1. Create OSP deployment
2. Detect Undercloud
3. Issue fusor openstack api call to register a node with null ssh_address
POST https://X.X.X.X/fusor/api/openstack/deployments/<deployment_id>/nodes

{'node': {
  'driver': 'pxe_ssh',
  'properties': {
    'capabilities': 'boot_option:local'},
  'driver_info': {
    'ssh_username': 'root',
    'deploy_kernel': u'osp_kernel_uuid',
    'deploy_ramdisk': u'osp_ramdisk_uuid',
    'ssh_password': 'foobar',
    'ssh_virt_type': 'virsh',
    'ssh_address': None},
  'address': '01:23:45:67:89:AB'}}

Actual results: Response is 202 and a foreman task is created that fails.


Expected results: Response 400 with the text specifying that the ssh_address is empty.

Additional info: The api should follow the same validation used in the WebUI that requires the user to input host address, username/password and mac address in the proper format

Comment 6 cchase 2016-07-29 20:57:06 UTC
https://github.com/fusor/fusor/pull/1112

validated fields for api calls to register nodes.  If any field is missing you should receive an error with status 422.

Comment 7 John Matthews 2016-08-05 17:20:51 UTC
Will be in compose 8/5

Comment 8 Landon LaSmith 2016-08-11 21:43:01 UTC
VERIFIED. Node registration with an null ssh address returned 422 with error text "driver_info[:ssh_address]: Node must specify an IP address for ssh"

QCI Iso Version: QCI-1.0-RHEL-7-20160809.t.1
QCIOOO Iso Version: QCIOOO-8.0-RHEL-7-20160806.t.0

Comment 10 errata-xmlrpc 2016-09-13 16:30:03 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/RHEA-2016:1862


Note You need to log in before you can comment on or make changes to this bug.