Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Ostanevich <sergos@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen
Date: Tue, 3 Mar 2020 16:26:50 +0300	[thread overview]
Message-ID: <20200303132650.GA188@tarantool.org> (raw)
In-Reply-To: <0eb599eb-153c-de4b-f184-7f6bdaebc95f@tarantool.org>


Thanks, LGTM. 
The misunderstanding with protocol was my off-the-source fault.

Sergos


On 22 фев 16:00, Vladislav Shpilevoy wrote:
> Hi! Thanks for the review!
> 
> >> Box.cfg{listen = 0} automatically chooses a port. But it was
> >> impossible to learn a real port the instance is bound to.
> >                 ^^^^^ obtain?
> 
> Done.
> 
> >> diff --git a/src/box/iproto.cc b/src/box/iproto.cc
> >> index 34c8f469a..522c066be 100644
> >> --- a/src/box/iproto.cc
> >> +++ b/src/box/iproto.cc
> >> @@ -129,6 +129,23 @@ unsigned iproto_readahead = 16320;
> >>  /* The maximal number of iproto messages in fly. */
> >>  static int iproto_msg_max = IPROTO_MSG_MAX_MIN;
> >>  
> >> +/**
> >> + * Address the iproto listens for, stored in TX
> >> + * thread. Is kept in TX to be showed in box.info.
> >                                   shown, since V3?
> 
> Done.
> 
> >> + */
> >> +static struct sockaddr_storage iproto_bound_address_storage;
> >> +/** 0 means that no address is listened. */
> >> +static socklen_t iproto_bound_address_len;
> >> +
> >> +const char *
> >> +iproto_bound_address(void)
> >> +{
> >> +	if (iproto_bound_address_len == 0)
> >> +		return NULL;
> >> +	return sio_strfaddr((struct sockaddr *) &iproto_bound_address_storage,
> >> +			    iproto_bound_address_len);
> >> +}
> >> diff --git a/src/box/iproto.h b/src/box/iproto.h
> >> index edb24a7ed..201e09df5 100644
> >> --- a/src/box/iproto.h
> >> +++ b/src/box/iproto.h
> >> @@ -80,6 +80,13 @@ iproto_request_count(void);
> >>  void
> >>  iproto_reset_stat(void);
> >>  
> >> +/**
> >> + * String representation of the address served by
> >> + * iproto. To be showed in box.info.
> >                     shown
> 
> Done.

  reply	other threads:[~2020-03-03 13:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 22:03 Vladislav Shpilevoy
2019-11-13  0:32 ` Vladislav Shpilevoy
2019-11-13 22:31 ` Vladislav Shpilevoy
2020-02-21 19:51 ` Sergey Ostanevich
2020-02-22  8:34   ` Sergey Ostanevich
2020-02-22 14:47     ` Vladislav Shpilevoy
2020-02-22 15:00   ` Vladislav Shpilevoy
2020-03-03 13:26     ` Sergey Ostanevich [this message]
2020-02-22 15:00 ` Vladislav Shpilevoy
2020-03-18 18:18 ` Serge Petrenko
2020-03-18 22:38   ` Vladislav Shpilevoy
2020-03-19 10:24     ` Serge Petrenko
2020-03-19 10:45 ` Kirill Yukhin

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=20200303132650.GA188@tarantool.org \
    --to=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox