+1

Also, please be aware that the VPP cli is by design "The Debug CLI" and is not intended for use as a production API. VPP cli commands can be changed without warning and without any guarantee of backwards compatibility.

Thanks,
-daw-

On 5/27/2020 8:53 AM, Chris Luke wrote:

That is quite odd indeed.  This is the sort of issue that could take some time to properly diagnose and I cannot dig in to it right away. For now, if you are not using the output, perhaps as a workaround simply redirect stdout to /dev/null?

That said, if this part of a larger application, I suspect SR provides API access and that will generally be much more performant than using vppctl.

Chris.

*From:*Chinmaya Aggarwal <chinmaya.agar...@hsc.com>
*Sent:* Wednesday, May 27, 2020 05:47
*To:* Luke, Chris <chris_l...@cable.comcast.com>; vpp-dev@lists.fd.io
*Subject:* Re: [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution giving error

Attached is the sample VPP commands script, having a delay of 50 ms. Below is the screenshot of he output we get on running the script : -

Request 88 :  time 14:05:01.906

Request 89 :  time 14:05:01.906

Request 90 :  time 14:05:02.043

  _______    _        _   _____  ___

 __/ __/ _ \  (_)__    | | / / _ \/ _ \

 _/ _// // / / / _ \   | |/ / ___/ ___/

 /_/ /____(_)_/\___/   |___/_/  /_/

vpp# Request 91 :  time 14:05:02.043

  _______    _        _   _____  ___

 __/ __/ _ \  (_)__    | | / / _ \/ _ \

 _/ _// // / / / _ \   | |/ / ___/ ___/

 /_/ /____(_)_/\___/   |___/_/  /_/

vpp# Request 92 :  time 14:05:02.213

Request 93 :  time 14:05:02.213

Request 94 :  time 14:05:02.358

The commands are executed sequentially at a gap of 50 ms. As seen from the execution time displayed by the script, we never see a situation where the gap is more than 1 sec.

Can you please guide us through this?

Thanks and Regards,

Chinmaya Agarwal.

------------------------------------------------------------------------

*From:*Luke, Chris <chris_l...@comcast.com <mailto:chris_l...@comcast.com>>
*Sent:* Tuesday, May 26, 2020 7:34 PM
*To:* Luke, Chris <chris_l...@comcast.com <mailto:chris_l...@comcast.com>>; Chinmaya Aggarwal <chinmaya.agar...@hsc.com <mailto:chinmaya.agar...@hsc.com>>; vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>> *Subject:* RE: [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution giving error

CAUTION:This email originated from an external organization

Actually, I missed one detail, if you tell vppctl to run a command using its command line arguments, it will always assume non-interactive.

The only way you’ll see the banner, then, is if the 1s session startup timer expires and it makes assumptions. In those cases that you see the output, does the script you run stall for a second?

Chris.

*From:* vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>> *On Behalf Of *Chris Luke
*Sent:* Tuesday, May 26, 2020 09:40
*To:* Chinmaya Aggarwal <chinmaya.agar...@hsc.com <mailto:chinmaya.agar...@hsc.com>>; vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> *Subject:* Re: [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution giving error

You’ll get the banner if it thinks it’s an interactive session.

Roughly vppctl does this (I am paraphrasing):

is_interactive = isatty(STDIN);

…

if (is_interactive) TERM = “vppctl”;

…

open telnet session to the CLI socket; pass the terminal information

Then in VPP:

is_interactive = (strcmp(TERM, “vppctl”) != 0);

…

if (is_interactive) emit_banner();

The passing of the terminal options in the TELNET protocol is bounded by a timer (1 second); if for whatever reason that information arrives late, VPP will make assumptions; typically that the terminal is of the ‘dumb’ type rather than non-interactive.

Does this correlate to what you are observing? Does the output you see make use of ANSI color? That would be another clue, the ‘dumb’ terminal doesn’t use color.

Chris.

*From:* vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>> *On Behalf Of *Chinmaya Aggarwal
*Sent:* Tuesday, May 26, 2020 08:19
*To:* vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
*Subject:* [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution giving error

Further adding to observations regarding above issue, we have created a script that has only vpp commands running sequentially having a constant delay between the execution of each commands. On running the script, we again see VPP shell output as shown below :-

_______    _        _   _____  ___

 __/ __/ _ \  (_)__    | | / / _ \/ _ \

 _/ _// // / / / _ \   | |/ / ___/ ___/

 /_/ /____(_)_/\___/   |___/_/  /_/


        We executed the script with delay of 10ms, 50ms and 100ms. In
        most of the cases, we get no output from vppctl command but in
        some random times, we get the vpp shell as output of the command.

Please suggest, in what scenarios does the vpp return this kind of output?

DISCLAIMER: This electronic message and all of its contents, contains information which is privileged, confidential or otherwise protected from disclosure. The information contained in this electronic mail transmission is intended for use only by the individual or entity to which it is addressed. If you are not the intended recipient or may have received this electronic mail transmission in error, please notify the sender immediately and delete / destroy all copies of this electronic mail transmission without disclosing, copying, distributing, forwarding, printing or retaining any part of it. Hughes Systique accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus.




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16531): https://lists.fd.io/g/vpp-dev/message/16531
Mute This Topic: https://lists.fd.io/mt/74477804/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to