From nobody Fri Apr 19 09:27:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1486660126717134.61795635635565; Thu, 9 Feb 2017 09:08:46 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id B70B38205F3; Thu, 9 Feb 2017 17:08:45 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id 85B7482055B for ; Thu, 9 Feb 2017 17:08:21 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v19GxZgP143236 for ; Thu, 9 Feb 2017 12:08:20 -0500 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0b-001b2d01.pphosted.com with ESMTP id 28gr4dn5r3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 09 Feb 2017 12:08:20 -0500 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Feb 2017 15:08:18 -0200 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Feb 2017 15:08:17 -0200 Received: from d24relay04.br.ibm.com (d24relay04.br.ibm.com [9.18.232.146]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id EF9821DC0071 for ; Thu, 9 Feb 2017 12:08:17 -0500 (EST) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v19H8G2333554454 for ; Thu, 9 Feb 2017 15:08:16 -0200 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v19H8GHl011922 for ; Thu, 9 Feb 2017 15:08:17 -0200 Received: from t440.ibm.com ([9.85.191.221]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v19H8CKx011858; Thu, 9 Feb 2017 15:08:15 -0200 X-Original-To: kimchi-devel@ovirt.org From: Lucio Correia To: Kimchi Devel Date: Thu, 9 Feb 2017 15:08:10 -0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486660091-20484-1-git-send-email-luciojhc@linux.vnet.ibm.com> References: <1486660091-20484-1-git-send-email-luciojhc@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020917-0024-0000-0000-00000151BEFC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020917-0025-0000-0000-00001615E3CE Message-Id: <1486660091-20484-2-git-send-email-luciojhc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-09_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=8 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702090153 Subject: [Kimchi-devel] [PATCH] [Wok 1/2] Fix value of max_body_size example in config X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The correct default value is 4 MB, not 4 GB. Signed-off-by: Lucio Correia --- src/wok.conf.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wok.conf.in b/src/wok.conf.in index 3806609..0e9b993 100644 --- a/src/wok.conf.in +++ b/src/wok.conf.in @@ -19,8 +19,8 @@ # Running environment of the server #environment =3D production =20 -# Max request body size in KB, default value is 4GB -#max_body_size =3D 4 * 1024 * 1024 +# Max request body size in KB, default value is 4MB +#max_body_size =3D 4 * 1024 =20 # Wok server root. Set the following variable to configure any relative pa= th to # the server. For example, to have Wok pointing to https://localhost:8001/= wok/ --=20 2.7.4 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel From nobody Fri Apr 19 09:27:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 14866601388631004.9729623244532; Thu, 9 Feb 2017 09:08:58 -0800 (PST) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id E64938205C2; Thu, 9 Feb 2017 17:08:56 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id 017618205AB for ; Thu, 9 Feb 2017 17:08:22 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v19H6rRZ130594 for ; Thu, 9 Feb 2017 12:08:22 -0500 Received: from e24smtp02.br.ibm.com (e24smtp02.br.ibm.com [32.104.18.86]) by mx0a-001b2d01.pphosted.com with ESMTP id 28g8kh1ec7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 09 Feb 2017 12:08:22 -0500 Received: from localhost by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Feb 2017 15:08:20 -0200 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Feb 2017 15:08:19 -0200 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id 6761E352006C for ; Thu, 9 Feb 2017 12:07:45 -0500 (EST) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay01.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v19H8IVm4899058 for ; Thu, 9 Feb 2017 15:08:18 -0200 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v19H8Imq011936 for ; Thu, 9 Feb 2017 15:08:18 -0200 Received: from t440.ibm.com ([9.85.191.221]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v19H8CL0011858; Thu, 9 Feb 2017 15:08:17 -0200 X-Original-To: kimchi-devel@ovirt.org From: Lucio Correia To: Kimchi Devel Date: Thu, 9 Feb 2017 15:08:11 -0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486660091-20484-1-git-send-email-luciojhc@linux.vnet.ibm.com> References: <1486660091-20484-1-git-send-email-luciojhc@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17020917-0020-0000-0000-00000285ADB0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17020917-0021-0000-0000-0000309FCF92 Message-Id: <1486660091-20484-3-git-send-email-luciojhc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-09_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702090153 Subject: [Kimchi-devel] [PATCH] [Wok 2/2] Do not use proxy when running tests X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Currently administration permissions are required to run tests in order to change nginx configuration. With this patch, tests requests are handled directly by cherrypy, without being proxied by nginx. This allows tests to be run without administration permissions. Signed-off-by: Lucio Correia Reviewed-by: Aline Manera --- src/wok/server.py | 5 +++-- tests/utils.py | 14 +++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/wok/server.py b/src/wok/server.py index d99b91f..901940c 100644 --- a/src/wok/server.py +++ b/src/wok/server.py @@ -68,8 +68,9 @@ class Server(object): if hasattr(options, item): config.config.set(sec, item, str(getattr(options, item= ))) =20 - # Check proxy configuration - check_proxy_config() + # Check proxy configuration when not in test mode + if not hasattr(options, 'test') or not options.test: + check_proxy_config() =20 make_dirs =3D [ os.path.abspath(config.get_log_download_path()), diff --git a/tests/utils.py b/tests/utils.py index 9c18637..ef8ae21 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -24,9 +24,7 @@ import base64 import cherrypy import grp import httplib -import inspect import os -import ssl import sys import threading import time @@ -40,7 +38,7 @@ from wok.exception import NotFoundError, OperationFailed from wok.utils import wok_log =20 HOST =3D '0.0.0.0' -PROXY_PORT =3D 8001 +PORT =3D 8010 =20 fake_user =3D {'root': 'letmein!'} =20 @@ -91,7 +89,7 @@ if sys.version_info[:2] =3D=3D (2, 6): def run_server(test_mode, environment=3D'dev', server_root=3D''): =20 args =3D type('_', (object,), - {'cherrypy_port': 8010, 'max_body_size': '4*1024', + {'cherrypy_port': PORT, 'max_body_size': '4*1024', 'test': test_mode, 'access_log': '/dev/null', 'error_log': '/dev/null', 'environment': environment, 'log_level': 'debug', 'session_timeout': 10, @@ -122,13 +120,7 @@ def _request(conn, path, data, method, headers): =20 =20 def request(path, data=3DNone, method=3D'GET', headers=3DNone): - # verify if HTTPSConnection has context parameter - if "context" in inspect.getargspec(httplib.HTTPSConnection.__init__).a= rgs: - context =3D ssl._create_unverified_context() - conn =3D httplib.HTTPSConnection(HOST, PROXY_PORT, context=3Dconte= xt) - else: - conn =3D httplib.HTTPSConnection(HOST, PROXY_PORT) - + conn =3D httplib.HTTPConnection(HOST, PORT) return _request(conn, path, data, method, headers) =20 =20 --=20 2.7.4 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel