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
8c2b1cd1
Commit
8c2b1cd1
authored
Jan 20, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: drop InstanceTree_isUpgradePossible
No way to know which software release url on instance will request.
parent
95e4e779
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
108 deletions
+0
-108
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_isUpgradePossible.py
...portal_skins/slapos_pdm/InstanceTree_isUpgradePossible.py
+0
-41
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_isUpgradePossible.xml
...ortal_skins/slapos_pdm/InstanceTree_isUpgradePossible.xml
+0
-62
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_requestUpgrade.py
...terface_workflow/script_UpgradeDecision_requestUpgrade.py
+0
-5
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_isUpgradePossible.py
deleted
100644 → 0
View file @
95e4e779
portal
=
context
.
getPortalObject
()
# This won't work well on clusters deployed on multiple compute_nodes.
root_instance
=
context
.
getSuccessorValue
(
portal_type
=
[
"Software Instance"
,
"Slave Instance"
])
if
root_instance
is
not
None
and
root_instance
.
getPortalType
()
==
'Slave Instance'
:
return
True
# Get Compute Node List
instance_list
=
context
.
getSpecialiseRelatedValueList
(
portal_type
=
"Software Instance"
)
compute_node_list
=
[]
for
instance
in
instance_list
:
if
instance
.
getSlapState
()
==
"destroy_requested"
:
continue
partition
=
instance
.
getAggregateValue
(
portal_type
=
"Compute Partition"
)
if
partition
is
None
:
continue
compute_node_list
.
append
(
partition
.
getParentValue
().
getUid
())
if
not
compute_node_list
:
return
True
full_software_installation_list
=
[
si
for
si
in
portal
.
portal_catalog
(
portal_type
=
'Software Installation'
,
url_string
=
software_release_url
,
default_aggregate_uid
=
compute_node_list
,
validation_state
=
'validated'
)
if
si
.
getSlapState
()
==
'start_requested'
]
if
len
(
full_software_installation_list
)
>
0
and
\
len
(
full_software_installation_list
)
==
len
(
set
(
compute_node_list
)):
# Software is available for the root instance
software_installation
=
full_software_installation_list
[
0
]
message
=
software_installation
.
getTextAccessStatus
()
if
message
.
startswith
(
"#access"
):
return
True
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_isUpgradePossible.xml
deleted
100644 → 0
View file @
95e4e779
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
software_release_url
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InstanceTree_isUpgradePossible
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/WorkflowTemplateItem/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_requestUpgrade.py
View file @
8c2b1cd1
...
...
@@ -28,11 +28,6 @@ if compute_node is not None:
upgrade_decision
.
stop
(
comment
=
"Upgrade Processed for the Compute Node!"
)
return
# Test if the Software is available at the ComputeNode.
if
not
instance_tree
.
InstanceTree_isUpgradePossible
(
software_release_url
=
software_release_url
):
return
status
=
instance_tree
.
getSlapState
()
if
status
==
"start_requested"
:
state
=
"started"
...
...
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