Re: Issues publishing review with ReviewBoard

2014-09-11 Thread Jeremy Wall
Hrr.

And now it seems to have resolved itself. I honestly don't know what fixed 
it.

On Wednesday, December 5, 2012 6:31:48 PM UTC-6, Brian Lewis wrote:
>
> Hello All,
>
> I've been racking my brain on this for a couple of days and figured I'd 
> post here before I refactor my entire setup. Basically what we are doing 
> is, we have two servers - one is a standard apache web node that acts as a 
> proxy server and terminates SSL, then we have reviewboard being proxied 
> behind that. 
>
> I've got everything setup and working with the exception of one piece. I 
> can upload a diff, I can add titles, descriptions, reviewers, etc. Tracing 
> the requests I can see that https is being returned as the request URL, 
> HOWEVER, when you go to publish a review, we get a 304 error and the 
> request URL is a non-https link. 
>
> I'm doing the rewriting from the web node directly, with a mod_rewrite 
> specifically calling out that its proxied (but changing or completely 
> removing the options doesn't make any difference) For reference, here's the 
> rewrite :: 
>
>  RewriteCond %{HTTPS} off
>  RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,P,PT,L]
>
>
> When I click on publish, essentially I see two requests (and nothing at 
> all in the debug logs, etc)  The first :: 
>
> Request 
> URL:*https://reviewboard.boku.com/reviews/api/review-requests/189/?api_format=json
>  
> *
> Request Method:GET
> Status Code:304 NOT MODIFIED
> Request Headersview source
> Accept:application/json, text/javascript, */*
> Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
> Accept-Encoding:gzip,deflate,sdch
> Accept-Language:en-US,en;q=0.8
> Cache-Control:max-age=0
> Connection:keep-alive
> Cookie:rbsessionid=bbf077166394571eaaf514053e6c4691; 
> __utma=109258518.568604164.1352840613.1352938162.1354736370.4; 
> __utmc=109258518; __utmz=109258518.1352929269.2.2.utmcsr=google|utmccn=(
> organic)|utmcmd=organic|utmctr=(not%20provided); csrftoken=
> b6dec71b9219e2090d9d98acf203e1f4
> Host:reviewboard.boku.com
> If-Modified-Since:Wed, 05 Dec 2012 22:02:11 GMT
> Referer:https://reviewboard.boku.com/reviews/r/189/
> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) 
> AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
> X-Requested-With:XMLHttpRequest
> Query String Parametersview URL encoded
> api_format:json
> Response Headersview source
> Cache-Control:max-age=0
> Connection:close
> Date:Thu, 06 Dec 2012 00:12:46 GMT
> Expires:Thu, 06 Dec 2012 00:12:48 GMT
> Server:Apache/2.2.15 (CentOS)
> Vary:Accept,Cookie,Accept-Language
>
> The second :: 
>
>
> Request 
> URL:*http://reviewboard.boku.com/reviews/api/review-requests/189/draft/ 
> *
> Request Method:OPTIONS
> Status Code:200 OK
> Request Headersview source
> Accept:*/*
> Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
> Accept-Encoding:gzip,deflate,sdch
> Accept-Language:en-US,en;q=0.8
> Access-Control-Request-Headers:origin, x-requested-with, content-type, 
> accept
> Access-Control-Request-Method:PUT
> Connection:keep-alive
> Host:reviewboard.boku.com
> Origin:https://reviewboard.boku.com
> User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) 
> AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
> Response Headersview source
> Allow:GET,HEAD,POST,OPTIONS
> Connection:close
> Content-Length:0
> Content-Type:text/plain; charset=UTF-8
> Date:Thu, 06 Dec 2012 00:12:48 GMT
> Server:Apache
>
>
> literally every other request comes in via HTTPS, clicking on links, 
> performing actions, etc. the ONLY thing that fails is publishing. I'm not 
> sure what to do next at this point so I wanted to see if anyone had ever 
> run into this. Below I will also paste the apache config for the proxy/ssl 
> term server and the web head for comparison. 
>
>
> SSL Proxy :: 
>
> 
>
>   ServerName reviewboard.COMPANYNAME.com 
> 
>
>   SSLEngine on
>
>   SSLProtocol all -SSLv2
>
>   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
>
>   SSLCertificateFile /etc/pki/entrust-certs/
> star.COMPANYNAME.com/star.COMPANYNAME.com.crt 
> 
>
>   SSLCertificateKeyFile /etc/pki/entrust-certs/
> star.COMPANYNAME.com/star.COMPANYNAME.com.key 
> 
>
>   SSLCACertificateFile /etc/pki/entrust-certs/
> star.COMPANYNAME.com/star.COMPANYNAME.com_bundle.crt 
> 
>
> #  SSLCertificateFile /etc/pki/tls/certs/COMPANYNAME.com.crt
>
> #  SSLCertificateKeyFile /etc/pki/tls/certs/COMPANYNAME.com.key
>
> #  SSLCACertificateFile /etc/pki/tls/certs/gd_bundle.crt
>
>
>   # Default to not cache anything
>
>   ExpiresActive On
>
>   ExpiresDefault "access plus 0 seconds"
>
>
>   # Cache just images
>
>   ExpiresBy

