all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Oguz Bektas <o.bektas@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [RFC 2/2 manager] proxy: allow setting BIND_IP for pveproxy
Date: Mon, 15 Feb 2021 11:00:23 +0100	[thread overview]
Message-ID: <20210215100023.GA10877@gaia.proxmox.com> (raw)
In-Reply-To: <20210210172059.6b59bc06@rosa.proxmox.com>

hi,

thanks for responding!

On Wed, Feb 10, 2021 at 05:20:59PM +0100, Stoiko Ivanov wrote:
> Thanks for looking into this!
> 
> On Wed, 10 Feb 2021 17:01:42 +0100
> Oguz Bektas <o.bektas@proxmox.com> wrote:
> 
> > default to 0.0.0.0 to preserve backwards behavior
> > 
> > Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> > ---
> >  PVE/Service/pveproxy.pm | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm
> > index 571a6bf5..ce1d42a6 100755
> > --- a/PVE/Service/pveproxy.pm
> > +++ b/PVE/Service/pveproxy.pm
> > @@ -70,7 +70,8 @@ sub init {
> >  	die "unable to open lock file '${accept_lock_fn}' - $!\n";
> >  
> >      my $family = PVE::Tools::get_host_address_family($self->{nodename});
> > -    my $socket = $self->create_reusable_socket(8006, undef, $family);
> > +    my $bind_ip = $proxyconf->{BIND_IP} // '0.0.0.0'; # default
> any reason why the '0.0.0.0' is necessary? (the socket got created with
> undef before after all) - Given that I find the inner workings of perl
> IO::Socket::IP (which gets passed the arguments in create_reusable_socket
> eventually) a bit surprising in certain situations I think leaving it as
> it was might have its merit

after looking at it more it looks like `undef` might be better indeed.

> 
> did you test it in a few different scenarios? - e.g.:
> * ipv6 only host
> * dual-stacked host
> * host with multiple interfaces and IPs

no, i've only tested ipv4 -- i'll take a look at these too

> 
> > +    my $socket = $self->create_reusable_socket(8006, $bind_ip, $family);
> >  
> >      my $dirs = {};
> >  
> 




  reply	other threads:[~2021-02-15 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 16:01 [pve-devel] [RFC http-server manager 0/2] fix #2997: allow setting BIND_IP for proxy Oguz Bektas
2021-02-10 16:01 ` [pve-devel] [RFC 1/2 http-server] utils: add BIND_IP option in /etc/default/pveproxy Oguz Bektas
2021-02-10 16:01 ` [pve-devel] [RFC 2/2 manager] proxy: allow setting BIND_IP for pveproxy Oguz Bektas
2021-02-10 16:20   ` Stoiko Ivanov
2021-02-15 10:00     ` Oguz Bektas [this message]
2021-02-10 17:02 ` [pve-devel] [RFC http-server manager 0/2] fix #2997: allow setting BIND_IP for proxy Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215100023.GA10877@gaia.proxmox.com \
    --to=o.bektas@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.ivanov@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal