Project

General

Profile

Bug #11604

Zones can only have a maximum of 87 vnics

Added by Alasdair Lumsden about 1 month ago. Updated 28 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zones
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

When setting up a zone, /usr/lib/brand/jcommon/statechange creates vnics for the zone. It takes a list of adapters from the environment variable _ZONECFG_net_resources, which is in turn supplied by zoneadmd.

This environment variable appears to get truncated at 512 bytes, as adding debugging yielded:

#
# Set up the vnic(s) for the zone.
#
setup_net()
{
        typeset tmp overlay tag id rule
-->        echo $_ZONECFG_net_resources > /tmp/al   <--
        for nic in $_ZONECFG_net_resources
        do

Giving:

# ls -l /tmp/al
-rw-r--r-- 1 root root 512 Aug 21 18:20 /tmp/al
# cat /tmp/al
net0 net1 net2 net3 net4 net5 net6 net7 net8 net9 net10 net11 net12 net13 net14 net15 net16 net17 net18 net19 net20 net21 net22 net23 net24 net25 net26 net27 net28 net29 net30 net31 net32 net33 net34 net35 net36 net37 net38 net39 net40 net41 net42 net43 net44 net45 net46 net47 net48 net49 net50 net51 net52 net53 net54 net55 net56 net57 net58 net59 net60 net61 net62 net63 net64 net65 net66 net67 net68 net69 net70 net71 net72 net73 net74 net75 net76 net77 net78 net79 net80 net81 net82 net83 net84 net85 net86

We can see the environment variable being set here:

https://github.com/joyent/illumos-joyent/blob/master/usr/src/cmd/zoneadmd/zoneadmd.c#L967

And the definition of net_resources shows us the 512 byte limit:

https://github.com/joyent/illumos-joyent/blob/master/usr/src/cmd/zoneadmd/zoneadmd.c#L906

On the SmartOS discuss mailing list Joshua M. Clulow suggested using a custr1 rather than a stack buffer:

https://github.com/joyent/illumos-joyent/blob/master/usr/src/lib/libcustr/common/libcustr.h

History

#1

Updated by Gergő Mihály Doma 30 days ago

How does this issue relate to illumos gate?
If I'm right, you can report SmartOS-only issues here: https://github.com/joyent/illumos-joyent/issues

#2

Updated by Alasdair Lumsden 28 days ago

Interesting, I had assumed illumos-gate would have a fairly similar zoneadmd.c but it is massively different, and the affected code isn't present in illumos-gate.

Feel free to close this.

Also available in: Atom PDF