Project

General

Profile

Bug #3347

zonecfg(1M) is confused about selection

Added by Rich Lowe about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zones
Start date:
2012-11-06
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

net:
    address: 172.16.0.1/24
    allowed-address not specified
    physical: afe0
    defrouter not specified
net:
    address: 172.16.1.1/24
    allowed-address not specified
    physical: puppet0
    defrouter not specified
zonecfg:puppet> select net address=172.16.1.1
select net: Insufficient specification
zonecfg:puppet> select net address=172.16.1.1/24
select net: Insufficient specification

I don't see why they're insufficient?

Also, on another host I was recently screwed by doing:

select net address=172.16.1.1
set address=172.16.1.2

and finding that both of my 'net' entries had been clobbered (this was on a host whereby both interfaces were on ipmp0, one ipv6, one ipv4). I'm not sure whether that's related.

History

#1

Updated by Gary Mills over 5 years ago

  • Status changed from New to Feedback
  • Assignee set to Gary Mills

I'll see what I can do with this one.

#2

Updated by Gary Mills over 5 years ago

The problem is that the select subcommand overwrites the in-memory data, and that the subsequent end subcommand writes it out to the underlying file. Here's an example:


'#' zonecfg -z tzone
zonecfg:tzone> info net
net:
address: 172.16.0.1/24
allowed-address not specified
physical: e1000g0
defrouter not specified
net:
address: 172.16.1.1/24
allowed-address not specified
physical: e1000g0
defrouter not specified
zonecfg:tzone> select net address=172.16.1.1
zonecfg:tzone:net> end
zonecfg:tzone> info net
net:
address: 172.16.1.1/24
allowed-address not specified
physical: e1000g0
defrouter not specified
net:
address: 172.16.1.1/24
allowed-address not specified
physical: e1000g0
defrouter not specified
zonecfg:tzone> exit

#3

Updated by Gary Mills over 5 years ago

  • % Done changed from 0 to 100

This error only occurs when the physical devices are the same in both network nodes. The culprit was this line in the zonecfg_delete_nwif_core() library function:


if ((addr_match || allowed_addr_match) && phys_match) {

#4

Updated by Electric Monk over 5 years ago

  • Status changed from Feedback to Closed

git commit 5e74f94d8c2a16c2ef7cf2940a157ffabb379c27

commit  5e74f94d8c2a16c2ef7cf2940a157ffabb379c27
Author: Gary Mills <gary_mills@fastmail.fm>
Date:   2014-07-14T15:36:04.000Z

    3347 zonecfg(1M) is confused about selection
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF