Create scaling policy does not fail if invalid adjustment type is given

Bug #1789488 reported by Duc Truong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Duc Truong

Bug Description

When creating a scaling policy with an invalid adjustment type, the policy creation succeeds without warning the user that anything is wrong.

Scaling policy file:
type: senlin.policy.scaling
version: 1.0
properties:
  event: CLUSTER_SCALE_IN
  adjustment:
    type: blah

It is expected that the policy creation should fail and return an appropriate error message to the user.

Duc Truong (dtruong)
Changed in senlin:
status: New → In Progress
assignee: nobody → Duc Truong (dtruong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/597225
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=8a2fd8d284e3fd50d9d6aeb5f80e3bb715f80837
Submitter: Zuul
Branch: master

commit 8a2fd8d284e3fd50d9d6aeb5f80e3bb715f80837
Author: Duc Truong <email address hidden>
Date: Tue Aug 28 00:24:50 2018 +0000

    Fix broken schema validation

    - Add call to validate value in resolve_value. This way all the
      children in a map will be validated.
    - Remove explicit check of string type in String validation since
      everything could be considered a string. This is needed because the
      version is now being validated and we allow version to be a float or
      string.

    Closes-Bug: 1789488
    Change-Id: I6b1470c7d67fb87497fd3980c0d6e00b8ab50ab1

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/611386

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (stable/rocky)

Reviewed: https://review.openstack.org/611386
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=45ea66a9e2bf42c771d708b215c90c4fe00fe927
Submitter: Zuul
Branch: stable/rocky

commit 45ea66a9e2bf42c771d708b215c90c4fe00fe927
Author: Duc Truong <email address hidden>
Date: Tue Aug 28 00:24:50 2018 +0000

    Fix broken schema validation

    - Add call to validate value in resolve_value. This way all the
      children in a map will be validated.
    - Remove explicit check of string type in String validation since
      everything could be considered a string. This is needed because the
      version is now being validated and we allow version to be a float or
      string.

    Closes-Bug: 1789488
    Change-Id: I6b1470c7d67fb87497fd3980c0d6e00b8ab50ab1
    (cherry picked from commit 8a2fd8d284e3fd50d9d6aeb5f80e3bb715f80837)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 7.0.0.0b1

This issue was fixed in the openstack/senlin 7.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin rocky-eol

This issue was fixed in the openstack/senlin rocky-eol release.

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.