Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos
Commits
8c1bbc5f
Commit
8c1bbc5f
authored
Aug 05, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_bootstrap: move load balancing init block as far as possible
parent
84c0f913
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+23
-21
No files found.
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
8c1bbc5f
...
...
@@ -162,26 +162,6 @@ if scalability:
waitFor0PendingActivities()
print "Scalability business configuration building: done."
# XXX: Hack to perform load balacing
# TODO: Use an other way to do the load balancing (for example
# using zope.conf, and using family-zope group names).
# Apply load balacing
if testIfExist("/%%s/portal_activities/manageLoadBalancing" %%site_id):
print "Load balacing.."
try:
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/apply_load_balancing_scalability' %%site_id,
headers=header_dict
)
result = zope_connection.getresponse()
assert("Processing Nodes" in result.read())
# Wait activities
waitFor0PendingActivities()
print "Load balancing init: done."
except:
print "Load balancing init: fail."
# Create scalability users
if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
...
...
@@ -216,4 +196,26 @@ if scalability:
except:
print "Update roles: fail. (but may be already done before)"
time.sleep(30)
\ No newline at end of file
# XXX: Hack to perform load balacing
# TODO: Use an other way to do the load balancing (for example
# using zope.conf, and using family-zope group names).
# Apply load balacing
if testIfExist("/%%s/portal_activities/manageLoadBalancing" %%site_id) \
and testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
print "Load balacing.."
try:
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/apply_load_balancing_scalability' %%site_id,
headers=header_dict
)
result = zope_connection.getresponse()
assert("Processing Nodes" in result.read())
# Wait activities
waitFor0PendingActivities()
print "Load balancing init: done."
except:
print "Load balancing init: fail."
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