From 647dd28d1cb39ea16272ff13616d2bdfe62f4ede Mon Sep 17 00:00:00 2001 From: Lachlan Plant Date: Thu, 23 Aug 2018 13:31:24 -0500 Subject: [PATCH] Fix tox linters for zuul Fix bashate and yamllint to only run if files are provided Fix whitespace errors in fm-doc/fm_doc/events.yaml Relax line length requirement in yamllint Story: 2003361 Task: 24413 Change-Id: I097beeea4a2e36790ba0de7d9c4fb6dcb55c24a6 Signed-off-by: Lachlan Plant --- fm-doc/fm_doc/events.yaml | 220 +++++++++++++++++++------------------- tox.ini | 4 +- 2 files changed, 111 insertions(+), 113 deletions(-) diff --git a/fm-doc/fm_doc/events.yaml b/fm-doc/fm_doc/events.yaml index 87c09c9f..399e3665 100755 --- a/fm-doc/fm_doc/events.yaml +++ b/fm-doc/fm_doc/events.yaml @@ -57,7 +57,7 @@ # Management_Affecting_Severity: < none | critical | major | minor | warning > # // lowest alarm level of this type that will block forced upgrades & orchestration actions # Degrade_Affecting_Severity: < none | critical | major | minor > -# // lowest alarm level of this type sets a host to 'degraded' +# // lowest alarm level of this type sets a host to 'degraded' # # # Other Notes: @@ -95,7 +95,7 @@ MAJOR @ 90% MINOR @ 80% Entity_Instance_ID: host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -116,7 +116,7 @@ MAJOR @ 90% MINOR @ 80% Entity_Instance_ID: host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -137,7 +137,7 @@ MAJOR @ 80% MINOR @ 70% Entity_Instance_ID: host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support; may require additional memory on Host." Maintenance_Action: critical: degrade @@ -165,7 +165,7 @@ host=.filesystem= OR host=.volumegroup= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -205,7 +205,7 @@ OR 'OAM' Interface failed. Entity_Instance_ID: host=.interface= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: critical: degrade @@ -240,7 +240,7 @@ OR 'MGMT' Interface failed. Entity_Instance_ID: host=.interface= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: critical: degrade @@ -275,7 +275,7 @@ OR 'INFRA' Interface failed. Entity_Instance_ID: host=.interface= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: critical: degrade @@ -310,7 +310,7 @@ OR 'DATA-VRS' Interface down. Entity_Instance_ID: host=.interface= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: major: degrade @@ -330,7 +330,7 @@ Entity_Instance_ID: major: host=.ntp minor: host=.ntp= - Severity: [ major, minor ] + Severity: [major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: none Inhibit_Alarms: @@ -345,7 +345,7 @@ Type: Alarm Description: "VSwitch Memory Usage, processor threshold exceeded; threshold x%, actual y% ." Entity_Instance_ID: host=.processor= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -362,7 +362,7 @@ Type: Alarm Description: "Cinder LVM Thinpool Usage threshold exceeded; threshold x%, actual y% ." Entity_Instance_ID: host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -379,7 +379,7 @@ Type: Alarm Description: "Nova LVM Thinpool Usage threshold exceeded; threshold x%, actual y% ." Entity_Instance_ID: host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "Monitor and if condition persists, contact next level of support." Maintenance_Action: critical: degrade @@ -394,7 +394,7 @@ 100.118: Type: Alarm - Description: Controller cannot establish connection with remote logging server. + Description: Controller cannot establish connection with remote logging server. Entity_Instance_ID: host= Severity: minor Proposed_Repair_Action: "Ensure Remote Log Server IP is reachable from Controller through OAM interface; otherwise contact next level of support." @@ -513,7 +513,7 @@ Failure: is experiencing a persistent critical 'Management Network' communication failure." Entity_Instance_ID: host= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: "Check 'Management Network' connectivity and support for multicast messaging. If problem consistently occurs after that and Host is reset, then contact next level of support or lock and replace failing host." Maintenance_Action: auto recover Inhibit_Alarms: False @@ -533,7 +533,7 @@ Failure: is experiencing a persistent critical 'Infrastructure Network' communication failure." Entity_Instance_ID: host= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: "Check 'Infrastructure Network' connectivity and support for multicast messaging. If problem consistently occurs after that and Host is reset, then contact next level of support or lock and replace failing host." Maintenance_Action: auto recover Inhibit_Alarms: False @@ -559,7 +559,7 @@ OR '' process has failed. Manual recovery is required. Entity_Instance_ID: host=.process= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: |- If this alarm does not automatically clear after some time and continues to be asserted after Host is locked and unlocked then contact next level of support for root cause analysis and recovery. @@ -604,10 +604,10 @@ Type: Alarm Description: critical: "Host is degraded due to a 'critical' out-of-tolerance reading from the '' sensor" - major: "Host is degraded due to a 'major' out-of-tolerance reading from the '' sensor" - minor: "Host is reporting a 'minor' out-of-tolerance reading from the '' sensor" + major: "Host is degraded due to a 'major' out-of-tolerance reading from the '' sensor" + minor: "Host is reporting a 'minor' out-of-tolerance reading from the '' sensor" Entity_Instance_ID: host=.sensor= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: "If problem consistently occurs after Host is power cycled and or reset, contact next level of support or lock and replace failing host." Maintenance_Action: critical: degrade @@ -657,14 +657,14 @@ 200.020: Type: Log - Description: [ " has been 'discovered' on the network", - " has been 'added' to the system", - " has 'entered' multi-node failure avoidance", - " has 'exited' multi-node failure avoidance" ] - Entity_Instance_ID: [ host=.event=discovered, - host=.event=add, - host=.event=mnfa_enter, - host=.event=mnfa_exit ] + Description: [" has been 'discovered' on the network", + " has been 'added' to the system", + " has 'entered' multi-node failure avoidance", + " has 'exited' multi-node failure avoidance"] + Entity_Instance_ID: [host=.event=discovered, + host=.event=add, + host=.event=mnfa_enter, + host=.event=mnfa_exit] Severity: warning Alarm_Type: other Probable_Cause: unspecified-reason @@ -673,30 +673,30 @@ 200.021: Type: Log - Description: [ " board management controller has been 'provisioned'", - " board management controller has been 're-provisioned'", - " board management controller has been 'de-provisioned'", - " manual 'unlock' request", - " manual 'reboot' request", - " manual 'reset' request", - " manual 'power-off' request", - " manual 'power-on' request", - " manual 'reinstall' request", - " manual 'force-lock' request", - " manual 'delete' request", - " manual 'controller switchover' request" ] - Entity_Instance_ID: [ host=.command=provision, - host=.command=reprovision, - host=.command=deprovision, - host=.command=unlock, - host=.command=reboot, - host=.command=reset, - host=.command=power-off, - host=.command=power-on, - host=.command=reinstall, - host=.command=force-lock, - host=.command=delete, - host=.command=swact ] + Description: [" board management controller has been 'provisioned'", + " board management controller has been 're-provisioned'", + " board management controller has been 'de-provisioned'", + " manual 'unlock' request", + " manual 'reboot' request", + " manual 'reset' request", + " manual 'power-off' request", + " manual 'power-on' request", + " manual 'reinstall' request", + " manual 'force-lock' request", + " manual 'delete' request", + " manual 'controller switchover' request"] + Entity_Instance_ID: [host=.command=provision, + host=.command=reprovision, + host=.command=deprovision, + host=.command=unlock, + host=.command=reboot, + host=.command=reset, + host=.command=power-off, + host=.command=power-on, + host=.command=reinstall, + host=.command=force-lock, + host=.command=delete, + host=.command=swact] Severity: warning Alarm_Type: other Probable_Cause: unspecified-reason @@ -705,20 +705,20 @@ 200.022: Type: Log - Description: [ " is now 'disabled'", - " is now 'enabled'", - " is now 'online'", - " is now 'offline'", - " is 'disabled-failed' to the system", - " reinstall failed", - " reinstall completed successfully"] - Entity_Instance_ID: [ host=.state=disabled, - host=.state=enabled, - host=.status=online, - host=.status=offline, - host=.status=failed, - host=.status=reinstall-failed, - host=.status=reinstall-complete ] + Description: [" is now 'disabled'", + " is now 'enabled'", + " is now 'online'", + " is now 'offline'", + " is 'disabled-failed' to the system", + " reinstall failed", + " reinstall completed successfully"] + Entity_Instance_ID: [host=.state=disabled, + host=.state=enabled, + host=.status=online, + host=.status=offline, + host=.status=failed, + host=.status=reinstall-failed, + host=.status=reinstall-complete] Severity: warning Alarm_Type: other Probable_Cause: unspecified-reason @@ -857,7 +857,7 @@ 280.002: Type: Alarm - Description: sync_status is out-of-sync + Description: sync_status is out-of-sync Entity_Instance_ID: [subcloud=.resource=] Severity: major Proposed_Repair_Action: If problem persists contact next level of support @@ -898,7 +898,7 @@ OR 'Data' Interface failed. Entity_Instance_ID: host=.interface= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: Inhibit_Alarms: @@ -1007,7 +1007,7 @@ OR One or more Openflow controller connections in disconnected state for this network. Entity_Instance_ID: host=.openflow-network= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: Check cabling and far-end port configuration and status on adjacent equipment. Maintenance_Action: Inhibit_Alarms: @@ -1079,7 +1079,7 @@ OR Service group warning; . Entity_Instance_ID: service_domain=.service_group=.host= - Severity: [ critical, major, minor ] + Severity: [critical, major, minor] Proposed_Repair_Action: Contact next level of support. Maintenance_Action: Inhibit_Alarms: False @@ -1281,7 +1281,6 @@ Service_Affecting: False - #--------------------------------------------------------------------------- # VM #--------------------------------------------------------------------------- @@ -2610,7 +2609,7 @@ Storage Alarm Condition: 1 mons down, quorum 1,2 controller-1,storage-0 Entity_Instance_ID: cluster= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: "If problem persists, contact next level of support." Maintenance_Action: Inhibit_Alarms: @@ -2628,7 +2627,7 @@ Description: |- Potential data loss. No available OSDs in storage replication group. Entity_Instance_ID: cluster=.peergroup= - Severity: [ critical ] + Severity: [critical] Proposed_Repair_Action: "Ensure storage hosts from replication group are unlocked and available. Check if OSDs of each storage host are up and running. If problem persists contact next level of support." @@ -2647,7 +2646,7 @@ Description: |- Loss of replication in peergroup. Entity_Instance_ID: cluster=.peergroup= - Severity: [ major ] + Severity: [major] Proposed_Repair_Action: "Ensure storage hosts from replication group are unlocked and available. Check if OSDs of each storage host are up and running. If problem persists contact next level of support." @@ -2663,39 +2662,39 @@ 800.002: Type: Alarm - Description: [ "Image storage media is full: There is not enough disk space on the image storage media.", - "Instance snapshot failed: There is not enough disk space on the image storage media.", - "Supplied () and generated from uploaded image () did not match. Setting image status to 'killed'.", - "Error in store configuration. Adding images to store is disabled.", - "Forbidden upload attempt: ", - "Insufficient permissions on image storage media: ", - "Denying attempt to upload image larger than bytes.", - "Denying attempt to upload image because it exceeds the quota: ", - "Received HTTP error while uploading image ", - "Client disconnected before sending all data to backend", - "Failed to upload image " ] - Entity_Instance_ID: [ "image=, instance=", - "tenant=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=", - "image=, instance=" ] - Alarm_Type: [ physical-violation, - physical-violation, - integrity-violation, - integrity-violation, - security-service-or-mechanism-violation, - security-service-or-mechanism-violation, - security-service-or-mechanism-violation, - security-service-or-mechanism-violation, - communication, - communication, - operational-violation ] + Description: ["Image storage media is full: There is not enough disk space on the image storage media.", + "Instance snapshot failed: There is not enough disk space on the image storage media.", + "Supplied () and generated from uploaded image () did not match. Setting image status to 'killed'.", + "Error in store configuration. Adding images to store is disabled.", + "Forbidden upload attempt: ", + "Insufficient permissions on image storage media: ", + "Denying attempt to upload image larger than bytes.", + "Denying attempt to upload image because it exceeds the quota: ", + "Received HTTP error while uploading image ", + "Client disconnected before sending all data to backend", + "Failed to upload image "] + Entity_Instance_ID: ["image=, instance=", + "tenant=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance=", + "image=, instance="] + Alarm_Type: [physical-violation, + physical-violation, + integrity-violation, + integrity-violation, + security-service-or-mechanism-violation, + security-service-or-mechanism-violation, + security-service-or-mechanism-violation, + security-service-or-mechanism-violation, + communication, + communication, + operational-violation] Severity: warning Proposed_Repair_Action: Maintenance_Action: @@ -2768,7 +2767,7 @@ Storage Alarm Condition: PV configuration on . Reason: . Entity_Instance_ID: pv= - Severity: [ critical, major ] + Severity: [critical, major] Proposed_Repair_Action: "Remove failed PV and associated Storage Device then recreate them." Maintenance_Action: Inhibit_Alarms: @@ -2776,7 +2775,7 @@ Probable_Cause: configuration-or-customization-error Service_Affecting: True Suppression: False - Management_Affecting_Severity: major + Management_Affecting_Severity: major Degrade_Affecting_Severity: none 800.103: @@ -2796,7 +2795,7 @@ Probable_Cause: threshold-crossed Service_Affecting: False Suppression: False - Management_Affecting_Severity: major + Management_Affecting_Severity: major Degrade_Affecting_Severity: none 800.104: @@ -2819,7 +2818,6 @@ Degrade_Affecting_Severity: none - #--------------------------------------------------------------------------- # SOFTWARE #--------------------------------------------------------------------------- diff --git a/tox.ini b/tox.ini index 932e6fee..4975053b 100644 --- a/tox.ini +++ b/tox.ini @@ -21,12 +21,12 @@ commands = -not -name \*~ \ -not -name \*.md \ -name \*.sh \ - -print0 | xargs -0 bashate -v" + -print0 | xargs --no-run-if-empty -0 bashate -v" bash -c "find {toxinidir} \ \( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \ -o \( -name .tox -prune \) \ -o -type f -name '*.yaml' \ - -print0 | xargs -0 yamllint" + -print0 | xargs -0 yamllint -d '\{extends: relaxed, rules: \{line-length: \{max: 120\}\}\}'" #### # Add flake8 as pep8 codestyle check.