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
e0ac387d
Commit
e0ac387d
authored
Dec 19, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: drop Compute Node upgrade
This is now handled manually by updating the Allocation Supply
parent
d1609f15
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
316 deletions
+1
-316
master/bt5/slapos_pdm/PathTemplateItem/portal_alarms/slapos_pdm_compute_node_create_upgrade_decision.xml
...larms/slapos_pdm_compute_node_create_upgrade_decision.xml
+0
-113
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.py
...lapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.py
+0
-17
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.xml
...apos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.xml
+0
-62
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.py
...s/slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.py
+0
-58
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.xml
.../slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.xml
+0
-62
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareRelease_createUpgradeDecision.py
...skins/slapos_pdm/SoftwareRelease_createUpgradeDecision.py
+1
-3
master/bt5/slapos_pdm/bt/template_path_list
master/bt5/slapos_pdm/bt/template_path_list
+0
-1
No files found.
master/bt5/slapos_pdm/PathTemplateItem/portal_alarms/slapos_pdm_compute_node_create_upgrade_decision.xml
deleted
100644 → 0
View file @
d1609f15
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_ComputeNodeCheckUpgradeSoftwareRelease
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Create Upgrade Decision for compute_nodes to upgrade Software Releases to a newer version.
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_pdm_compute_node_create_upgrade_decision
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
8
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<tuple>
<float>
1406073600.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
sense_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Create Upgrade Decision for compute_nodes
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.py
deleted
100644 → 0
View file @
d1609f15
portal
=
context
.
getPortalObject
()
default_upgrade_scope_uid
=
[
portal
.
portal_categories
.
upgrade_scope
.
auto
.
getUid
(),
portal
.
portal_categories
.
upgrade_scope
.
confirmation
.
getUid
()
]
if
default_upgrade_scope_uid
:
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Compute Node'
,
validation_state
=
'validated'
,
default_upgrade_scope_uid
=
default_upgrade_scope_uid
,
method_id
=
'ComputeNode_checkAndCreateUpgradeDecision'
,
activate_kw
=
{
'tag'
:
tag
}
)
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.xml
deleted
100644 → 0
View file @
d1609f15
<?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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_ComputeNodeCheckUpgradeSoftwareRelease
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.py
deleted
100644 → 0
View file @
d1609f15
from
DateTime
import
DateTime
compute_node
=
context
portal
=
context
.
getPortalObject
()
upgrade_scope
=
context
.
getUpgradeScope
()
if
upgrade_scope
in
[
"never"
,
"disabled"
]:
return
full_software_release_list
=
[
si
.
url_string
for
si
in
portal
.
portal_catalog
(
select_dict
=
{
"url_string"
:
None
},
portal_type
=
'Software Installation'
,
default_aggregate_uid
=
compute_node
.
getUid
(),
validation_state
=
'validated'
)
if
si
.
getSlapState
()
==
'start_requested'
]
if
len
(
full_software_release_list
)
==
0
:
return
# group SR by Software Product to avoid two upgrade Decision for the same product
software_release_list
=
portal
.
portal_catalog
(
portal_type
=
'Software Release'
,
url_string
=
full_software_release_list
,
group_by
=
[
'default_aggregate_uid'
]
)
upgrade_decision_list
=
[]
for
software_release
in
software_release_list
:
software_product_reference
=
software_release
.
getAggregateReference
()
if
software_product_reference
in
[
None
,
""
]:
continue
sorted_list
=
portal
.
SoftwareProduct_getSortedSoftwareReleaseList
(
software_product_reference
=
software_product_reference
)
# Check if there is a new version of this software Product
if
sorted_list
and
\
sorted_list
[
0
].
getUrlString
()
not
in
full_software_release_list
:
newer_release
=
sorted_list
[
0
]
title
=
'A new version of %s is available for %s'
%
\
(
software_product_reference
,
context
.
getTitle
())
# If exist upgrade decision in progress try to cancel it
decision_in_progress
=
newer_release
.
\
SoftwareRelease_getUpgradeDecisionInProgress
(
compute_node
.
getUid
())
if
decision_in_progress
:
decision_in_progress
.
reviewRegistration
(
software_release_url
=
newer_release
.
getUrlString
())
if
decision_in_progress
.
getSimulationState
()
!=
"cancelled"
:
continue
upgrade_decision
=
newer_release
.
SoftwareRelease_createUpgradeDecision
(
source_url
=
compute_node
.
getRelativeUrl
(),
title
=
title
)
upgrade_decision
.
approveRegistration
(
upgrade_scope
=
compute_node
.
getUpgradeScope
(
"ask_confirmation"
))
upgrade_decision_list
.
append
(
upgrade_decision
)
return
upgrade_decision_list
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/ComputeNode_checkAndCreateUpgradeDecision.xml
deleted
100644 → 0
View file @
d1609f15
<?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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_checkAndCreateUpgradeDecision
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareRelease_createUpgradeDecision.py
View file @
e0ac387d
...
...
@@ -8,9 +8,7 @@ if not source_product:
return
portal_type
=
source_product
.
getPortalType
()
if
portal_type
==
'Compute Node'
:
person_url
=
source_product
.
getSourceAdministration
()
elif
portal_type
==
'Instance Tree'
:
if
portal_type
==
'Instance Tree'
:
person_url
=
source_product
.
getDestinationSection
()
else
:
return
...
...
master/bt5/slapos_pdm/bt/template_path_list
View file @
e0ac387d
...
...
@@ -3,7 +3,6 @@ notification_message_module/slapos_upgrade_delivered_compute_node_notification
notification_message_module/slapos_upgrade_delivered_instance_tree_notification
notification_message_module/slapos_upgrade_instance_tree_notification
portal_alarms/slapos_pdm_auto_cancel_upgrade_decision
portal_alarms/slapos_pdm_compute_node_create_upgrade_decision
portal_alarms/slapos_pdm_destroy_software_installation_with_archived_software_release
portal_alarms/slapos_pdm_instance_tree_create_upgrade_decision
portal_alarms/slapos_pdm_upgrade_decision_process_planned
...
...
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