we should return FAILED status when we create an audit with unspecified parameters

Bug #1599879 reported by David TARDIVEL on 2016-07-07
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
watcher
Medium
Jinquan Ni

Bug Description

openstack) optimize audit create -a at2 -p param1=5.5 -p param2=bye
+---------------------+------------------------------------------------------------------------+
| Field | Value |
+---------------------+------------------------------------------------------------------------+
| UUID | 06bd5ef5-47b4-4383-bcec-afb2da060077 |
| Created At | 2016-07-07T14:03:42.605742+00:00 |
| Updated At | None |
| Deleted At | None |
| Deadline | None |
| State | PENDING |
| Audit Type | ONESHOT |
| Audit Template uuid | 05caa95f-8635-4358-a7a4-fd1c4e37e43e |
| Audit Template Name | at2 |
| Parameters | {u'para2': u'hello', u'para1': 3.2, u'param2': u'bye', u'param1': 5.5} |
+---------------------+------------------------------------------------------------------------+

param2 and param1 are not specified parameters for this strategy. So we should return a FAILED status to notify the admin user.

(openstack) optimize strategy list --detail --format json
[
  {
    "Parameters spec": {
      "properties": {
        "para2": {
          "default": "hello",
          "type": "string",
          "description": "string parameter example"
        },
        "para1": {
          "default": 3.2,
          "minimum": 1.0,
          "type": "number",
          "description": "number parameter example",
          "maximum": 10.2
        }
      }
    },
    "Display name": "Dummy strategy",
    "Goal": "dummy",
    "UUID": "7483bef0-607e-4db5-b3e8-b908f73d13ee",
    "Name": "dummy"
  },

description: updated
Jinquan Ni (ni-jinquan) on 2016-07-08
Changed in watcher:
assignee: nobody → Jinquan Ni (ni-jinquan)

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

Changed in watcher:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/359818
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=1fafcc5ef1cfacac124e1111174df299c39deac9
Submitter: Jenkins
Branch: master

commit 1fafcc5ef1cfacac124e1111174df299c39deac9
Author: jinquanni <email address hidden>
Date: Wed Aug 24 20:04:10 2016 +0800

    Check unspecified parameters create audit

    Currently, create audit with unspecified parameters will success.
    This is not reasonable, we shoud return a FAILED status to
    notify the admin user.

    Change-Id: Ifbcb3b8d9e736607b05b1eb408ec0f41bdf58a2f
    Closes-Bug: #1599879

Changed in watcher:
status: In Progress → Fix Released

This issue was fixed in the openstack/watcher 0.29.0 release.

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

Other bug subscribers