ceph: generate fsid if needed, and export FSID on env #10

Merged
amery merged 3 commits from pr-amery-ceph-fsid into main 2023-09-05 22:13:10 +02:00
Showing only changes of commit c291b218a4 - Show all commits
+6 -2
View File
@@ -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
}