Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
ea005fef
Commit
ea005fef
authored
Oct 01, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Don't append monitoring suffix, we have categories for this.
parent
d02bac34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
...tal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
+3
-3
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SoftwareInstallation_hasReportedError.py
...s_crm_monitoring/SoftwareInstallation_hasReportedError.py
+2
-2
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+11
-11
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
View file @
ea005fef
...
@@ -11,8 +11,8 @@ if project.Project_isSupportRequestCreationClosed():
...
@@ -11,8 +11,8 @@ if project.Project_isSupportRequestCreationClosed():
reference
=
context
.
getReference
()
reference
=
context
.
getReference
()
compute_node_title
=
context
.
getTitle
()
compute_node_title
=
context
.
getTitle
()
node_ticket_title
=
"
[MONITORING]
Lost contact with compute_node %s"
%
reference
node_ticket_title
=
"Lost contact with compute_node %s"
%
reference
instance_ticket_title
=
"
[MONITORING]
Compute Node %s has a stalled instance process"
%
reference
instance_ticket_title
=
"Compute Node %s has a stalled instance process"
%
reference
ticket_title
=
node_ticket_title
ticket_title
=
node_ticket_title
description
=
""
description
=
""
...
@@ -39,7 +39,7 @@ else:
...
@@ -39,7 +39,7 @@ else:
if
data_array
:
if
data_array
:
should_notify
=
True
should_notify
=
True
notification_message_reference
=
"slapos-crm-compute_node_check_modified_file.notification"
notification_message_reference
=
"slapos-crm-compute_node_check_modified_file.notification"
ticket_title
=
"
[MONITORING]
Compute Node %s has modified file"
%
reference
ticket_title
=
"Compute Node %s has modified file"
%
reference
issue_document_reference
=
data_array
.
getReference
()
issue_document_reference
=
data_array
.
getReference
()
description
=
"The Compute Node %s (%s) has modified file: %s"
%
(
compute_node_title
,
reference
,
issue_document_reference
)
description
=
"The Compute Node %s (%s) has modified file: %s"
%
(
compute_node_title
,
reference
,
issue_document_reference
)
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SoftwareInstallation_hasReportedError.py
View file @
ea005fef
...
@@ -30,7 +30,7 @@ if d.get("text").startswith("#building"):
...
@@ -30,7 +30,7 @@ if d.get("text").startswith("#building"):
return
last_contact
return
last_contact
should_notify
=
True
should_notify
=
True
ticket_title
=
"
[MONITORING]
%s is building for too long on %s"
%
(
reference
,
software_installation
.
getAggregateReference
())
ticket_title
=
"%s is building for too long on %s"
%
(
reference
,
software_installation
.
getAggregateReference
())
description
=
"The software release %s is building for mode them 12 hours on %s, started on %s"
%
\
description
=
"The software release %s is building for mode them 12 hours on %s, started on %s"
%
\
(
software_installation
.
getUrlString
(),
software_installation
.
getAggregateTitle
(),
software_installation
.
getCreationDate
())
(
software_installation
.
getUrlString
(),
software_installation
.
getAggregateTitle
(),
software_installation
.
getCreationDate
())
return
should_notify
,
ticket_title
,
description
,
last_contact
return
should_notify
,
ticket_title
,
description
,
last_contact
...
@@ -40,7 +40,7 @@ if d.get("text").startswith("#error"):
...
@@ -40,7 +40,7 @@ if d.get("text").startswith("#error"):
return
DateTime
(
d
.
get
(
'created_at'
))
return
DateTime
(
d
.
get
(
'created_at'
))
should_notify
=
True
should_notify
=
True
ticket_title
=
"
[MONITORING]
%s is failing to build on %s"
%
(
reference
,
software_installation
.
getAggregateReference
())
ticket_title
=
"%s is failing to build on %s"
%
(
reference
,
software_installation
.
getAggregateReference
())
description
=
"The software release %s is failing to build for too long on %s, started on %s"
%
\
description
=
"The software release %s is failing to build for too long on %s, started on %s"
%
\
(
software_installation
.
getUrlString
(),
software_installation
.
getAggregateTitle
(),
software_installation
.
getCreationDate
())
(
software_installation
.
getUrlString
(),
software_installation
.
getAggregateTitle
(),
software_installation
.
getCreationDate
())
return
should_notify
,
ticket_title
,
description
,
last_contact
return
should_notify
,
ticket_title
,
description
,
last_contact
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
ea005fef
...
@@ -1321,7 +1321,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1321,7 +1321,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node_support_request
=
compute_node
.
ComputeNode_checkState
()
compute_node_support_request
=
compute_node
.
ComputeNode_checkState
()
self
.
assertNotEqual
(
compute_node_support_request
,
None
)
self
.
assertNotEqual
(
compute_node_support_request
,
None
)
self
.
assertIn
(
"
[MONITORING]
Lost contact with compute_node"
,
self
.
assertIn
(
"Lost contact with compute_node"
,
compute_node_support_request
.
getTitle
())
compute_node_support_request
.
getTitle
())
self
.
assertIn
(
"has not contacted the server for more than 30 minutes"
,
self
.
assertIn
(
"has not contacted the server for more than 30 minutes"
,
compute_node_support_request
.
getDescription
())
compute_node_support_request
.
getDescription
())
...
@@ -1334,7 +1334,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1334,7 +1334,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node_support_request
=
compute_node
.
ComputeNode_checkState
()
compute_node_support_request
=
compute_node
.
ComputeNode_checkState
()
self
.
assertNotEqual
(
compute_node_support_request
,
None
)
self
.
assertNotEqual
(
compute_node_support_request
,
None
)
self
.
assertIn
(
"
[MONITORING]
Lost contact with compute_node"
,
self
.
assertIn
(
"Lost contact with compute_node"
,
compute_node_support_request
.
getTitle
())
compute_node_support_request
.
getTitle
())
self
.
assertIn
(
"has not contacted the server (No Contact Information)"
,
self
.
assertIn
(
"has not contacted the server (No Contact Information)"
,
compute_node_support_request
.
getDescription
())
compute_node_support_request
.
getDescription
())
...
@@ -1375,7 +1375,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1375,7 +1375,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node
.
ComputeNode_checkState
()
compute_node
.
ComputeNode_checkState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
Lost contact with compute_node %s"
%
compute_node
.
getReference
()
ticket_title
=
"Lost contact with compute_node %s"
%
compute_node
.
getReference
()
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
self
.
assertNotEqual
(
ticket
,
None
)
self
.
assertNotEqual
(
ticket
,
None
)
...
@@ -1413,7 +1413,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1413,7 +1413,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node
.
ComputeNode_checkState
()
compute_node
.
ComputeNode_checkState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
Lost contact with compute_node %s"
%
compute_node
.
getReference
()
ticket_title
=
"Lost contact with compute_node %s"
%
compute_node
.
getReference
()
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
self
.
assertNotEqual
(
ticket
,
None
)
self
.
assertNotEqual
(
ticket
,
None
)
event_list
=
ticket
.
getFollowUpRelatedValueList
()
event_list
=
ticket
.
getFollowUpRelatedValueList
()
...
@@ -1458,7 +1458,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1458,7 +1458,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node
.
ComputeNode_checkState
()
compute_node
.
ComputeNode_checkState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
Compute Node %s has a stalled instance process"
%
compute_node
.
getReference
()
ticket_title
=
"Compute Node %s has a stalled instance process"
%
compute_node
.
getReference
()
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
self
.
assertNotEqual
(
ticket
,
None
)
self
.
assertNotEqual
(
ticket
,
None
)
event_list
=
ticket
.
getFollowUpRelatedValueList
()
event_list
=
ticket
.
getFollowUpRelatedValueList
()
...
@@ -1504,7 +1504,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
...
@@ -1504,7 +1504,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
compute_node
.
ComputeNode_checkState
()
compute_node
.
ComputeNode_checkState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
Compute Node %s has a stalled instance process"
%
compute_node
.
getReference
()
ticket_title
=
"Compute Node %s has a stalled instance process"
%
compute_node
.
getReference
()
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
ticket
=
self
.
_getGeneratedSupportRequest
(
compute_node
.
getUid
(),
ticket_title
)
self
.
assertNotEqual
(
ticket
,
None
)
self
.
assertNotEqual
(
ticket
,
None
)
event_list
=
ticket
.
getFollowUpRelatedValueList
()
event_list
=
ticket
.
getFollowUpRelatedValueList
()
...
@@ -1593,7 +1593,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
...
@@ -1593,7 +1593,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
No information for %s on %s"
%
(
ticket_title
=
"No information for %s on %s"
%
(
self
.
start_requested_software_installation
.
getReference
(),
self
.
start_requested_software_installation
.
getReference
(),
compute_node
.
getReference
()
compute_node
.
getReference
()
)
)
...
@@ -1641,7 +1641,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
...
@@ -1641,7 +1641,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
%s is building for too long on %s"
%
(
ticket_title
=
"%s is building for too long on %s"
%
(
self
.
start_requested_software_installation
.
getReference
(),
self
.
start_requested_software_installation
.
getReference
(),
compute_node
.
getReference
()
compute_node
.
getReference
()
)
)
...
@@ -1687,7 +1687,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
...
@@ -1687,7 +1687,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
%s is building for too long on %s"
%
(
ticket_title
=
"%s is building for too long on %s"
%
(
self
.
start_requested_software_installation
.
getReference
(),
self
.
start_requested_software_installation
.
getReference
(),
compute_node
.
getReference
()
compute_node
.
getReference
()
)
)
...
@@ -1715,7 +1715,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
...
@@ -1715,7 +1715,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
%s is failing to build on %s"
%
(
ticket_title
=
"%s is failing to build on %s"
%
(
self
.
start_requested_software_installation
.
getReference
(),
self
.
start_requested_software_installation
.
getReference
(),
compute_node
.
getReference
()
compute_node
.
getReference
()
)
)
...
@@ -1761,7 +1761,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
...
@@ -1761,7 +1761,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
compute_node
.
ComputeNode_checkSoftwareInstallationState
()
self
.
tic
()
self
.
tic
()
ticket_title
=
"
[MONITORING]
%s is failing to build on %s"
%
(
ticket_title
=
"%s is failing to build on %s"
%
(
self
.
start_requested_software_installation
.
getReference
(),
self
.
start_requested_software_installation
.
getReference
(),
compute_node
.
getReference
()
compute_node
.
getReference
()
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment