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
a27807f1
Commit
a27807f1
authored
Nov 29, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_upgrader: break network link if not consistent
parent
718ed2b4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
1 deletion
+171
-1
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
...ader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
+1
-1
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep3.py
...ader/Base_triggerFullSiteMigrationToVirtualMasterStep3.py
+36
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep3.xml
...der/Base_triggerFullSiteMigrationToVirtualMasterStep3.xml
+62
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.py
...upgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.py
+10
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.xml
...pgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.xml
+62
-0
No files found.
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep2.py
View file @
a27807f1
...
...
@@ -77,4 +77,4 @@ if run_count < 10:
# Because some object are migrated only after some others are migrated
context
.
activate
(
after_tag
=
tag
).
Base_triggerFullSiteMigrationToVirtualMasterStep2
(
run_count
=
run_count
+
1
)
else
:
context
.
activate
(
after_tag
=
tag
).
getId
(
)
context
.
activate
(
after_tag
=
tag
).
Base_triggerFullSiteMigrationToVirtualMasterStep3
(
run_count
=
run_count
)
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep3.py
0 → 100644
View file @
a27807f1
portal
=
context
.
getPortalObject
()
tag
=
script
.
id
migrated_select_dict
=
{
'follow_up__uid'
:
'%'
}
############################################
# Delete all object to drop
############################################
packet_kw
=
{
'activate_kw'
:
{
'tag'
:
tag
},
# 'serialization_tag': tag},
'packet_size'
:
1
,
# Separate calls to many transactions (calculation can take time)
'activity_count'
:
1000
,
}
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
'Base_deleteProcessedDocumentDuringPurge'
,
portal_type
=
[
"Internal Packing List"
],
**
packet_kw
)
############################################
# Gather compute node informations
############################################
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
'ComputeNode_fixupSiteMigrationToVirtualMaster'
,
activate_kw
=
{
'tag'
:
tag
,
'priority'
:
1
},
portal_type
=
"Compute Node"
,
**
migrated_select_dict
)
if
(
run_count
==
10
):
context
.
activate
(
after_tag
=
tag
).
Base_triggerFullSiteMigrationToVirtualMasterStep2
(
run_count
=
run_count
+
1
)
else
:
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_triggerFullSiteMigrationToVirtualMasterStep3.xml
0 → 100644
View file @
a27807f1
<?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>
run_count=-1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_triggerFullSiteMigrationToVirtualMasterStep3
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.py
0 → 100644
View file @
a27807f1
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
raise
Unauthorized
compute_node
=
context
.
getObject
()
computer_network
=
compute_node
.
getSubordinationValue
()
if
(
computer_network
is
not
None
)
and
(
compute_node
.
getFollowUp
()
!=
computer_network
.
getFollowUp
()):
compute_node
.
edit
(
subordination
=
None
)
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ComputeNode_fixupSiteMigrationToVirtualMaster.xml
0 → 100644
View file @
a27807f1
<?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>
force_migration=False, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_fixupSiteMigrationToVirtualMaster
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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