log version of instance if status could be fetched

This commit is contained in:
bakito
2022-06-20 18:46:23 +02:00
parent 1119c96d5f
commit 809d7b2ad8
+4
View File
@@ -105,6 +105,8 @@ func (w *worker) sync() {
return
}
sl.With("version", o.status.Version).Info("Connected to origin")
o.parental, err = oc.Parental()
if err != nil {
sl.With("error", err).Error("Error getting parental status")
@@ -194,6 +196,8 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
return
}
rl.With("version", o.status.Version).Info("Connected to replica")
if semver.Compare(rs.Version, minAghVersion) == -1 {
rl.With("error", err, "version", rs.Version).Errorf("Replica AdGuard Home version must be >= %s", minAghVersion)
return