Browse Source

zones: improve GetCephFSID() to generate a new UUID if none was found

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/10/head
Alejandro Mery 1 year ago
parent
commit
c291b218a4
  1. 8
      pkg/zones/ceph.go

8
pkg/zones/ceph.go

@ -14,8 +14,12 @@ import (
// GetCephFSID returns our Ceph's FSID
func (m *Zones) GetCephFSID() (uuid.UUID, error) {
if core.IsZero(m.CephFSID) {
// TODO: generate one
return uuid.Nil, nil
// generate one
v, err := uuid.NewV4()
if err != nil {
return uuid.Nil, err
}
m.CephFSID = v
}
return m.CephFSID, nil
}

Loading…
Cancel
Save