[Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Nov 13 03:32:07 MSK 2019


Sorry, forgot a test. Will add tomorrow.

On 12/11/2019 23:03, Vladislav Shpilevoy wrote:
> Box.cfg{listen = 0} automatically chooses a port. But it was
> impossible to learn a real port the instance is bound to.
> 
> An ability to see a real port may help to make test-run more
> robust, because it won't depend on which ports are free, and
> won't need to pre-choose them in advance.
> 
> Now box.info.listen shows a real address, or nil when listen is
> turned off. Also a real address is logged instead of the dummy
> 0-port one.
> 
> Closes #4620
> 
> @TarantoolBot document
> Title: box.info.listen - real address
> 
> New value in box.info - listen. It is a real address to which the
> instance was bound. For example, if box.cfg.listen was set with
> a zero port, box.info.listen will show a real port. The address
> is stored as a string:
> 
>     - unix/:<path> for UNIX domain sockets;
>     - <ip>:<port> for IPv4;
>     - [ip]:<port> for IPv6.
> 
> If the instance does not listen anything, box.info.listen is nil.
> ---
> Branch: https://github.com/tarantool/tarantool/tree/gerold103/gh-4620-show-listen-port
> Issue: https://github.com/tarantool/tarantool/issues/4620
> 


More information about the Tarantool-patches mailing list