public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: Sven-Haegar Koch <haegar@sdinet•de>
Cc: netdev@vger•kernel.org
Subject: Re: iproute2: ip -force -batch does not continue on errors
Date: Tue, 17 Mar 2015 08:17:14 -0700	[thread overview]
Message-ID: <5508457A.7070405@cumulusnetworks.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1503171550360.18888@aurora64.sdinet.de>

On 3/17/15, 8:07 AM, Sven-Haegar Koch wrote:
> Hallo,
>
> Test szenario:
>
> # cat b.txt
> route del 1.2.3.0/24 dev eth0
> route del 1.2.4.0/24 dev eth0
> route del 1.2.5.0/24 dev eth0
> route add 1.2.3.0/24 dev eth0
>
> # ip -force -batch b.txt
> RTNETLINK answers: No such process
>
> Expectation: The three route del commands may fail if the route does
> not (yet) exist, and then (as I am using -force) the route add gets
> executed.
>
> But instead the batch processing is aborted at the first failing "route
> del" command, forcing me to execute ip once per route del instead of
> using the batchmode.
>
> Tested mainly using iproute2 3.16.0, but the current git tree seems to
> behave mostly the same, except that it only executes anything if I add
> "-f inet" to the commandline, otherwise it rejects the first line with
> 'Error: an inet prefix is expected rather than "1.2.3.0/24".'
>

I have run into this as well, I have a patch that fixes this. Will post 
it today...

      reply	other threads:[~2015-03-17 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 15:07 iproute2: ip -force -batch does not continue on errors Sven-Haegar Koch
2015-03-17 15:17 ` roopa [this message]

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=5508457A.7070405@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=haegar@sdinet$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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