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