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
718ed2b4
Commit
718ed2b4
authored
Nov 29, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_upgrader: force migration to remaining compute nodes
parent
6bb9be02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
...ader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
+2
-1
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_checkSiteMigrationToVirtualMaster.py
...upgrader/ComputeNode_checkSiteMigrationToVirtualMaster.py
+13
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_checkSiteMigrationToVirtualMaster.xml
...pgrader/ComputeNode_checkSiteMigrationToVirtualMaster.xml
+1
-1
No files found.
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
View file @
718ed2b4
...
...
@@ -33,6 +33,7 @@ if run_count == 1:
############################################
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
'ComputeNode_checkSiteMigrationToVirtualMaster'
,
method_kw
=
{
'force_migration'
:
run_count
==
5
},
activate_kw
=
{
'tag'
:
tag
,
'priority'
:
1
},
portal_type
=
"Compute Node"
,
...
...
@@ -71,7 +72,7 @@ portal.portal_catalog.searchAndActivate(
)
if
run_count
<
5
:
if
run_count
<
10
:
# Run the migration script multiple times
# Because some object are migrated only after some others are migrated
context
.
activate
(
after_tag
=
tag
).
Base_triggerFullSiteMigrationToVirtualMasterStep2
(
run_count
=
run_count
+
1
)
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_checkSiteMigrationToVirtualMaster.py
View file @
718ed2b4
...
...
@@ -63,6 +63,19 @@ elif (computer_network is not None) and (computer_network.getFollowUp(None) is n
compute_node
.
activate
().
Base_activateObjectMigrationToVirtualMaster
(
computer_network
.
getFollowUp
())
not_migrated_compute_node_dict
.
pop
(
compute_node_relative_url
)
elif
force_migration
and
(
not_migrated_compute_node
[
'source_administration'
]
is
not
None
):
# Create a single project for every single remaining compute node
project
=
source_administration_value
.
Person_addVirtualMaster
(
title
=
'Migrated shared for %s'
%
compute_node
.
getReference
(),
is_compute_node_payable
=
False
,
is_instance_tree_payable
=
False
,
# Hardcoded
price_currency
=
'currency_module/EUR'
,
batch
=
1
)
compute_node
.
activate
().
Base_activateObjectMigrationToVirtualMaster
(
project
.
getRelativeUrl
())
not_migrated_compute_node_dict
.
pop
(
compute_node_relative_url
)
else
:
# If the related instance are all grouped on this machine, and from the same user
from_same_user_only
=
True
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_checkSiteMigrationToVirtualMaster.xml
View file @
718ed2b4
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
<value>
<string>
force_migration=False,
REQUEST=None
</string>
</value>
</item>
<item>
<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