Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1847

vppctl in non-interactive mode always returns 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 19.04
    • None
    • CLI
    • None

      vppctl return code is always 0, regardless of command success or fail.

       

      Example:

      vpp unix '{' nodaemon cli-listen /run/vpp/cli.sock '}' dpdk '{' no-pci '}' session '{' evt_qs_memfd_seg '}' socksvr '{' socket-name /run/vpp-api.sock '}' plugins '{' plugin default '{' disable '}' plugin dpdk_plugin.so '{' enable '}' '}'
      
      [root@GrizzlyPass14 spdk]# vppctl show version; echo $?
      vpp v19.04.2-release built by sys_sgci on GrizzlyPass14 at Mon 09 Mar 2020 03:45:41 PM CET
      0
      
      [root@GrizzlyPass14 spdk]# vppctl show; echo $?
      show: unknown input `'
      0
      [root@GrizzlyPass14 spdk]# vppctl shOOOw; echo $?
      unknown input `shOOOw'
      0
      
      
      [root@GrizzlyPass14 spdk]# vppctl show interface
                    Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count
      host-spdk_tgt_int                 1      up          1460/0/0/0     rx packets                    10
                                                                          rx bytes                     700
                                                                          drops                         10
                                                                          ip6                           10
      local0                            0     down          0/0/0/0
      
      [root@GrizzlyPass14 spdk]# vppctl show interface XXXX; echo $?
      show interface: unknown input `XXXX'
      0
      [root@GrizzlyPass14 spdk]# vppctl set interface mtu 1500 host-spdk_TGT_int; echo $?
      set interface mtu: unknown input `1500 host-spdk_TGT_int'
      0
      [root@GrizzlyPass14 spdk]# vppctl set interface mtu 10 host-spdk_tgt_int; echo $?
      set interface mtu: Invalid mtu (10): must be >= min pkt bytes (64)
      0
      [root@GrizzlyPass14 spdk]# vppctl set interface state host-spdk_tgt_int up; echo $?
      0
      [root@GrizzlyPass14 spdk]# vppctl set interface state host-spdk_tgt_int SomeState; echo $?
      set interface state: unknown flags `SomeState'
      0
      
      

       

            chrisluke Chris Luke
            klateckx Karol Latecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: