Skip to content

[Bug]: Incorrect object name logged when barman object configuration not found #539

Closed

Description

@mnencia

In the pre-hook, when we check for the ObjectStore objects, if one object is not present, we always log
the name of the ObjectStore referred to in the main plugin section. This makes it extremely difficult to debug issues from externalCluster with the wrong object store name..

for _, barmanObjectKey := range pluginConfiguration.GetReferredBarmanObjectsKey() {
var barmanObject barmancloudv1.ObjectStore
if err := r.Client.Get(ctx, barmanObjectKey, &barmanObject); err != nil {
if apierrs.IsNotFound(err) {
contextLogger.Info(
"barman object configuration not found, requeuing",
"name", pluginConfiguration.BarmanObjectName,
"namespace", cluster.Namespace)
return &reconciler.ReconcilerHooksResult{
Behavior: reconciler.ReconcilerHooksResult_BEHAVIOR_REQUEUE,
}, nil
}
return nil, err
}
barmanObjects = append(barmanObjects, barmanObject)
}

Activity

  1. dosubot commented on Sep 19, 2025

    @dosubot

    The logging issue happens because the code logs the main plugin's barmanObjectName when an ObjectStore is missing, regardless of which reference actually failed. This means if an externalCluster references a different ObjectStore and it's missing, the log will still show the main plugin's name, making debugging confusing when multiple ObjectStores are involved. The relevant code in the pre-hook iterates over all referred ObjectStore keys, but always logs pluginConfiguration.BarmanObjectName instead of the actual missing key's name. To improve debugging, the log should use the name of the missing ObjectStore key being checked, not the main plugin's name. No recent PRs address this, so for now, double-check all ObjectStore references in both plugin and externalCluster specs if you see this log message. More granular logging is a common user request for this scenario source code.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about plugin-barman-cloud with Dosu Add Dosu to your team

  2. added 2 commits that reference this issue on Sep 19, 2025
    43fd1d6
    1351fa1
  3. added a commit that references this issue on Sep 22, 2025
    a29aa1c
  4. added 3 commits that reference this issue on Oct 6, 2025
    5fdc3a0
    1191a03
    d16d6f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions