Bug #3347
closedzonecfg(1M) is confused about selection
100%
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.
Updated by Gary Mills almost 9 years ago
- Status changed from New to Feedback
- Assignee set to Gary Mills
I'll see what I can do with this one.
Updated by Gary Mills almost 9 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
Updated by Gary Mills almost 9 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) {
Updated by Electric Monk almost 9 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>