jpictl: write m/ceph.conf on sync

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-05 12:05:37 +00:00
parent ac87757b06
commit f10ea1dc22
+11
View File
@@ -4,6 +4,7 @@ package zones
func (m *Zones) SyncAll() error {
for _, fn := range []func() error{
m.SyncAllWireguard,
m.SyncAllCeph,
} {
if err := fn(); err != nil {
return err
@@ -31,3 +32,13 @@ func (m *Zones) SyncAllWireguard() error {
return nil
}
// SyncAllCeph updates the ceph.conf file
func (m *Zones) SyncAllCeph() error {
cfg, err := m.GenCephConfig()
if err != nil {
return err
}
return m.WriteCephConfig(cfg)
}