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
0
Merge Requests
0
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
Roque
slapos.core
Commits
8b34994e
Commit
8b34994e
authored
Aug 09, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't stop reporting/Destroying, even if something bad happens to an instance.
Do it as well for the reporting loop.
parent
b03b0192
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
38 deletions
+47
-38
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+47
-38
No files found.
slapos/grid/slapgrid.py
View file @
8b34994e
...
@@ -876,6 +876,7 @@ class Slapgrid(object):
...
@@ -876,6 +876,7 @@ class Slapgrid(object):
#Now we loop through the different computer partitions to report
#Now we loop through the different computer partitions to report
report_usage_issue_cp_list
=
[]
report_usage_issue_cp_list
=
[]
for
computer_partition
in
computer_partition_list
:
for
computer_partition
in
computer_partition_list
:
try
:
filename_delete_list
=
[]
filename_delete_list
=
[]
computer_partition_id
=
computer_partition
.
getId
()
computer_partition_id
=
computer_partition
.
getId
()
instance_path
=
os
.
path
.
join
(
self
.
instance_root
,
computer_partition_id
)
instance_path
=
os
.
path
.
join
(
self
.
instance_root
,
computer_partition_id
)
...
@@ -917,6 +918,14 @@ class Slapgrid(object):
...
@@ -917,6 +918,14 @@ class Slapgrid(object):
for
filename
in
filename_delete_list
:
for
filename
in
filename_delete_list
:
os
.
remove
(
os
.
path
.
join
(
dir_reports
,
filename
))
os
.
remove
(
os
.
path
.
join
(
dir_reports
,
filename
))
# Whatever happens, don't stop processing other instances
except
Exception
:
computer_partition_id
=
computer_partition
.
getId
()
exception
=
traceback
.
format_exc
()
issue
=
"Cannot run usage script(s) for %r: %s"
%
(
computer_partition_id
,
exception
)
logger
.
info
(
issue
)
for
computer_partition_usage
in
computer_partition_usage_list
:
for
computer_partition_usage
in
computer_partition_usage_list
:
logger
.
info
(
'computer_partition_usage_list : %s - %s'
%
\
logger
.
info
(
'computer_partition_usage_list : %s - %s'
%
\
(
computer_partition_usage
.
usage
,
computer_partition_usage
.
getId
()))
(
computer_partition_usage
.
usage
,
computer_partition_usage
.
getId
()))
...
...
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