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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
3a267a34
Commit
3a267a34
authored
Jul 30, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "core: Update certificates as late as possible"
This reverts commit
202a9bcd
parent
0d6aa531
Pipeline
#16787
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+1
-3
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+0
-6
No files found.
slapos/grid/SlapObject.py
View file @
3a267a34
...
@@ -452,6 +452,7 @@ class Partition(object):
...
@@ -452,6 +452,7 @@ class Partition(object):
self
.
partition_id
+
'.key'
)
self
.
partition_id
+
'.key'
)
self
.
cert_file
=
os
.
path
.
join
(
certificate_repository_path
,
self
.
cert_file
=
os
.
path
.
join
(
certificate_repository_path
,
self
.
partition_id
+
'.crt'
)
self
.
partition_id
+
'.crt'
)
self
.
_updateCertificate
()
try
:
try
:
self
.
retention_delay
=
float
(
retention_delay
)
self
.
retention_delay
=
float
(
retention_delay
)
...
@@ -484,9 +485,6 @@ class Partition(object):
...
@@ -484,9 +485,6 @@ class Partition(object):
required
=
bytes2human
(
required
)))
required
=
bytes2human
(
required
)))
def
_updateCertificate
(
self
):
def
_updateCertificate
(
self
):
if
getattr
(
self
,
"key_file"
,
None
)
is
None
:
return
try
:
try
:
partition_certificate
=
self
.
computer_partition
.
getCertificate
()
partition_certificate
=
self
.
computer_partition
.
getCertificate
()
except
NotFoundError
:
except
NotFoundError
:
...
...
slapos/grid/slapgrid.py
View file @
3a267a34
...
@@ -954,11 +954,9 @@ stderr_logfile_backups=1
...
@@ -954,11 +954,9 @@ stderr_logfile_backups=1
except
PromiseError
as
e
:
except
PromiseError
as
e
:
self
.
logger
.
error
(
e
)
self
.
logger
.
error
(
e
)
if
partition_access_status
is
None
or
not
status_error
:
if
partition_access_status
is
None
or
not
status_error
:
local_partition
.
_updateCertificate
()
computer_partition
.
error
(
e
,
logger
=
self
.
logger
)
computer_partition
.
error
(
e
,
logger
=
self
.
logger
)
else
:
else
:
if
partition_access_status
is
None
or
status_error
:
if
partition_access_status
is
None
or
status_error
:
local_partition
.
_updateCertificate
()
computer_partition
.
started
()
computer_partition
.
started
()
def
processPromise
(
self
,
computer_partition
):
def
processPromise
(
self
,
computer_partition
):
...
@@ -1186,9 +1184,6 @@ stderr_logfile_backups=1
...
@@ -1186,9 +1184,6 @@ stderr_logfile_backups=1
self
.
logger
.
info
(
' Software path: %s'
%
software_path
)
self
.
logger
.
info
(
' Software path: %s'
%
software_path
)
self
.
logger
.
info
(
' Instance path: %s'
%
instance_path
)
self
.
logger
.
info
(
' Instance path: %s'
%
instance_path
)
# Update certifcate at late as possible
local_partition
.
_updateCertificate
()
# XXX this line breaks 37 tests
# XXX this line breaks 37 tests
# self.logger.info(' Instance type: %s' % computer_partition.getType())
# self.logger.info(' Instance type: %s' % computer_partition.getType())
self
.
logger
.
info
(
' Instance status: %s'
%
computer_partition_state
)
self
.
logger
.
info
(
' Instance status: %s'
%
computer_partition_state
)
...
@@ -1793,7 +1788,6 @@ stderr_logfile_backups=1
...
@@ -1793,7 +1788,6 @@ stderr_logfile_backups=1
ipv4_global_network
=
self
.
ipv4_global_network
,
ipv4_global_network
=
self
.
ipv4_global_network
,
)
)
local_partition
.
stop
()
local_partition
.
stop
()
local_partition
.
_updateCertificate
()
try
:
try
:
computer_partition
.
stopped
()
computer_partition
.
stopped
()
except
(
SystemExit
,
KeyboardInterrupt
):
except
(
SystemExit
,
KeyboardInterrupt
):
...
...
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