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
Klaus Wölfel
slapos.core
Commits
42956176
Commit
42956176
authored
Oct 19, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapgrid: increase min free space to 1G, log slapgrid deploy error into partition
parent
5a964f88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+16
-3
No files found.
slapos/grid/slapgrid.py
View file @
42956176
...
...
@@ -77,6 +77,7 @@ PROMISE_TIMEOUT = 3
COMPUTER_PARTITION_TIMESTAMP_FILENAME
=
'.timestamp'
COMPUTER_PARTITION_LATEST_BANG_TIMESTAMP_FILENAME
=
'.slapos_latest_bang_timestamp'
COMPUTER_PARTITION_INSTALL_ERROR_FILENAME
=
'.slapgrid-%s-error.log'
# XXX hardcoded watchdog_path
WATCHDOG_PATH
=
'/opt/slapos/bin/slapos-watchdog'
...
...
@@ -228,8 +229,8 @@ def create_slapgrid_object(options, logger):
]
op
=
options
software_min_free_space
=
human2bytes
(
op
.
get
(
'software_min_free_space'
,
'
2
00M'
))
instance_min_free_space
=
human2bytes
(
op
.
get
(
'instance_min_free_space'
,
'100M'
))
software_min_free_space
=
human2bytes
(
op
.
get
(
'software_min_free_space'
,
'
10
00M'
))
instance_min_free_space
=
human2bytes
(
op
.
get
(
'instance_min_free_space'
,
'100
0
M'
))
return
Slapgrid
(
software_root
=
op
[
'software_root'
],
instance_root
=
op
[
'instance_root'
],
...
...
@@ -961,6 +962,11 @@ stderr_logfile_backups=1
else
:
timestamp
=
None
error_output_file
=
os
.
path
.
join
(
instance_path
,
COMPUTER_PARTITION_INSTALL_ERROR_FILENAME
%
computer_partition_id
)
try
:
software_url
=
computer_partition
.
getSoftwareRelease
().
getURI
()
except
NotFoundError
:
...
...
@@ -1110,8 +1116,15 @@ stderr_logfile_backups=1
(
computer_partition_id
,
computer_partition_state
)
computer_partition
.
error
(
error_string
,
logger
=
self
.
logger
)
raise
NotImplementedError
(
error_string
)
except
Exception
,
e
:
with
open
(
error_output_file
,
'w'
)
as
error_file
:
# Write error message in a log file assible to computer partition user
error_file
.
write
(
str
(
e
))
raise
finally
:
self
.
logger
.
removeHandler
(
partition_file_handler
)
if
os
.
path
.
exists
(
error_output_file
):
os
.
unlink
(
error_output_file
)
# If partition has been successfully processed, write timestamp
if
timestamp
:
...
...
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