Project

General

Profile

Actions

Bug #13191

closed

Improve net-tests zone vnic add/delete

Added by Andy Fiddaman 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The current net_common framework for running the IP forwarding tests from the network test suite adds a VNIC to a zone by adding it to the zone configuration, rebooting the zone and sleeping for a second so that it has time to settle. Instead of that, we can use dladm set-linkprop -p zone=<zone> directly to simplify the code and reduce the risk of a false positive test failure.

This change is already in OmniOS, work by Dominik Hassler.

Actions #1

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 952
Actions #2

Updated by Andy Fiddaman 7 months ago

  • Gerrit CR deleted (952)

Change (see associated Gerrit) tested on omnios via onu to illumos-gate with these modifications:

bloody% cat sparse.json
{
   "zonename" : "__ZONENAME__",
   "zonepath" : "/zones/__ZONENAME__",
   "autoboot" : "false",
   "brand" : "sparse",
   "cpu-shares" : 1,
   "ip-type" : "exclusive" 
}

bloody% for z in c r s; do
for> sed "s/__ZONENAME__/$z/" sparse.json | pfexec zadm create -b sparse $z
for> done
A ZFS file system has been created for this zone.

       Image: Preparing at /zones/c/root.

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            209/209     1300/1300      4.7/4.7 38.9k/s
...

bloody% zadm
NAME              STATUS     BRAND       RAM    CPUS  SHARES
global            running    ipkg        16G      16       1
c                 installed  sparse        -       -       1
r                 installed  sparse        -       -       1
s                 installed  sparse        -       -       1

bloody% omni onu

*** ONU to new BE 2020093001-onu

***
*** Detected ONU to illumos-gate
***

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            334/334     5601/5601  120.8/120.8      --

***
*** Adjusting image zones
***
Activated successfully
Unmounted successfully
ONU BE has been created as 2020093001-onu

bloody% pfexec init 6

The illumos Project     gate-ig_nettest-30924f2a1c      September 2020
bloody% pkg list nettest
NAME (PUBLISHER)                                  VERSION                    IFO
system/test/nettest                               0.5.11-151035.0            i--

bloody% for z in c r s; do pfexec zadm boot $z; done
bloody% zadm
NAME              STATUS     BRAND       RAM    CPUS  SHARES
global            running    ipkg        16G      16       1
c                 running    sparse        -       -       1
r                 running    sparse        -       -       1
s                 running    sparse        -       -       1

bloody% cd /opt/net-tests
/opt/net-tests
bloody% tail -3 config/ip_forwarding.config
export NT_CLIENT=c
export NT_ROUTER=r
export NT_SERVER=s

bloody% ./bin/nettest
Test: /opt/net-tests/tests/forwarding/ip_fwd_001 (run as root)    [00:34] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_002 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_003 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_004 (run as root)    [00:33] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_005 (run as root)    [00:34] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_006 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_007 (run as root)    [00:31] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_008 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_009 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_010 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_011 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_012 (run as root)    [00:31] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_013 (run as root)    [00:33] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_014 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_015 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_016 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_017 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_018 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_019 (run as root)    [00:32] [PASS]
Test: /opt/net-tests/tests/forwarding/ip_fwd_020 (run as root)    [00:31] [PASS]

Results Summary
PASS      20

Running Time:   00:10:51
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20200930T062149

and in another window, in parallel, showing that the links are in the zones.

bloody# for f in c r s; do
echo "** $f" 
zlogin $f dladm show-link
done
** c
LINK        CLASS     MTU    STATE    BRIDGE     OVER
ipft_client0 vnic     1500   up       --         ?
** r
LINK        CLASS     MTU    STATE    BRIDGE     OVER
ipft_client_r0 vnic   1500   up       --         ?
ipft_server_r0 vnic   1500   up       --         ?
** s
LINK        CLASS     MTU    STATE    BRIDGE     OVER
ipft_server0 vnic     1500   up       --         ?

Actions #3

Updated by Robert Mustacchi 7 months ago

  • Gerrit CR set to 952
Actions #4

Updated by Electric Monk 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit c3e16711de8a1209bb0e4ad2a003d0b443426f17

commit  c3e16711de8a1209bb0e4ad2a003d0b443426f17
Author: Dominik Hassler <hadfl@omniosce.org>
Date:   2020-09-30T17:20:51.000Z

    13191 Improve net-tests zone vnic add/delete
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Ryan Zezeski <ryan@zinascii.com>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF