Build 2738: Invalid alarm configuration should not be allowed

Bug #1599733 reported by Ankit Jain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Won't Fix
High
Sundaresan Rajangam
Trunk
Fix Committed
High
Sundaresan Rajangam

Bug Description

I tried couple of invalid configurations mentioned below and was able to generate alarm configuration successfully.

Configuring invalid severity:
Out of range 10 -> accepted
String : 'abc' -> accepted

----
parent_type: "global-system-config",
alarm_severity: "abc",
perms2: {
owner: "b783d71593a54f748f681a1e9a86fef1",
owner_access: 7,
global_access: 0,
share: [ ]

Configuring invalid uve keys :

uve_keys: [
"abc",
"abc"
],
name: "my-type1"
}

information type: Proprietary → Public
Changed in juniperopenstack:
importance: Undecided → Medium
Revision history for this message
Ankit Jain (ankitja) wrote :

I think this should also not be allowed :

When uve_keys: [
"analytics-node",
"control-node"
] and parent obj is of type 'project'

Please check

alarm: {
display_name: "test3",
uuid: "66c56bd1-b547-4870-ad2a-dbb184013968",
alarm_rules: {
or_list: [
{
and_list: [
{
operation: "!=",
operand1: "NodeStatus.process_info.process_state",
vars: [
"NodeStatus.process_info.process_name"
],
operand2: ""PROCESS_STATE_RUNNING""
}
]
}
]
},
parent_uuid: "2768bf1f-0bff-4afa-bc39-c64ff229fdfb",
parent_href: "https://nodeg13:8143/proxy?proxyURL=http://10.204.217.53:9100/project/2768bf1f-0bff-4afa-bc39-c64ff229fdfb",
parent_type: "project",
alarm_severity: 2,
perms2: {},
href: "https://nodeg13:8143/proxy?proxyURL=http://10.204.217.53:9100/alarm/66c56bd1-b547-4870-ad2a-dbb184013968",
id_perms: {},
fq_name: [
"default-domain",
"admin",
"type3"
],
uve_keys: [
"analytics-node",
"control-node"
],
name: "type3"

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22115
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22123
Submitter: Sundaresan Rajangam (<email address hidden>)

Ankit Jain (ankitja)
tags: added: releasenote
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22115
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/23895
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/23895
Committed: http://github.org/Juniper/contrail-controller/commit/33a390913b43f961f1c6f8f96c760d32aa3de26a
Submitter: Zuul
Branch: master

commit 33a390913b43f961f1c6f8f96c760d32aa3de26a
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Sep 2 21:06:17 2016 -0700

Add validation for primitive types in api-server

Change-Id: Ib82e27d7c5c9aeb76f9345bc4d24bd1ef6c8dd52
Closes-Bug: #1599733

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.