Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ih7Zc-0006k3-J3 for pgadmin-hackers@arkaria.postgresql.org; Tue, 17 Dec 2019 07:47:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ih7Yd-0004HG-9v for pgadmin-hackers@arkaria.postgresql.org; Tue, 17 Dec 2019 07:46:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ih7Yc-0004Gb-Tq for pgadmin-hackers@lists.postgresql.org; Tue, 17 Dec 2019 07:46:15 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ih7Ya-0007lZ-0c for pgadmin-hackers@postgresql.org; Tue, 17 Dec 2019 07:46:14 +0000 Received: by mail-io1-xd41.google.com with SMTP id c16so8025284ioh.6 for ; Mon, 16 Dec 2019 23:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nDBElBoNv7/RNMu6MQyhjwica4v/8crFnppElazKYdk=; b=zAeI74LxKRKf9BjIzAdDWsBpY56EWoJzhfEUQJ2dl8DPJUNQD49ZOfzwGnMvMYsULi UpiyT0UxJO/r2/DwYhb6t6K6VgbqcAkkxiQ557C5xy4g53IuWpEL4QkkWyrPuQ/SPwVl YQ3Sob5OfFkhewOR67AWvkIS+oX6ieesfDyK9/InZKP2PUyK7JKOY4H2Ph8AEnYrjsvC TgJwZKjs4v3bmGypXWi34l8bnne7ohgyvvth348IA8REuepEGWBiWanpuRt5OS6iWDQ6 XVnxGuqq1dWOgMW4i00ylABmfcsg0BjfPJGGHYCCljp0z82PD4u7RVktKfUJVoShWlQj QdEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nDBElBoNv7/RNMu6MQyhjwica4v/8crFnppElazKYdk=; b=h3wld/NwAMEBWzLIVPE3SW7MQ3S0ZdObUJDP7wrNFj5CVUT37HaMrfrFwe1JMVORpL qSJuMPxPOwahHETo7zlDLEdG0rknItJhnWnoKpSNVpl1RlqGl/rWOMBaACyzAgK7lnr1 XAUxco3tTwnjgtC8rVv8vXzQJYzcWlkwiDW6YQhk840kgFk7ONyXCCJvOoxa8PvPW5Al qG7DkJ4fzL/3kam+8li8bNa7uxEU/NtKFG94Tnl8tHnG3Suj7CWerYHgglwJ1sNpsjza kSw1obZE1nR1jzgHHHPh+YtHK7VQXQcggS9GjkEDPbzA/A1dDtRaGPVT6SHQ9875VVQG Tf1w== X-Gm-Message-State: APjAAAVoudNCljjcrZD8ODqHSIyNb0hiKVNggRWj6DJAS5k07ZVLmYeS Y0Ts6hW5UdyAGPyA++KQt0owIVVdMOnvFSW+pDA0siFyDejCLhEHCgfz13r7aVtPpTNsV0aotdD gRghinvo5LFdVdZmwbj2NJwMkB3ijZu37mGmdk5dz1y+pAFgasq0xvzZRwphrwORPKqlKxwassS +dyFAdQt5SICzGytIObVCgZC5yxS4oVobGIeNbbwW5h5Ek1WvPtI8= X-Google-Smtp-Source: APXvYqy1zqJexjKPvLbH117OkCQ05OhNq4wNDhXbhad8U+mTzMsxQcOTSsLAlzWEXDQCrAAd6gi1K02zAtrjTPL4niA= X-Received: by 2002:a5d:8854:: with SMTP id t20mr2662422ios.121.1576568769608; Mon, 16 Dec 2019 23:46:09 -0800 (PST) MIME-Version: 1.0 References: <74F4D0C2ACDFA04BA40C6475ADAE217529FA3FDA@pdexchbalwst03.ad.insee.intra> <74F4D0C2ACDFA04BA40C6475ADAE217529FA40C2@pdexchbalwst03.ad.insee.intra> In-Reply-To: <74F4D0C2ACDFA04BA40C6475ADAE217529FA40C2@pdexchbalwst03.ad.insee.intra> From: Akshay Joshi Date: Tue, 17 Dec 2019 13:15:58 +0530 Message-ID: Subject: Re: [Pgadmin] [Docker] servers.json import fails when running in desktop mode To: Levitt Olivier Cc: Ashesh Vashi , "pgadmin-hackers@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000007a195f0599e185f1" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000007a195f0599e185f1 Content-Type: text/plain; charset="UTF-8" Thanks, patch applied. On Mon, Dec 16, 2019 at 4:42 PM Levitt Olivier wrote: > Hi, > > Here is a patch (first contribution \o/) that solves the issue by > importing the servers.json anonymously when running in DESKTOP mode. > There may be a better way to check if we are running in DESKTOP mode or > not but checking PGADMIN_CONFIG_SERVER_MODE should be enough when running > pgadmin4 in docker. > > Regards, > Olivier Levitt > > > ________________________________________ > From: Ashesh Vashi [ashesh.vashi@enterprisedb.com] > Sent: 14 December 2019 05:52 > To: Levitt Olivier > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [Pgadmin] [Docker] servers.json import fails when running in > desktop mode > > > > On Sat, Dec 14, 2019 at 3:53 AM Levitt Olivier > wrote: > Hi, > > When running the docker image in desktop mode > (PGADMIN_CONFIG_SERVER_MODE=False), no user is created. That is expected > behaviour. > But then the code that imports the servers.json pre-configuration fails as > it ties the import to the default user. > > I think line 40 of entrypoint.sh ( > https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=pkg/docker/entrypoint.sh;h=47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=HEAD) > should not specify a user when running in dekstop mode. > I tested it without --user parameter and it successfully imported the > servers.json configuration. > > Should I submit a patch ? First time contributing to Pgadmin :) > Please do. > > > -- > > Thanks & Regards, > > Ashesh Vashi > EnterpriseDB INDIA: Enterprise PostgreSQL Company< > http://www.enterprisedb.com> > > > http://www.linkedin.com/in/asheshvashi > > Regards, > Olivier Levitt > > > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* --0000000000007a195f0599e185f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.

