From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0076E475E for ; Fri, 9 Dec 2016 13:11:18 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 09 Dec 2016 04:11:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,324,1477983600"; d="scan'208";a="1096895072" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga002.fm.intel.com with ESMTP; 09 Dec 2016 04:11:00 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.91]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 12:10:59 +0000 From: "Mcnamara, John" To: Thomas Monjalon CC: "Wei, FangfangX" , "ci@dpdk.org" , "Xu, Qian Q" , "Liu, Yong" , "Chen, WeichunX" Thread-Topic: [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch Thread-Index: AQHSTvs6j8bmknyvukm9cPiq/EgGMKD6d7SAgAAjDwCAAWJ3gIAAPnsAgAGKDICAAEVfgIABSdoAgAAG7YCAAA2H8IAAAc8AgAAggqA= Date: Fri, 9 Dec 2016 12:11:00 +0000 Message-ID: References: <1480599892-14190-1-git-send-email-thomas.monjalon@6wind.com> <5527892.MAichyp85O@xps13> <2627126.3MAZ6CHQzW@xps13> In-Reply-To: <2627126.3MAZ6CHQzW@xps13> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTNkNzk5MWQtMzc3Ni00ZjkyLTkyNjAtZGIzYTdiMmViNTNkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IklLQ2s4UDhLMGhnKzhDUWg2ekNsbldmSU9Kc0hjWkQ0RENSV3o4cXJVdDQ9In0= x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2016 12:11:19 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, December 9, 2016 10:11 AM > To: Mcnamara, John > Cc: Wei, FangfangX ; ci@dpdk.org; Xu, Qian Q > ; Liu, Yong ; Chen, WeichunX > > Subject: Re: [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch >=20 > 2016-12-09 10:07, Mcnamara, John: > > From: ci [mailto:ci-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > > 2016-12-09 08:51, Wei, FangfangX: > > > > My internet connection is working fine, and also configure > > > > http_proxy > > > and https_proxy, but the connection is still timeout. > > > > > > > > I think that's because the rpc client can't connect to your rpc > server. > > > Is there any other configuration should be configured? > > > > > > I've found it is an open issue. pwclient does not work with proxy: > > > https://github.com/getpatchwork/patchwork/issues/47 > > > > > > > Hi, > > > > I have a hardcoded patch that allows pwclient to work within the Intel > firewall. I'll send it on to the @intel.com people. >=20 > In the meantime, I'm trying to fix the issue upstream. > And I'll send a v5 of these patches to be able to get the patch from > patchwork without requiring pwclient. Thomas, For what it is worth here is my patch. It isn't a general solution since th= e proxy is hardcoded and also it doesn't work with a proxy that requires a = password. John diff --git a/pwclient b/pwclient index dfbea30..1652a7e 100755 --- a/pwclient +++ b/pwclient @@ -29,6 +29,7 @@ import subprocess import base64 import ConfigParser import shutil +import httplib =20 # Default Patchwork remote XML-RPC server URL # This script will check the PW_XMLRPC_URL environment variable @@ -80,6 +81,22 @@ class Filter: """Return human-readable description of the filter.""" return str(self.d) =20 +class ProxiedTransport(xmlrpclib.Transport): + + def set_proxy(self, proxy): + self.proxy =3D proxy + + def make_connection(self, host): + self.realhost =3D host + h =3D httplib.HTTPConnection(self.proxy) + return h + + def send_request(self, connection, handler, request_body): + connection.putrequest("POST", 'http://%s%s' % (self.realhost, hand= ler)) + + def send_host(self, connection, host): + connection.putheader('Host', self.realhost) + class BasicHTTPAuthTransport(xmlrpclib.SafeTransport): =20 def __init__(self, username =3D None, password =3D None, use_https =3D= False): @@ -431,7 +448,8 @@ def main(): url =3D config.get(project_str, 'url') =20 (username, password) =3D (None, None) - transport =3D None + transport =3D ProxiedTransport() + transport.set_proxy('proxy.mydomain.com:123') if action in auth_actions: if config.has_option(project_str, 'username') and \ config.has_option(project_str, 'password'):