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
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
Stephane VAROQUI
slapos
Commits
285d27f3
Commit
285d27f3
authored
Aug 01, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_bootstrap: force update role
parent
01e31a37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+23
-2
No files found.
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
285d27f3
...
@@ -127,9 +127,11 @@ if result.status == 204: # and (result.read() == "False"):
...
@@ -127,9 +127,11 @@ if result.status == 204: # and (result.read() == "False"):
if scalability:
if scalability:
while True:
while True:
count = 0
# Fix site consistency
# Fix site consistency
if not testIfExist("/%%s/portal_configurator/" %%site_id):
if not testIfExist("/%%s/portal_configurator/" %%site_id):
count = count + 1
print "Going to fix site consistency..."
print "Going to fix site consistency..."
zope_connection = getConnection()
zope_connection = getConnection()
zope_connection.request(
zope_connection.request(
...
@@ -146,6 +148,7 @@ if scalability:
...
@@ -146,6 +148,7 @@ if scalability:
# Install testing scalability business configuration if not exists
# Install testing scalability business configuration if not exists
if testIfExist("/%%s/portal_configurator/" %%site_id) \
if testIfExist("/%%s/portal_configurator/" %%site_id) \
and not testIfExist("/%%s/sale_order_module/" %%site_id):
and not testIfExist("/%%s/sale_order_module/" %%site_id):
count = count + 1
print "Going to install testing scalability business configuration.."
print "Going to install testing scalability business configuration.."
zope_connection = getConnection()
zope_connection = getConnection()
zope_connection.request(
zope_connection.request(
...
@@ -162,6 +165,7 @@ if scalability:
...
@@ -162,6 +165,7 @@ if scalability:
# Create scalability users
# Create scalability users
if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
count = count + 1
print "Going to create scalability users.."
print "Going to create scalability users.."
zope_connection = getConnection()
zope_connection = getConnection()
zope_connection.request(
zope_connection.request(
...
@@ -175,4 +179,21 @@ if scalability:
...
@@ -175,4 +179,21 @@ if scalability:
waitFor0PendingActivities()
waitFor0PendingActivities()
print "Scalability users creation: done."
print "Scalability users creation: done."
# Try to Updates roles and sleep
if count == 0:
print "Trying to update roles.."
try:
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/update_roles_scalability' %%site_id,
headers=header_dict
)
result = zope_connection.getresponse()
assert(result.read()=="1")
# Wait activities
waitFor0PendingActivities()
print "Update roles: done."
except:
print "Update roles: fail. (but may be already done before)"
time.sleep(30)
\ No newline at end of file
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