Hi Christian,
>
Ok, I have some updates. I finally got RB back up and running somewhat. I
did take the hit and restored from backup. However, at first that failed
too which allowed me to finally track down the problem to the fact that the
single (subversion) repository that was causing me this grieve had a
password configured and this in conjunction with the fact that I did not
copy the secret key across during a re-deploy caused it (I concluded) to
fail to decode this password which led to the UTF-8 decoding errors seen in
the back-trace.
So once I copied the secret key over, it worked much better, but there are
still some issues. I'll enumerate them here. I think most of these are not
related, so if you want me to raise a separate topic/issue for each let me
know.
1. The thing that confused me to no end about the SVN repos is, that the
username/password settings on the admin page are not used (except to
produce the aforementioned issues when the secret key is not copied).
Instead RB uses credentials stored in a .subversion folder inside
SITEDIR/data. That should probably be fixed.
2. One (and only one) of our mercurial repositories produces a crash
when I select it on the new review request page. All its settings are
identical to the other repositories served on the same server (via
anonymous http). The only thing that I can see that is different about this
repository is that it has only three commits in it.
If I go to the New Review Request page, select this mercurial
repository, then in the commit list I get a message "Error 500 Internal
Server Error" and the stack trace attached as Issue 2 trace is emailed to
me.
3. All subversion repos (again all of the same server, but this time
with authentication) cause a crash when a particular commit is selected on
the "New Review Request" page. The list itself works, only when a commit is
selected, then a pop-up message box says Server Internal Error and I can
the trace attached as Issue 3 per email.
4. I believe that the loaddb command does not properly reset the
database. The problem code is here
<https://github.com/reviewboard/reviewboard/blob/release-2.5.15/reviewboard/admin/management/commands/loaddb.py#L53>,
I believe. It tries to execute ./reviewboard/manage.py as an external
process. This fails because rb-site must be called from the SITEDIR (or
else it fails altogether) and thus this path does not point anywhere
useful. Even if I symlink to reviewboard from the site dir, then manage.py
does not have the necessary permissions to be executed. If I fail that,
then it fails because the python path is not set up appropriately. If I fix
that it turns into issue 6.
5. loaddb produces the constraint violations shown in the original post.
I'm not sure whether these have actually any negative impact, but it would
probably be better to fix them (or completely remove loaddb).
This may be a consequence of issue 4. I noticed that interestingly, if I
loaddb on top of the original DB (i.e. the one I dumped from), I do not get
the violations.
6. rb-site manage is supposed to be able to run underlying django
commands. However, running
*../.venv/bin/rb-site manage "$(pwd)" -- reset reviewboard*
From my sitedir produces
*CommandError: App with label reviewboard is missing a models.py
module.. Are you sure your INSTALLED_APPS setting is correct?*
I'd say 2+3 are critical. 1 is important as it caused us repeated confusion
when that hidden .subversion directory was not copied and then the SVN
repos all stopped working (even though they seemed to have correct
credentials configured in the admin api).
4+5 are loaddb related and only important if that interface isn't
completely dropped.
6 is important because it makes other trouble worse by not being able to
use the underlying Django commands to troubleshoot anything.
Cheers,
Seb
--
Supercharge your Review Board with Power Pack:
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons:
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
Traceback (most recent call last):
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/views/decorators/cache.py",
line 52, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/views/decorators/vary.py",
line 19, in inner_func
response = func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/resources/base.py",
line 199, in __call__
request, method, view, api_format=api_format, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/resources/mixins/api_tokens.py",
line 65, in call_method_view
return view(request, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/webapi/decorators.py",
line 139, in _check
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/webapi/decorators.py",
line 34, in _check
return webapi_login_required(view_func)(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 146, in _checklogin
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 319, in _validate
return view_func(*args, **new_kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/webapi/resources/repository_commits.py",
line 103, in get
items = repository.get_commits(branch=branch, start=start)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
line 437, in get_commits
cache_period)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/cache/backend.py",
line 309, in cache_memoize
data = lookup_callable()
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
line 422, in <lambda>
lambda: self.get_scmtool().get_commits(**commits_kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/hg.py",
line 89, in get_commits
return self.client.get_commits(branch, start)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/hg.py",
line 396, in get_commits
parent = data['parents'][0]
IndexError: list index out of range
<WSGIRequest
path:/api/repositories/19/commits/,
GET:<QueryDict: {u'start': [u'a16fd06a825e5ad8d48dfc639adf65be8984b7bb'],
u'api_format': [u'json'], u'branch': [u'default']}>,
POST:<QueryDict: {}>,
COOKIES:{'_ga': 'GA1.2.1235266689.1499048514',
'collapsediffs': 'True',
'csrftoken': 'RZqLlP6U79QpmdjjOM1Iz7I38LWzikAt',
'rbsessionid': '2bnb6qdpljq0012oturfo0csylh5ox0x'},
META:{'CONTENT_LENGTH': '',
'CONTENT_TYPE': '',
'DOCUMENT_ROOT': '/home/reviewboard/reviewboard.taitradio.net/htdocs',
'DOCUMENT_URI': '/api/repositories/19/commits/',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-GB,en;q=0.8,en-US;q=0.6,de-DE;q=0.4,de;q=0.2',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': '_ga=GA1.2.1235266689.1499048514; collapsediffs=True;
rbsessionid=2bnb6qdpljq0012oturfo0csylh5ox0x;
csrftoken=RZqLlP6U79QpmdjjOM1Iz7I38LWzikAt',
'HTTP_HOST': 'reviewboard.taitradio.net',
'HTTP_REFERER': 'http://reviewboard.taitradio.net/r/new/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/60.0.3112.90 Safari/537.36',
'HTTP_VIA': '1.1 squida.taitradio.net (squid/3.3.8)',
'HTTP_X_FORWARDED_FOR': '172.16.182.9',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
u'LOCAL_SITE': None,
'PATH_INFO': u'/api/repositories/19/commits/',
'QUERY_STRING':
'start=a16fd06a825e5ad8d48dfc639adf65be8984b7bb&branch=default&api_format=json',
'REDIRECT_STATUS': '200',
'REMOTE_ADDR': '172.25.47.1',
'REMOTE_PORT': '37118',
'REQUEST_METHOD': 'GET',
'REQUEST_SCHEME': 'http',
'REQUEST_URI':
'/api/repositories/19/commits/?start=a16fd06a825e5ad8d48dfc639adf65be8984b7bb&branch=default&api_format=json',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '172.26.156.163',
'SERVER_NAME': 'reviewboard.taitradio.net',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'nginx/1.10.3',
u'USERNAME': u'ungers',
u'USER_EMAIL': u'[email protected]',
'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 0x7fcb416773d0>,
'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x7fcb41677910>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>
Traceback (most recent call last):
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/views/decorators/cache.py",
line 52, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/views/decorators/vary.py",
line 19, in inner_func
response = func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/resources/base.py",
line 199, in __call__
request, method, view, api_format=api_format, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/resources/mixins/api_tokens.py",
line 65, in call_method_view
return view(request, *args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/resources/base.py",
line 452, in post
return self.create(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/webapi/decorators.py",
line 139, in _check
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 146, in _checklogin
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 125, in _call
return view_func(*args, **kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/djblets/webapi/decorators.py",
line 319, in _validate
return view_func(*args, **new_kwargs)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/webapi/resources/review_request.py",
line 719, in create
create_from_commit_id=create_from_commit_id)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/managers.py",
line 156, in create
draft.update_from_commit_id(commit_id)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/models/review_request_draft.py",
line 278, in update_from_commit_id
self.update_from_committed_change(commit_id)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/models/review_request_draft.py",
line 333, in update_from_committed_change
commit = self.repository.get_change(commit_id)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
line 455, in get_change
return self.get_scmtool().get_change(revision)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/svn/__init__.py",
line 238, in get_change
commits = self.client.get_log('/', start=revision, limit=2)
File
"/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/svn/subvertpy.py",
line 246, in get_log
strict_node_history=limit_to_path)
ValueError: Expected canonical path or URL
<WSGIRequest
path:/api/review-requests/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'commit_id': [u'440913'], u'create_from_commit_id':
[u'true'], u'api_format': [u'json'], u'repository': [u'1']}>,
COOKIES:{'_ga': 'GA1.2.1235266689.1499048514',
'collapsediffs': 'True',
'csrftoken': 'RZqLlP6U79QpmdjjOM1Iz7I38LWzikAt',
'rbsessionid': '2bnb6qdpljq0012oturfo0csylh5ox0x'},
META:{'CONTENT_LENGTH': '72',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'DOCUMENT_ROOT': '/home/reviewboard/reviewboard.taitradio.net/htdocs',
'DOCUMENT_URI': '/api/review-requests/',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-GB,en;q=0.8,en-US;q=0.6,de-DE;q=0.4,de;q=0.2',
'HTTP_CACHE_CONTROL': 'max-age=259200',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_CONTENT_LENGTH': '72',
'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',
'HTTP_COOKIE': '_ga=GA1.2.1235266689.1499048514; collapsediffs=True;
rbsessionid=2bnb6qdpljq0012oturfo0csylh5ox0x;
csrftoken=RZqLlP6U79QpmdjjOM1Iz7I38LWzikAt',
'HTTP_HOST': 'reviewboard.taitradio.net',
'HTTP_ORIGIN': 'http://reviewboard.taitradio.net',
'HTTP_REFERER': 'http://reviewboard.taitradio.net/r/new/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/60.0.3112.90 Safari/537.36',
'HTTP_VIA': '1.1 squida.taitradio.net (squid/3.3.8)',
'HTTP_X_FORWARDED_FOR': '172.16.182.9',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
u'LOCAL_SITE': None,
'PATH_INFO': u'/api/review-requests/',
'QUERY_STRING': '',
'REDIRECT_STATUS': '200',
'REMOTE_ADDR': '172.25.47.1',
'REMOTE_PORT': '35618',
'REQUEST_METHOD': 'POST',
'REQUEST_SCHEME': 'http',
'REQUEST_URI': '/api/review-requests/',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '172.26.156.163',
'SERVER_NAME': 'reviewboard.taitradio.net',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'nginx/1.10.3',
u'USERNAME': u'ungers',
u'USER_EMAIL': u'[email protected]',
'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 0x7fcb415e52d0>,
'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x7fcb415e5d90>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>