Replication methods return 500 status code on missing host

Bug #1641714 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

Current code has no check for the host field in any of the replication endpoints (failover_host, freeze, and thaw) so a call to any of these methods without the required host field will result in a KeyError exception and a 500 code being returned to the caller.

Gorka Eguileor (gorka)
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/397357

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/397357
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=57bd024fcfca5ea8827799480d62dcb3c5de01e2
Submitter: Jenkins
Branch: master

commit 57bd024fcfca5ea8827799480d62dcb3c5de01e2
Author: Gorka Eguileor <email address hidden>
Date: Mon Nov 7 12:03:07 2016 +0100

    Add host check on replication actions

    Current code has no check for the host field in any of the replication
    endpoints (failover_host, freeze, and thaw) so a call to any of these
    methods without the required host field will result in a KeyError
    exception and a 500 code being returned to the caller.

    This patch fixes this by returning expected 400 invalid error, just like
    any other action does.

    It also adds missing replication tests for contrib/services.py.

    Closes-Bug: #1641714
    Change-Id: Icf5b1277179dc7e40f53524233d57ea2e399755a

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

This issue was fixed in the openstack/cinder 10.0.0.0b2 development milestone.

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.