On Mon, Dec 16, 2019 at 4:42 PM Levi= tt Olivier <olivier.levitt@in= see.fr> wrote:
Hi,

Here is a patch (first contribution \o/) that solves the issue by importing= the servers.json anonymously when running in DESKTOP mode.=C2=A0
There may be a better way to check if we are running in DESKTOP mode or not= but checking PGADMIN_CONFIG_SERVER_MODE should be enough when running pgad= min4 in docker.=C2=A0

Regards,
Olivier Levitt


________________________________________
From: Ashesh Vashi [ashesh.vashi@enterprisedb.com]
Sent: 14 December 2019 05:52
To: Levitt Olivier
Cc: pga= dmin-hackers@postgresql.org
Subject: Re: [Pgadmin] [Docker] servers.json import fails when running in d= esktop mode

<http://www.linkedin.com/in/asheshvashi>

On Sat, Dec 14, 2019 at 3:53 AM Levitt Olivier <olivier.levitt@insee.fr<mailto:= olivier.levitt= @insee.fr>> wrote:
Hi,

When running the docker image in desktop mode (PGADMIN_CONFIG_SERVER_MODE= =3DFalse), no user is created. That is expected behaviour.
But then the code that imports the servers.json pre-configuration fails as = it ties the import to the default user.

I think line 40 of entrypoint.sh (https://git.postgresql.org/gitweb/?p=3Dpgadmin4.git;a=3Dblob;f=3Dpkg/doc= ker/entrypoint.sh;h=3D47d14bf2d415777c64b221fb1fc75d61c5e3cecc;hb=3DHEAD) should not specify a user when running in dekstop mode.
I tested it without --user parameter and it successfully imported the serve= rs.json configuration.

Should I submit a patch ? First time contributing to Pgadmin :)
Please do.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company<
http://www.enterpris= edb.com>


http://www.linkedin.com/in/asheshvashi

Regards,
Olivier Levitt




--
Thanks & Regards
=
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
=
Mobile: += 91 976-788-8246
--0000000000007a195f0599e185f1--