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
dae79ee9
Commit
dae79ee9
authored
Apr 03, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: do not upgrade if there is no instance yet
parent
5c96df7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
...al_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
+3
-1
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/InstanceTree_createUpgradeDecision.py
View file @
dae79ee9
...
...
@@ -28,6 +28,7 @@ if software_product is None:
assert
software_release
.
getUrlString
()
==
instance_tree
.
getUrlString
()
compute_node
=
None
root_instance
=
None
root_instance_list
=
[
q
for
q
in
instance_tree
.
getSuccessorValueList
(
portal_type
=
[
"Software Instance"
,
"Slave Instance"
])
if
q
.
getSlapState
()
!=
'destroy_requested'
]
...
...
@@ -65,7 +66,8 @@ allocation_cell_list = software_product.getFollowUpValue().Project_getSoftwarePr
predicate_portal_type
=
'Allocation Supply Cell'
)
if
compute_node
is
None
:
if
(
compute_node
is
None
)
and
(
root_instance
is
not
None
):
# Do not upgrade if there is no instance yet
allocation_cell_node_list
=
[(
x
,
[
y
.
getPortalType
()
for
y
in
x
.
getParentValue
().
getParentValue
().
getAggregateValueList
()])
for
x
in
allocation_cell_list
]
if
(
root_instance
.
getPortalType
()
==
'Slave Instance'
):
allocation_cell_list
=
[
x
for
x
,
y
in
allocation_cell_node_list
if
(
"Remote Node"
in
y
)
or
(
"Instance Node"
in
y
)]
...
...
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