Re: Issues publishing review with ReviewBoard

2014-09-11 Thread Jeremy Wall
I also am having this problem.

ReviewBoard 2.0.6

I've made all the modifications suggested in this thread.

Apache acting as proxy terminating in ssl. I did some further digging and 
see something strange:

The rbt debug output:

>>> Using candidate path 'default': 
'https://code.corp.vaeit.com/repos/vae.itpie'
>>> repository info: Path: https://code.corp.vaeit.com/repos/vae.itpie, 
Base path: , Supports changesets: False
>>> Making HTTP GET request to https://code.corp.vaeit.com/reviews/api/
>>> Running: hg parents --hidden -r 0
>>> Running: hg identify -i --hidden -r 5481 --config 
extensions.rbtoolsnormalize=/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/helpers/hgext.py
>>> Running: hg parents --hidden -r 56a82eed0038 --template {node|short} 
--config 
extensions.rbtoolsnormalize=/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/helpers/hgext.py
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n 
default -r cb8e1227ee09
>>> Command exited with rc 1: ['hg', '-q', 'outgoing', '--template', 
'{rev}\\t{node|short}\\t{branch}\\n', 'default', '-r', 'cb8e1227ee09']
---
>>> 0 outgoing changesets between remote and base.
>>> Running: hg diff --hidden -r cb8e1227ee09 -r 56a82eed0038 --config 
extensions.rbtoolsnormalize=/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/helpers/hgext.py
>>> Running: hg locate -r cb8e1227ee09
>>> Running: hg locate -r 56a82eed0038
>>> Running: hg log --hidden -r cb8e1227ee09::56a82eed0038 --template 
{desc}ddb6b197-39e5-11e4-b993-3c15c2cf747a --config 
extensions.rbtoolsnormalize=/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/helpers/hgext.py
>>> Making HTTP GET request to 
https://code.corp.vaeit.com/reviews/api/review-requests/
>>> Making HTTP POST request to 
http://code.corp.vaeit.com/reviews/api/review-requests/
Traceback (most recent call last):
  File "/usr/local/bin/rbt", line 8, in 
load_entry_point('RBTools==0.6.2', 'console_scripts', 'rbt')()
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/commands/main.py",
 
line 134, in main
command.run_from_argv([RB_MAIN, command_name] + args)
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/commands/__init__.py",
 
line 416, in run_from_argv
exit_code = self.main(*args) or 0
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/commands/post.py",
 
line 784, in main
submit_as=self.options.submit_as)
  File 
"/Library/Python/2.7/site-packages/RBTools-0.6.2-py2.7.egg/rbtools/commands/post.py",
 
