netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: mayhs11saini@gmail.com
Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [Bug 1224] nft export json fails with successful return code
Date: Tue, 6 Feb 2018 13:40:34 +0100	[thread overview]
Message-ID: <20180206124034.GU25722@orbyte.nwl.cc> (raw)
In-Reply-To: <bug-1224-1689-5HSmtdM7gJ@https.bugzilla.netfilter.org/>

On Tue, Feb 06, 2018 at 02:44:06AM +0000, bugzilla-daemon@netfilter.org wrote:
> https://bugzilla.netfilter.org/show_bug.cgi?id=1224
[...]
> --- Comment #1 from Shyam Saini <mayhs11saini@gmail.com> ---
> Hi Anthony,
> 
> > I recently upgraded to nftables v0.8.2 and encountered a regression.
> > 
> > "nft export json" no longer works, it returns a success code (0), but
> > doens't print any JSON data.
> > 
> > A git bisect determined this was introduced in commit
> > 2fa54d8a49352bda44d3e25d1d7ba3531faf3303, and upon reading that commit, I
> > noticed the introduction of "nft export vm json" which does work as expected.
> 
> Technically when we were exporting json by "nft export json" it was giving us 
> low level virtual-machine(vm) pseudo code. So we renamed it as "vm json". 
> As you have already mentioned that you are able achieve old behaviour by 
> "nft export vm json", that is right behaviour.
> 
> Further, by this renaming it creates scope for high level json which
> represents abstract syntax tree of nft grammar. This high level json
> can be exported by "nft export json". 
> But this feature is yet to come in mainline so we are doing "no operation" we
> user executes "nft export json" and it returns 0.

This doesn't sound right to me. We break users' scripts and at the same
time make it hard for them to notice. Imagine someone uses it in a cron
job for backup purposes.

If it is really sensible to rename 'export json' to 'export vm json'
(and I doubt that), there should be at least a grace period in which the
old command returns an error and complains loudly.

Cheers, Phil

       reply	other threads:[~2018-02-06 12:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-1224-1689@https.bugzilla.netfilter.org/>
     [not found] ` <bug-1224-1689-5HSmtdM7gJ@https.bugzilla.netfilter.org/>
2018-02-06 12:40   ` Phil Sutter [this message]
2018-02-06 12:49     ` [Bug 1224] nft export json fails with successful return code Pablo Neira Ayuso
2018-02-06 14:13       ` Phil Sutter

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=20180206124034.GU25722@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=mayhs11saini@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).