Re: BUG #9003: Hard-coding to localhost in postmaster

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Paul Morie <pmorie(at)redhat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9003: Hard-coding to localhost in postmaster
Date: 2014-01-28 19:51:46
Message-ID: 20140128195146.GP20898@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 28, 2014 at 02:46:52PM -0500, Paul Morie wrote:
> Apologies: I should have explained more of the context in my original post to this list.
> I work for Red Hat on OpenShift and discovered this while investigating error messages
> in the postgres logs (the bug report in OpenShift: https://bugzilla.redhat.com/show_bug.cgi?id=1024676).
> Since it impacts the autovacuum functionality for our users, I wanted to see if I could
> get an upstream fix.
>
> In OpenShift, user processes run inside a 'gear' - which has its own /etc/passwd entry,
> selinux context, etc. Each gear user gets a 127.x.x.x loopback device to bind to so it
> can all use the same ports like 8080 for web traffic, 5432 for postgres. That's only
> possible if each gear gets its own unique loopback address. Binding to
> localhost/127.0.0.1 is explicitly disallowed.
>
> We are not currently using network namespaces in OpenShift because they were not available
> in the RHEL kernel until 6.5 (released Nov 2013). Now that they're supported, using them
> in OpenShift is one of our high-priority items.
>
> Hope that clarifies why I would be interested in this option :)

Based on your setup, why would you not DNS-map "localhost" to whatever
127.x.x.x address you gave that gear? We specifically bind to the
"localhost" string and not 127.0.0.1.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-01-28 20:00:48 Re: BUG #9003: Hard-coding to localhost in postmaster
Previous Message Paul Morie 2014-01-28 19:46:52 Re: BUG #9003: Hard-coding to localhost in postmaster