Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3170 by eyuw...@gmail.com: RBTools: A critical bug for handling P4Proxy
http://code.google.com/p/reviewboard/issues/detail?id=3170

What version are you running?
RBTools 0.5.2

We have multiple sites in our company where each site has a local proxy set up for central Perforce servers. This means the proxy server has a hostname and an IP address whereas the central Perforce server has a different hostname and a different IP address.

In PerforceClient() in rbtools/clients/perforce.py, your code tries to construct the actual repository_path by the lookup result from socket.gethostbyaddr(). This is incorrect *unless* we also register the proxy server in Review Board's repository table.

This following code should be commented out to make things work:

182             info = socket.gethostbyaddr(hostname)
183
184             # If aliases exist for hostname, create a list of alias:port
185             # strings for repository_path.
186             if info[1]:
187                 servers = [info[0]] + info[1]
188                 repository_path = ["%s:%s" % (server, port)
189                                    for server in servers]
190             else:
191                 repository_path = "%s:%s" % (info[0], port)

Following is my debugging info:

/mts/home1/wange/devel/bin/reviewboard/rbtools/lib/python2.6/site-packages/rbtools/clients/perforce.py(182)get_repository_info()
(Pdb) hostname
'perforce-server.....com'
(Pdb) socket.gethostbyaddr(hostname)
('perforce-proxy-server....com', [], ['10.17.193.71'])

We only register perforce-server....com in Review Board, this will cause local users who interact with perforce-proxy-server....com not able to post-review.

If you need detailed debugging information, I can send you offline emails.

Thanks
/Eric


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to