Move some err to warnings (#124)

This commit is contained in:
Itxaka 2023-05-08 15:20:05 +02:00 committed by GitHub
parent 14426d39b4
commit 9399d0cf08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -291,7 +291,7 @@ func (s *State) MountCustomMountsDagStep(g *herd.Graph) error {
} }
internalUtils.Log.Debug().Str("what", what).Str("where", where).Msg("Custom mount done") internalUtils.Log.Debug().Str("what", what).Str("where", where).Msg("Custom mount done")
} }
internalUtils.Log.Err(err.ErrorOrNil()).Send() internalUtils.Log.Warn().Err(err.ErrorOrNil()).Send()
return err.ErrorOrNil() return err.ErrorOrNil()
}), }),
@ -323,7 +323,7 @@ func (s *State) MountCustomBindsDagStep(g *herd.Graph) error {
} }
internalUtils.Log.Debug().Str("what", p).Msg("Bind mount end") internalUtils.Log.Debug().Str("what", p).Msg("Bind mount end")
} }
internalUtils.Log.Err(err.ErrorOrNil()).Send() internalUtils.Log.Warn().Err(err.ErrorOrNil()).Send()
return err.ErrorOrNil() return err.ErrorOrNil()
}, },
), ),

View File

@ -27,14 +27,14 @@ func (m mountOperation) run() error {
if m.PrepareCallback != nil { if m.PrepareCallback != nil {
if err := m.PrepareCallback(); err != nil { if err := m.PrepareCallback(); err != nil {
l.Err(err).Msg("executing mount callback") l.Warn().Err(err).Msg("executing mount callback")
return err return err
} }
} }
//TODO: not only check if mounted but also if the type,options and source are the same? //TODO: not only check if mounted but also if the type,options and source are the same?
mounted, err := mountinfo.Mounted(m.Target) mounted, err := mountinfo.Mounted(m.Target)
if err != nil { if err != nil {
l.Err(err).Msg("checking mount status") l.Warn().Err(err).Msg("checking mount status")
return err return err
} }
if mounted { if mounted {