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
Łukasz Nowak
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):
pass
return
str
(
e
)
def
updateProxy
(
config
):
def
updateProxy
(
config
,
request
=
True
):
"""
Configure Slapos Node computer and partitions.
Send current Software Release to Slapproxy for compilation and deployment.
...
...
@@ -145,9 +145,15 @@ def updateProxy(config):
if
type
(
xml_result
)
!=
type
(
''
)
and
xml_result
.
has_key
(
'instance'
):
partition_parameter_kw
=
xml_result
[
'instance'
]
computer
.
updateConfiguration
(
xml_marshaller
.
dumps
(
slap_config
))
sr_request
=
slap
.
registerOpenOrder
().
request
(
profile
,
partition_reference
=
getSoftwareReleaseName
(
config
),
partition_parameter_kw
=
partition_parameter_kw
,
software_type
=
None
,
filter_kw
=
None
,
state
=
None
,
shared
=
False
)
if
request
:
slap
.
registerOpenOrder
().
request
(
profile
,
partition_reference
=
getSoftwareReleaseName
(
config
),
partition_parameter_kw
=
partition_parameter_kw
,
software_type
=
None
,
filter_kw
=
None
,
state
=
None
,
shared
=
False
)
return
True
def
readPid
(
file
):
...
...
@@ -183,6 +189,10 @@ def updateInstanceParameter(config, software_type=None):
config
[
'software_profile'
]))
except
:
raise
Exception
(
"Software Release profile not found"
)
if
not
updateProxy
(
config
,
request
=
False
):
return
False
#get instance parameter
param_path
=
os
.
path
.
join
(
config
[
'etc_dir'
],
".parameter.xml"
)
xml_result
=
readParameters
(
param_path
)
...
...
@@ -259,7 +269,7 @@ def runSoftwareWithLock(config):
removeProxyDb
(
config
)
startProxy
(
config
)
logfile
=
open
(
config
[
'software_log'
],
'w'
)
if
not
updateProxy
(
config
):
if
not
updateProxy
(
config
,
request
=
False
):
return
False
# Accelerate compilation by setting make -jX
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