Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@freelists.org>,
	Alexander Turenko <alexander.turenko@tarantool.org>,
	Kirill Yukhin <kyukhin@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 3/3] box/lua/console: Verify remote protocol for compatibility
Date: Fri, 12 Jul 2019 23:49:04 +0300	[thread overview]
Message-ID: <20190712204904.GA32340@atlas> (raw)
In-Reply-To: <20190712204719.GC31930@atlas>

* Konstantin Osipov <kostja@tarantool.org> [19/07/12 23:47]:
> > +local function output_verify_remote(greeting)
> > +    --
> > +    -- In case if remote peer is operating over
> > +    -- old yaml protocol we are unable to decode
> > +    -- it to non-yaml serializers.
> > +    if greeting.protocol == 'Lua console' then
> > +        local d = box.session.storage.console_output
> > +        if d ~= nil and d["fmt"] == "lua" then
> > +            local msg1 = "Peer uses deprecated '%s' protocol. "
> > +            local msg2 = "Switch output to 'yaml' format to proceed."
> > +            return false, msg1:format(greeting.protocol) .. msg2
> > +        end
> > +    end
> > +    return true, nil
> > +end
> 
> what is the problem with doing yaml.load and serpent.encode for
> such peers? 
> 
> What if it's a new peer but using yaml output?

Moreover, shouldn't the output setting affect only the local
server output, but not subsequent console.connect() calls? 

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-12 20:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 19:04 [tarantool-patches] [PATCH v3 0/3] box/lua/console: Add initial support for lua output format Cyrill Gorcunov
2019-07-12 19:04 ` [tarantool-patches] [PATCH 1/3] third_party/serpent: Add serpent repo Cyrill Gorcunov
2019-07-12 19:04 ` [tarantool-patches] [PATCH 2/3] box/lua/console: Add support for lua output format Cyrill Gorcunov
2019-07-12 20:45   ` [tarantool-patches] " Konstantin Osipov
2019-07-12 21:44     ` Cyrill Gorcunov
2019-07-12 19:04 ` [tarantool-patches] [PATCH 3/3] box/lua/console: Verify remote protocol for compatibility Cyrill Gorcunov
2019-07-12 20:47   ` [tarantool-patches] " Konstantin Osipov
2019-07-12 20:49     ` Konstantin Osipov [this message]
2019-07-12 21:51       ` Cyrill Gorcunov

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=20190712204904.GA32340@atlas \
    --to=kostja@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 3/3] box/lua/console: Verify remote protocol for compatibility' \
    /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