--xml-ignore-disk=true works

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-25 20:09:41 -05:00
parent b35c04414a
commit 3893ac7e3d
4 changed files with 8 additions and 9 deletions

View File

@ -10,7 +10,7 @@ all:
./virtigo --help ./virtigo --help
xml-add: xml-add:
./virtigo --libvirt ~/libvirt/*.xml ./virtigo --libvirt ~/libvirt/*.xml --xml-ignore-disk=true
start-all-droplets: start-all-droplets:
curl --silent http://localhost:8080/start?start=git.wit.org curl --silent http://localhost:8080/start?start=git.wit.org

View File

@ -173,12 +173,8 @@ func updateDroplet(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error)
alle = append(alle, e) 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) nete, err = updateDisk(d, domcfg)
if err != nil { if err != nil {
log.Info("updateDisk() failed", err)
return alle, err return alle, err
} }

View File

@ -75,9 +75,8 @@ func main() {
} }
// this is a new droplet. add it to the cluster // this is a new droplet. add it to the cluster
log.Info("Add XML Droplet here", domcfg.Name) log.Info("Add XML Droplet here", domcfg.Name)
d, newe, err := addDomainDroplet(domcfg) _, newe, err := addDomainDroplet(domcfg)
if err != nil { if err != nil {
log.Info("addDomainDroplet() error d =", d)
log.Info("addDomainDroplet() error", filename) log.Info("addDomainDroplet() error", filename)
log.Info("addDomainDroplet() error", err) log.Info("addDomainDroplet() error", err)
log.Info("libvirt XML will have to be fixed by hand") log.Info("libvirt XML will have to be fixed by hand")

View File

@ -70,8 +70,12 @@ func insertFilename(d *pb.Droplet, filename string) (*pb.Event, error) {
if dupd != nil { if dupd != nil {
log.Info("file", filename, "already on droplet", dupd.Hostname) log.Info("file", filename, "already on droplet", dupd.Hostname)
log.Info("file", filename, "on new droplet", d.Hostname) log.Info("file", filename, "on new droplet", d.Hostname)
log.Info("duplicate disk names (--xml-ignore-disk to ignore)") if argv.IgnDisk {
return nil, errors.New("duplicate disk names") 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) filebase := filepath.Base(filename)
dir := filepath.Dir(filename) dir := filepath.Dir(filename)