3par iscsi host creation fails while querying host using iqn

Bug #1590180 reported by Jay Mehta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Jay Mehta

Bug Description

iscsi host creation first searches existing host using iqn. This search is done by querying queryHost() which accepts a list of iqn.

The iscsi_iqn argument from _create_3par_iscsi_host() can be string or list type. And this is passed to queryHost() without checking & converting to list, if it is in string.

This type checking and type conversion logic is already implemented. But after queryHost() which would cause failure in queryHost().

This can be fixed by repositioning data type conversion of formal parameter 'iscsi_iqn' in _create_3par_iscsi_host() before its first use as argument to queryHost().

Tags: 3par drivers
Jay Mehta (jay-mehta)
Changed in cinder:
assignee: nobody → Jay Mehta (jay-mehta)
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/317763
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7a066eb71e7e9a12050506af26596ababdc28148
Submitter: Jenkins
Branch: master

commit 7a066eb71e7e9a12050506af26596ababdc28148
Author: Jay Mehta <email address hidden>
Date: Tue May 17 16:05:25 2016 -0700

    Fixed _create_3par_iscsi_host(), added unit test for 3PAR

    Updated signature of _create_3par_iscsi_host(), formal parameter
    'iscsi_iqn' now only accepts list. Its only caller _create_host()
    will convert always a single string only iscsi_iqn to list.
    Updated 3PAR ISCSI driver version number to 3.0.11.

    Covered negative scenarios with below unit tests:
    1. Added new test_create_host_chap_enabled_and_host_without_chap_cred()
    to cover case:
    * create_host() when CHAP is enabled and host is w/o CHAP creds
    2. Added test_terminate_connection_for_clear_chap_creds_not_found()
    to cover case:
    * clear CHAP USER KEY and PASS KEY fails with HTTPNotFound
    3. Added test_terminate_connection_for_clear_chap_user_key_bad_request()
    to cover case:
    * clear CHAP USER KEY fails with HTTPBadRequest
    4. Added test_terminate_connection_for_clear_chap_pass_key_bad_request()
    to cover case:
    * clear CHAP PASS KEY fails with HTTPBadRequest

    Closes-Bug: #1590180
    Change-Id: I5cea392d482aa34b66b925010e554c12e43463e5

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b2

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (driverfixes/mitaka)

Fix proposed to branch: driverfixes/mitaka
Review: https://review.openstack.org/531795

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (driverfixes/mitaka)

Change abandoned by Govardhan Chintha (<email address hidden>) on branch: driverfixes/mitaka
Review: https://review.openstack.org/531795

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sean McGinnis (<email address hidden>) on branch: driverfixes/mitaka
Review: https://review.openstack.org/531795

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.