Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Xavier Thompson
slapos.toolbox
Commits
92b95057
Commit
92b95057
authored
Sep 28, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't automatically request a new instance when updating proxy.
Some features like saving parameters don't need it.
parent
cdd82184
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
slapos/runner/utils.py
slapos/runner/utils.py
+15
-5
No files found.
slapos/runner/utils.py
View file @
92b95057
...
@@ -95,7 +95,7 @@ def saveSession(config, account):
...
@@ -95,7 +95,7 @@ def saveSession(config, account):
pass
pass
return
str
(
e
)
return
str
(
e
)
def
updateProxy
(
config
):
def
updateProxy
(
config
,
request
=
True
):
"""
"""
Configure Slapos Node computer and partitions.
Configure Slapos Node computer and partitions.
Send current Software Release to Slapproxy for compilation and deployment.
Send current Software Release to Slapproxy for compilation and deployment.
...
@@ -145,9 +145,15 @@ def updateProxy(config):
...
@@ -145,9 +145,15 @@ def updateProxy(config):
if
type
(
xml_result
)
!=
type
(
''
)
and
xml_result
.
has_key
(
'instance'
):
if
type
(
xml_result
)
!=
type
(
''
)
and
xml_result
.
has_key
(
'instance'
):
partition_parameter_kw
=
xml_result
[
'instance'
]
partition_parameter_kw
=
xml_result
[
'instance'
]
computer
.
updateConfiguration
(
xml_marshaller
.
dumps
(
slap_config
))
computer
.
updateConfiguration
(
xml_marshaller
.
dumps
(
slap_config
))
sr_request
=
slap
.
registerOpenOrder
().
request
(
profile
,
partition_reference
=
getSoftwareReleaseName
(
config
),
if
request
:
partition_parameter_kw
=
partition_parameter_kw
,
software_type
=
None
,
slap
.
registerOpenOrder
().
request
(
filter_kw
=
None
,
state
=
None
,
shared
=
False
)
profile
,
partition_reference
=
getSoftwareReleaseName
(
config
),
partition_parameter_kw
=
partition_parameter_kw
,
software_type
=
None
,
filter_kw
=
None
,
state
=
None
,
shared
=
False
)
return
True
return
True
def
readPid
(
file
):
def
readPid
(
file
):
...
@@ -183,6 +189,10 @@ def updateInstanceParameter(config, software_type=None):
...
@@ -183,6 +189,10 @@ def updateInstanceParameter(config, software_type=None):
config
[
'software_profile'
]))
config
[
'software_profile'
]))
except
:
except
:
raise
Exception
(
"Software Release profile not found"
)
raise
Exception
(
"Software Release profile not found"
)
if
not
updateProxy
(
config
,
request
=
False
):
return
False
#get instance parameter
#get instance parameter
param_path
=
os
.
path
.
join
(
config
[
'etc_dir'
],
".parameter.xml"
)
param_path
=
os
.
path
.
join
(
config
[
'etc_dir'
],
".parameter.xml"
)
xml_result
=
readParameters
(
param_path
)
xml_result
=
readParameters
(
param_path
)
...
@@ -259,7 +269,7 @@ def runSoftwareWithLock(config):
...
@@ -259,7 +269,7 @@ def runSoftwareWithLock(config):
removeProxyDb
(
config
)
removeProxyDb
(
config
)
startProxy
(
config
)
startProxy
(
config
)
logfile
=
open
(
config
[
'software_log'
],
'w'
)
logfile
=
open
(
config
[
'software_log'
],
'w'
)
if
not
updateProxy
(
config
):
if
not
updateProxy
(
config
,
request
=
False
):
return
False
return
False
# Accelerate compilation by setting make -jX
# Accelerate compilation by setting make -jX
environment
=
os
.
environ
.
copy
()
environment
=
os
.
environ
.
copy
()
...
...
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