By: Cory Carter user 27 Apr 2018 at 9:33 a.m. CDT

8 Responses
Cory Carter gravatar
Hello, I have just spun up a cluster via your Cluster Manager, and was wanting to know the best practice for adding a custom attribute to this cluster. I saw an option for custom attributes in the GLUU Cluster Manager itself, but it only allowed me to create a custom object, then fails whenever I try to add an attribute to it. Should I choose an alternative measure, such as writing it in OpenDJ's schema and replicate the directory via csync2 instead? Any suggestions are welcome. Thanks, Cory

By Devrim Yatar staff 27 Apr 2018 at 10:13 a.m. CDT

Devrim Yatar gravatar
Hi, It is not a good idea to replicate opendj schema via csync2. I just created an attribute via clustermgr. Could you send the error you are facing? See attached screenshot that I get.

By Chris Blanton user 27 Apr 2018 at 10:57 a.m. CDT

Chris Blanton gravatar
Cory, The error will show up in either the terminal you're running `clustermgr-celery` in or `clustermgr-cli run`

By Cory Carter user 27 Apr 2018 at 4:49 p.m. CDT

Cory Carter gravatar
Clustermgr-cli logs shows this: `127.0.0.1 - - [27/Apr/2018 16:48:10] "GET /attributes/ HTTP/1.1" 200 - INFO:werkzeug:127.0.0.1 - - [27/Apr/2018 16:48:10] "GET /attributes/ HTTP/1.1" 200 - ( 1.3.6.1.4.1.1466.115.121.1.3 DESC 'Attribute Type Description' X-ORIGIN 'RFC 4512' ) 127.0.0.1 - - [27/Apr/2018 16:48:14] "GET /attributes/editattribute HTTP/1.1" 500 - INFO:werkzeug:127.0.0.1 - - [27/Apr/2018 16:48:14] "GET /attributes/editattribute HTTP/1.1" 500 - Error on request: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app) File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1994, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python2.7/dist-packages/clustermgr/views/attributes.py", line 143, in edit_attribute a=AttributeType(ats) File "/usr/lib/python2.7/dist-packages/ldap/schema/models.py", line 60, in __init__ self._set_attrs(l,d) File "/usr/lib/python2.7/dist-packages/ldap/schema/models.py", line 292, in _set_attrs assert self.desc is None or type(self.desc)==StringType AssertionError ERROR:werkzeug:Error on request: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 270, in run_wsgi execute(self.server.app) File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 258, in execute application_iter = app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1994, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python2.7/dist-packages/clustermgr/views/attributes.py", line 143, in edit_attribute a=AttributeType(ats) File "/usr/lib/python2.7/dist-packages/ldap/schema/models.py", line 60, in __init__ self._set_attrs(l,d) File "/usr/lib/python2.7/dist-packages/ldap/schema/models.py", line 292, in _set_attrs assert self.desc is None or type(self.desc)==StringType AssertionError`

By Chris Blanton user 27 Apr 2018 at 5:21 p.m. CDT

Chris Blanton gravatar
Cory, We fixed the bug and pushed the latest version of Cluster Manager to prod. Please run the following command: ``` pip install --upgrade clustermgr ``` You'll also have to kill all the cluster commands so that they can recompile the code changes: ``` ps aux | grep cluster |awk '{print $2}' | xargs kill -9 ``` Then run the 3 commands again. `clustermgr-celery`,`clustermgr-beat` and `clustermgr.sh`. Note that `clustermgr-cli run` has been deprecated in favor of `clustermgr.sh`. That should resolve that issue.

By Cory Carter user 30 Apr 2018 at 10:39 a.m. CDT

Cory Carter gravatar
`Can't rollback python-ldap, nothing uninstalled. Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pSaNER/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nBNcdd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-pSaNER/python-ldap/ ` Getting this error when attempting to update. Any suggestions?

By Chris Blanton user 30 Apr 2018 at 10:58 a.m. CDT

Chris Blanton gravatar
Cory, Are there any more logs preceding that? I'm having trouble recreating this issue.

By Cory Carter user 30 Apr 2018 at 12:14 p.m. CDT

Cory Carter gravatar
Chris, I was able to rectify the issue. It seems that updating "python-all-dev" package and reinstalling clustermgr fixed the issue

By William Lowe user 01 May 2018 at 9:05 a.m. CDT

William Lowe gravatar
Thanks for the heads up, Cory.