bad error response from system host-backend-modify operations

Bug #1842945 reported by Wendy Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Tingjie Chen

Bug Description

Brief Description
-----------------
Bad response message on system storage-backend-modify operations

Severity
--------
Low

Steps to Reproduce
------------------
1. Install only controller-0 ( config_controller)
2. As platform admin list the storage-backend to confirm backend ceph with replication and min_replication capabilities has been added,
task state is "provision-storage"
$ system storage-backend-list
3. Attempt to modify the replication and min_replication values for the backend ceph-store (negative scenarios)

a. attempt setting both values to the same
$ system storage-backend-modify ceph-store replication=3 min_replication=3

'replication'

b. attempt setting min_replication value to something less than 2 or an empty value
$ system storage-backend-modify ceph-store replication=3 min_replication=1
'replication'
$ system storage-backend-modify ceph-store replication=3 min_replication=<emptycharacter>

'replication'

c. attempt to specify a value for the replication that is not an integer
$ system storage-backend-modify ceph-store replication=ddd min_replication=2

invalid literal for int() with base 10: 'ddd'

Expected Behavior
------------------
Better response messages in each scenario

Actual Behavior
----------------
see step 3 above (bad error response messages)

Reproducibility
---------------
yes

System Configuration
--------------------
storage config (2+2+x)

Branch/Pull Time/Commit
-----------------------
2019-09-04_00-10-00

Last Pass
---------

Timestamp/Logs
--------------

Test Activity
-------------

Revision history for this message
Wendy Mitchell (wmitchellwr) wrote :
Revision history for this message
Wendy Mitchell (wmitchellwr) wrote :

Here is an additional scenario where there is a bad error message returned:
hw (ironpass 20-27)
1. 2 controllers installed (unlocked, enabled and available)
Note: The following command was used to set the replication factory (after install of controller-0)
$system storage-backend-modify <name> replication=3 min_replication=1
2. Attempt system storage-backend-modify operation to update the min_replication value to 2
(before or after controller-1 has been installed)

Result:
inadequate error message returned as follows:
$ system storage-backend-modify ceph-store replication=3 min_replication=2
'replication'

Revision history for this message
Wendy Mitchell (wmitchellwr) wrote :

ERROR wsme.api [-] Server-side error: "'replication'". Detail:
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 85, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib64/python2.7/site-packages/sysinv/api/controllers/v1/storage_ceph.py", line 336, in patch
    return _patch(storceph_uuid, patch)

  File "/usr/lib64/python2.7/site-packages/sysinv/api/controllers/v1/storage_ceph.py", line 1324, in _patch
    _check_replication_number(new_cap, orig_cap)

  File "/usr/lib64/python2.7/site-packages/sysinv/api/controllers/v1/storage_ceph.py", line 973, in _check_replication_number
    if int(new_cap[constants.CEPH_BACKEND_REPLICATION_CAP]) < \

KeyError: 'replication'

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as stx.3.0 / medium priority - inaccurate error msg / would be nice to fix

tags: added: stx.3.0 stx.config stx.storage
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Cindy Xie (xxie1)
Cindy Xie (xxie1)
Changed in starlingx:
assignee: Cindy Xie (xxie1) → Tingjie Chen (silverhandy)
Changed in starlingx:
status: Triaged → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

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

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

Reviewed: https://review.opendev.org/685197
Committed: https://git.openstack.org/cgit/starlingx/config/commit/?id=af6e0dad4b541e0ce1b4f927c840ae2a4b2ebbce
Submitter: Zuul
Branch: master

commit af6e0dad4b541e0ce1b4f927c840ae2a4b2ebbce
Author: Chen, Tingjie <email address hidden>
Date: Fri Sep 27 13:31:39 2019 +0800

    Resolve the key error in check_replication_number

    Closes-Bug: 1842945
    Change-Id: I8362ccbadb74d5a53fae2405c1dbc31673e3af19
    Signed-off-by: Chen, Tingjie <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
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.