--xml-ignore-disk=true works
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b35c04414a
commit
3893ac7e3d
2
Makefile
2
Makefile
|
@ -10,7 +10,7 @@ all:
|
|||
./virtigo --help
|
||||
|
||||
xml-add:
|
||||
./virtigo --libvirt ~/libvirt/*.xml
|
||||
./virtigo --libvirt ~/libvirt/*.xml --xml-ignore-disk=true
|
||||
|
||||
start-all-droplets:
|
||||
curl --silent http://localhost:8080/start?start=git.wit.org
|
||||
|
|
|
@ -173,12 +173,8 @@ func updateDroplet(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error)
|
|||
alle = append(alle, e)
|
||||
}
|
||||
|
||||
log.Info("TODO: fix updateDisk() change events")
|
||||
log.Info("TODO: fix updateDisk() change events")
|
||||
log.Info("TODO: fix updateDisk() change events")
|
||||
nete, err = updateDisk(d, domcfg)
|
||||
if err != nil {
|
||||
log.Info("updateDisk() failed", err)
|
||||
return alle, err
|
||||
}
|
||||
|
||||
|
|
3
main.go
3
main.go
|
@ -75,9 +75,8 @@ func main() {
|
|||
}
|
||||
// this is a new droplet. add it to the cluster
|
||||
log.Info("Add XML Droplet here", domcfg.Name)
|
||||
d, newe, err := addDomainDroplet(domcfg)
|
||||
_, newe, err := addDomainDroplet(domcfg)
|
||||
if err != nil {
|
||||
log.Info("addDomainDroplet() error d =", d)
|
||||
log.Info("addDomainDroplet() error", filename)
|
||||
log.Info("addDomainDroplet() error", err)
|
||||
log.Info("libvirt XML will have to be fixed by hand")
|
||||
|
|
|
@ -70,9 +70,13 @@ func insertFilename(d *pb.Droplet, filename string) (*pb.Event, error) {
|
|||
if dupd != nil {
|
||||
log.Info("file", filename, "already on droplet", dupd.Hostname)
|
||||
log.Info("file", filename, "on new droplet", d.Hostname)
|
||||
if argv.IgnDisk {
|
||||
log.Info("ignore duplicate disk names (--xml-ignore-disk=true)")
|
||||
} else {
|
||||
log.Info("duplicate disk names (--xml-ignore-disk to ignore)")
|
||||
return nil, errors.New("duplicate disk names")
|
||||
}
|
||||
}
|
||||
filebase := filepath.Base(filename)
|
||||
dir := filepath.Dir(filename)
|
||||
for _, disk := range d.Disks {
|
||||
|
|
Loading…
Reference in New Issue