line 526, in post_request
review_request.get_diffs().upload_diff(diff_content,
AttributeError: 'ListResource' object has no attribute 'get_diffs'

Notice it makes the get request to https but the post request to http. I 
used curl to get the contents of the get request:

curl https://user:p...@code.corp.vaeit.com/reviews/api/review-requests/
{"total_results": 0, "stat": "ok", "review_requests": [], "links": {"self": 
{"href": "https://code.corp.vaeit.com/reviews/api/review-requests/";, 
"method": "GET"}, "create": {"href": 
"https://code.corp.vaeit.com/reviews/api/review-requests/";, "method": 
"POST"}}}

And all the urls look correct in there. It looks as if rbt is not using the 
links disclosed in the api request.

On Thursday, December 6, 2012 3:40:08 AM UTC-6, Christian Hammond wrote:
>
> Hi Brian,
>
> One more thing to sanity check. If you go to your General Settings page, 
> do you have the server set as http://blah, or https://blah ?
>
> Christian
>
> -- 
> Christian Hammond - chi...@chipx86.com 
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
>
> On Wed, Dec 5, 2012 at 4:59 PM, Brian Lewis <*...@brianlewis.us 
> > wrote:
>
>> Hi Christian,
>>
>> Yes - I just stopped apache and manually restarted it as well just to 
>> make sure. Here's a copy of the reviewboard.wsgi file :: 
>>
>>
>> import os
>> import sys
>>
>> os.environ['DJANGO_SETTINGS_MODULE'] = "reviewboard.settings"
>> os.environ['PYTHON_EGG_CACHE'] = "/var/www/reviewboard/tmp/egg_cache"
>> os.environ['HOME'] = "/var/www/reviewboard/data"
>> os.environ['HTTPS'] = 'on'
>> sys.path = ['/var/www/reviewboard/conf'] + sys.path
>>
>> import django.core.handlers.wsgi
>> application = django.core.handlers.wsgi.WSGIHandler()
>>
>>
>>
>> On Wednesday, December 5, 2012 4:52:12 PM UTC-8, Christian Hammond wrote:
>>
>>> Just to sanity check, did you reload Apache?
>>>
>>> We put in absolute URLs, and we tell Django to build those for us. 
>>> Django will insert "https" if it sees the "HTTPS" environment variable set 
>>> to "on", and "http" otherwise. Provided the process is ending up with this 
>>> environment variable set, and the server is reloaded, it should be working. 
>>> Would you mind pasting the reviewboard.wsgi file?
>>>
>>> Christian
>>>
>>> -- 
>>> Christian Hammond - chi...@chipx86.com
>>> Review Board - http://www.reviewboard.org
>>> VMware, Inc. - http:

Re: Can't change Server field

2014-09-10 Thread Jeremy Wall
Done: https://code.google.com/p/reviewboard/issues/detail?id=3563

A short term fix would be to have the form prompt the editor that this 
change will require a restart of the server to prevent confusion.

On Wednesday, September 10, 2014 2:50:10 PM UTC-5, Christian Hammond wrote:
>
> This is stored in Django's Sites tables. It does require a restart right 
> now, as there's no state tracking to know from other threads that the table 
> has changed. If you want to file a bug report, we can look into improving 
> this. 
>
> Christian 
>
> -- 
> Christian Hammond - chri...@beanbaginc.com  
> Review Board - https://www.reviewboard.org 
> Beanbag, Inc. - https://www.beanbaginc.com 
>
>
> On September 10, 2014 at 12:45:35 PM, Jeremy Wall (jerem...@vaeit.com 
> ) wrote: 
> > I also had this issue and restarting the server fixed it. ReviewBoard 
> > 2.0.6. It's a little disconcerting to have to restart the server for 
> this 
> > change. Where is the setting stored? I didn't see it in the site-config 
> via 
> > rb-site manage anywhere. 
> > 
> > On Tuesday, July 8, 2014 2:24:55 PM UTC-5, Christian Hammond wrote: 
> > > 
> > > Can you try restarting the web server after modifying that setting? 
> > > 
> > > Christian 
> > > 
> > > -- 
> > > Christian Hammond - chri...@beanbaginc.com 
> > > Review Board - http://www.reviewboard.org 
> > > Beanbag, Inc. - http://www.beanbaginc.com 
> > > 
> > > On July 8, 2014 at 12:24:02 PM, Alfred von Campe (alf...@von-campe.com 
> > > ) wrote: 
> > > 
> > > On Jul 8, 2014, at 15:12, Christian Hammond > > > wrote: 
> > > 
> > > Which version of Review Board is this? I remember an old bug about 
> this, 
> > > but it has since been fixed. 
> > > 
> > > 
> > > The latest available via the EPEL repo: 1.7.25 
> > > 
> > > Alfred 
> > > 
> > > 
> > > -- 
> > > Get the Review Board Power Pack at 
> http://www.reviewboard.org/powerpack/ 
> > > --- 
> > > Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ 
> > > --- 
> > > Happy user? Let us know at http://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 reviewboard...@googlegroups.com . 
> > > For more options, visit https://groups.google.com/d/optout. 
> > > 
> > > 
>
>

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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 reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can't change Server field

2014-09-10 Thread Jeremy Wall
I also had this issue and restarting the server fixed it. ReviewBoard 
2.0.6. It's a little disconcerting to have to restart the server for this 
change. Where is the setting stored? I didn't see it in the site-config via 
rb-site manage anywhere.

On Tuesday, July 8, 2014 2:24:55 PM UTC-5, Christian Hammond wrote:
>
> Can you try restarting the web server after modifying that setting?
>
> Christian
>
> -- 
> Christian Hammond - chri...@beanbaginc.com 
> Review Board - http://www.reviewboard.org
> Beanbag, Inc. - http://www.beanbaginc.com
>
> On July 8, 2014 at 12:24:02 PM, Alfred von Campe (alf...@von-campe.com 
> ) wrote:
>
> On Jul 8, 2014, at 15:12, Christian Hammond  > wrote:
>
>  Which version of Review Board is this? I remember an old bug about this, 
> but it has since been fixed.
>
>
> The latest available via the EPEL repo: 1.7.25
>
> Alfred
>
>
> --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://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 reviewboard...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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 reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.