Bug 1417215 - inappropriate value type in json communication to openstack liberty during provisioning
Summary: inappropriate value type in json communication to openstack liberty during pr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: All
OS: All
high
high
Target Milestone: MVP
: 5.10.0
Assignee: Alexander Demicev
QA Contact: Danylo Kholodov
URL:
Whiteboard: openstack
Depends On:
Blocks: 1555371 1584677
TreeView+ depends on / blocked
 
Reported: 2017-01-27 14:56 UTC by Felix Dewaleyne
Modified: 2020-02-14 18:31 UTC (History)
9 users (show)

Fixed In Version: 5.10.0.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:02:18 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:02:27 UTC

Description Felix Dewaleyne 2017-01-27 14:56:41 UTC
Description of problem:
inappropriate value type in json communication to openstack liberty during provisioning

Version-Release number of selected component (if applicable):
5.7.0.17-1
openstack liberty

How reproducible:
customer environment

Steps to Reproduce:
1.provision against the provider
2.
3.

Actual results:
   [----] E, [2017-01-26T19:17:42.998746 #13173:af1130] ERROR -- : Q-task_id([miq_provision_21000000000214]) excon.error     #<Excon::Error::InternalServerError: Expected([200, 202]) <=> Actual(500 InternalServerError)
    excon.error.response
      :body          => "{\"computeFault\": {\"message\": \"Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\\n<type 'exceptions.ValueError'>\", \"code\": 500}}"

Expected results:
data in the correct form for the openstack instance

Additional info:
it seems CF creates the following json to boot an instance from a pre-created volume. The issue is that volume_size is an int and fails on nova api. But since this is a pre-created volume the size should not be specified at all.

    # cat tmp/new_server.post002.json
    {
      "server": {
        "flavorRef": "1001",
        "name": "isblcsrheld0050",
        "availability_zone": "CANS-2",
        "security_groups": [

        ],
        "networks": [
          {
            "uuid": "7d7c2207-4307-4355-b0a5-561b2a995148"
          },
          {
            "uuid": "c572d47c-8cfb-44bd-a76f-02b2ebe58427"
          }
        ],
        "block_device_mapping_v2": [
          {
            "boot_index": 0,
            "delete_on_termination": false,
            "destination_type": "volume",
            "source_type": "volume",
            "uuid": "96dada81-15c1-42b6-b921-9e8d023b8bde",
            "volume_size": ""
          },
          {
            "boot_index": 1,
            "delete_on_termination": false,
            "destination_type": "volume",
            "source_type": "volume",
            "uuid": "42f2ceae-bc3d-4ddc-86d8-29e2ee1841c4",
            "volume_size": ""
          }
        ]
      }
    }


Same can be reproduced
# nova --debug boot --flavor m1.small --block-device source=volume,id=251fbaa4-9717-4c07-90ea-8369d0b14603,dest=volume,size=,shutdown=false,bootindex=0 --nic net-id=765bdb5a-db96-4701-b2d3-70a414695153 my-testvm

Result is the 500 

In newer OSP9 release we do not receive a 500, but still input validation fails with:
BadRequest: Invalid input for field/attribute volume_size. Value: . u'' does not match '^[0-9]+$' (HTTP 400) (Request-ID: req-eb576670-6707-4338-970a-2904cf1ae920)
ERROR (BadRequest): Invalid input for field/attribute volume_size. Value: . u'' does not match '^[0-9]+$' (HTTP 400) (Request-ID: req-eb576670-6707-4338-970a-2904cf1ae920)

Comment 4 Dave Johnson 2017-07-14 03:50:26 UTC
Please assess the importance of this issue and update the priority accordingly.  Somewhere it was missed in the bug triage process.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#priority for a reminder on each priority's definition.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.

Comment 11 Danylo Kholodov 2018-11-27 12:00:13 UTC
Verified at CFME 5.10.0.24

Comment 13 errata-xmlrpc 2019-02-07 23:02:18 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-2019:0212


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