Skip to content

[July 2025] - Sidecar provisioner logs incorrectly report event write failures despite events being successfully created for Bucket. #87

@LOCODAK

Description

@LOCODAK

Bug Report

What happened:
The sidecar generates events related to bucket operations, and events are correctly created when bucket creation fails, as shown by repeated warnings like:

Warning FailedCreateBucket cosi failed to create bucket: rpc error: code = Internal desc = failed to create bucket due to an internal error

However, the provisioner logs continuously report errors indicating failure to write these events, with messages such as:

E0702 10:09:15.080550 1 event.go:368] "Unable to write event (may retry after sleeping)" err="can't patch an event with namespace 'default' in namespace 'test'" event="&Event{ObjectMeta:{BucketName default ...}, InvolvedObject:..., Reason:FailedCreateBucket, Message:failed to create bucket: rpc error: code = Internal desc = failed to create bucket due to an internal error, ...}"

What you expected to happen:

For Unsuccessful Bucket Creation The Event should be generated in the bucket without there being any write event error in the sidecar provisioner logs.

How to reproduce this bug (as minimally and precisely as possible):

  1. Create a bucketclaim with incorrect config, the bucket has been created but is in an false state.
  2. Describe a bucket to check for the Event Generated for the Failed bucket Creation
  3. Look through the sidecar provisioner logs and the log "enable to write event" can be seen.

Anything else relevant for this bug report?:

Environment:

  • Kubernetes version (use kubectl version), please list client and server: Client Version: v1.33.2 , Kustomize Version: v5.6.0 , Server Version: v1.28.6
  • Sidecar version (provide the release tag or commit hash): Latest
  • Provisoner name and version (provide the release tag or commit hash):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions