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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos.core
Commits
2dd3ea06
Commit
2dd3ea06
authored
Feb 02, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Stop to check for Allocation Scope when monitor
Only Monitor Scope should be taken into account.
parent
c2a1055e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
17 deletions
+0
-17
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
...tal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
+0
-4
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
...slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
+0
-13
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkState.py
View file @
2dd3ea06
...
...
@@ -7,10 +7,6 @@ if not person or \
portal
.
ERP5Site_isSupportRequestCreationClosed
():
return
if
context
.
getAllocationScope
(
"open"
).
startswith
(
"close"
):
context
.
setMonitorScope
(
"disabled"
)
return
reference
=
context
.
getReference
()
compute_node_title
=
context
.
getTitle
()
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
View file @
2dd3ea06
#
# XXX This ticket contains dupplicated coded found arround SlapOS
# It is required to rewrite this in a generic way.
# See also: InstanceTree_checkSoftwareInstanceState
# See also: ComputeNode_checkState
#
from
DateTime
import
DateTime
if
context
.
getSimulationState
()
==
"invalidated"
:
...
...
@@ -103,17 +96,11 @@ if aggregate_portal_type == "Instance Tree":
if
instance
.
getAggregate
()
is
not
None
:
compute_node
=
instance
.
getAggregateValue
().
getParentValue
()
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
compute_node
.
getAllocationScope
()
in
[
"open/public"
,
"open/friend"
,
"open/subscription"
]
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
message_list
.
append
(
"%s has error (%s, %s at %s scope %s)"
%
(
instance
.
getReference
(),
instance
.
getTitle
(),
instance
.
getUrlString
(),
compute_node
.
getReference
(),
compute_node
.
getAllocationScope
()))
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
compute_node
.
getAllocationScope
()
in
[
"closed/outdated"
,
"open/personal"
]
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
message_list
.
append
(
"%s on a %s compute_node"
%
(
instance
.
getReference
(),
compute_node
.
getAllocationScope
())
)
else
:
message_list
.
append
(
"%s is not allocated"
%
instance
.
getReference
())
return
","
.
join
(
message_list
)
...
...
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