Tempest tests passing wrong request body to compute action API.

Bug #1836187 reported by Ghanshyam Mann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Ghanshyam Mann

Bug Description

Most of the compute Action API accept request body with action name and null value. For exmaple: {'unshelve': null}.

But Tempest pass the empty dict instead of null- {'unshelve': {}}. This is the wrong usage of API. This does not give any error as Compute API does not check the value is null or anything else. Nova does not have schema also for those request bodies. Those request body are used to call the corresponding API action only.

Let's fix this wrong usage and pass the correct null value there.

- https://developer.openstack.org/api-ref/compute/?expanded=unshelve-restore-shelved-server-unshelve-action-detail#unshelve-restore-shelved-server-unshelve-action

Changed in tempest:
status: New → Triaged
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/670287

Changed in tempest:
status: Triaged → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :

what is the status here? .. btw, isn't the null in doc meant to be None in python?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/670287
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=cbf480ffa2933daf1ee736229fd0151ec239b92a
Submitter: Zuul
Branch: master

commit cbf480ffa2933daf1ee736229fd0151ec239b92a
Author: Ghanshyam <email address hidden>
Date: Thu Jul 11 11:53:57 2019 +0000

    Fix request body for compute unshelve action API

    Compute unshelve action API accept request body with
    action name and null value. For exmaple: {'unshelve': null}.
    But Tempest pass the empty dict instead of null- {'unshelve': {}}.
    This works fine till 2.77 microversionbut after that nova
    started rejecting the empty dict {}.

    Defaulting the request body to None so that it works for older
    as well newer microversion.

    Closes-Bug: #1836187

    - https://developer.openstack.org/api-ref/compute/?expanded=unshelve-restore-shelved-server-unshelve-action-detail#unshelve-restore-shelved-server-unshelve-action

    Change-Id: I5b4be77d5ae88aedf6fd700e34a293064e655ba8

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 25.0.1

This issue was fixed in the openstack/tempest 25.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.