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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
d40d2e21
Commit
d40d2e21
authored
Apr 11, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: do not allocate on a Compute Node without any Subscription
parent
025245dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
...ateItem/portal_skins/slapos_cloud/Person_findPartition.py
+9
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.xml
...teItem/portal_skins/slapos_cloud/Person_findPartition.xml
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
View file @
d40d2e21
...
@@ -197,6 +197,15 @@ for compute_partition_candidate in portal.portal_catalog(
...
@@ -197,6 +197,15 @@ for compute_partition_candidate in portal.portal_catalog(
# The compute_node was closed on this partition, so skip it.
# The compute_node was closed on this partition, so skip it.
continue
continue
compute_node
=
compute_partition_candidate
.
getParentValue
()
if
compute_node
.
getPortalType
()
==
'Compute Node'
:
subscription_state
=
compute_node
.
Service_getSubscriptionStatus
()
compute_node
.
log
(
'subscription_state for Compute Node %s: %s'
%
(
compute_node
.
getRelativeUrl
(),
subscription_state
))
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
continue
elif
subscription_state
in
(
'subscribed'
,
'todestroy'
):
pass
if
software_instance_portal_type
==
"Software Instance"
:
if
software_instance_portal_type
==
"Software Instance"
:
# Check if the compute partition can be marked as busy
# Check if the compute partition can be marked as busy
if
isTransitionPossible
(
compute_partition_candidate
,
'mark_busy'
):
if
isTransitionPossible
(
compute_partition_candidate
,
'mark_busy'
):
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.xml
View file @
d40d2e21
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
instance_tree, project_uid, software_release_url, software_type, software_instance_portal_type, filter_kw, computer_network_query=None,
subscription_reference=None,
test_mode=False
</string>
</value>
<value>
<string>
instance_tree, project_uid, software_release_url, software_type, software_instance_portal_type, filter_kw, computer_network_query=None, test_mode=False
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
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