Bug 1327203

Summary: 2.0: calamari is not responding to the API calls after incomplete crush rules were PATCHed
Product: Red Hat Ceph Storage Reporter: Harish NV Rao <hnallurv>
Component: CalamariAssignee: Christina Meno <gmeno>
Calamari sub component: Back-end QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ceph-eng-bugs, kdreyer, rgowdege
Version: 2.0   
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: RHEL: calamari-server-1.4.0-0.8.rc11.el7cp Ubuntu: calamari-server_1.4.0~rc11-2redhat1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 19:36:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
crush rule inputs none

Description Harish NV Rao 2016-04-14 12:42:12 UTC
Description of problem:

  Calamari-lite is not responding to the API calls after incomplete crush rules were PATCHed. /var/log/calamari/calamari.log shows: IndexError: list index out of range. Please see attached calamari.log.

Version-Release number of selected component (if applicable):10.1.1-1.el7cp

How reproducible:1/1

Steps to Reproduce:
1. PATCH an 'empty' crush rule using Django REST framework (2.3.12)
  -- This resulted in: Server Error (500)
2. GET crush rule.
  -- This worked fine
3. PATCH an 'incomplete' crush rule in which only "name" and "ruleset" are mentioned.
  -- This resulted in: Server Error (500)
4. GET crush rule.
  -- This worked fine
5. PATCH an 'incomplete' crush rule in which "steps" is incomplete.
  -- This failed with Server Error (500) 

Actual results:
As mentioned above

Expected results:
Should display appropriate error message

Additional info:
[root@magna013 calamari]# rpm -qa | grep calamari
[root@magna013 calamari]# rpm -qa | grep salt

Please see attached log files also.

Comment 2 Harish NV Rao 2016-04-14 12:43:32 UTC
Created attachment 1147233 [details]

Comment 3 Harish NV Rao 2016-04-14 12:45:00 UTC
Created attachment 1147236 [details]
crush rule inputs

Comment 4 Christina Meno 2016-05-17 19:28:39 UTC
*** Bug 1336451 has been marked as a duplicate of this bug. ***

Comment 5 Christina Meno 2016-05-17 19:30:12 UTC

needs testing and more tests written before pulling downstream

Comment 8 Harish NV Rao 2016-05-30 10:02:59 UTC
verified on calamari-server version 1.4.0~rc13-2redhat1xenial

Comment 10 errata-xmlrpc 2016-08-23 19:36:25 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.