343
344
// SetUnitStatus will set the given status for this unit.
345
346
ctx.hasRunStatusSet = true
347
348
return ctx.unit.SetUnitStatus(
354
355
// SetServiceStatus will set the given status to the service to which this
355
356
// unit's belong, only if this unit is the leader.
358
359
isLeader, err := ctx.IsLeader()
360
361
return errors.Annotatef(err, "cannot determine leadership")