ignore bridge name changes by default
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
7af7c876e4
commit
9451e162a0
|
@ -273,11 +273,14 @@ func updateNetwork(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error)
|
|||
// log.Info("OKAY. FOUND ETH:", eth.Mac, eth.Name, brname)
|
||||
found = true
|
||||
if eth.Name != brname {
|
||||
log.Info("network changed bridge name:", eth.Mac, eth.Name, brname)
|
||||
if argv.IgnoreBr {
|
||||
log.Info("ignoring network changed bridge name:", eth.Mac, eth.Name, brname)
|
||||
} else {
|
||||
return nil, errors.New("bridge name changed")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
var eth *pb.Network
|
||||
eth = new(pb.Network)
|
||||
|
|
1
argv.go
1
argv.go
|
@ -13,6 +13,7 @@ var argv args
|
|||
type args struct {
|
||||
Xml []string `arg:"--libvirt" help:"import qemu xml files: --libvirt /etc/libvirt/qemu/*.xml"`
|
||||
IgnoreCpu bool `arg:"--xml-ignore-cpu" default:"true" help:"ignore non-standard libvirt xml cpus"`
|
||||
IgnoreBr bool `arg:"--xml-ignore-net" default:"true" help:"ignore network bridge name changes"`
|
||||
Save bool `arg:"--save" default:"false" help:"save protobuf config after import"`
|
||||
Config string `arg:"env:VIRTIGO_HOME" help:"defaults to ~/.config/virtigo/"`
|
||||
Port int `arg:"--port" default:"8080" help:"allow droplet events via http"`
|
||||
|
|
Loading…
Reference in New Issue