Skip to content

Event-Tracker: Incorrect oldObj Assignment and Wrong Resource Type Cause Silent DaemonSet Failure and StatefulSet Panic #5443

@aditya-systems-hub

Description

@aditya-systems-hub

What happened:

There are problems with how the event-tracker handles updates for DaemonSets and StatefulSets.

For DaemonSets, the code mistakenly assigns oldObj from newObj. This means both variables point to the same object. Because of that, the system never detects any changes. As a result, DaemonSet updates are completely ignored. No event is triggered and no chaos experiment runs — and there are no error logs either.

For StatefulSets, the issue is different. The code sends "Deployment" as the resource type to PolicyAuditor, even though the actual resource is a StatefulSet (or DaemonSet). This causes a wrong type conversion inside the code and leads to a runtime panic. When this happens, the event-tracker pod crashes and may restart repeatedly.


What you expected to happen:

DaemonSet and StatefulSet updates should be detected properly.
The correct resource type should be passed to PolicyAuditor.
There should be no crashes.
GitOps-based chaos experiments should run normally for all supported workload types.


Where can this issue be corrected? (optional)

  • RunDSInformer and RunStsInformer in informers.go
  • PolicyAuditor in utils.go

Fix the incorrect object assignment and pass the correct resource type ("DaemonSet" or "StatefulSet").


How to reproduce it:

  1. Deploy LitmusChaos with the event-tracker enabled.
  2. Set up a GitOps-triggered chaos experiment watching a DaemonSet or StatefulSet.
  3. Update that resource (for example, change the image or labels).

What you will see:

  • For DaemonSet: Nothing happens. No event, no experiment, no error.
  • For StatefulSet: The event-tracker pod crashes due to a type assertion panic.

Anything else we need to know?

This is a serious issue because:

  • DaemonSet-based GitOps triggers do not work at all.
  • StatefulSet updates can crash the event-tracker.
  • Only Deployment resources work correctly.
    The issue looks like a copy-paste mistake and should be fixable with small code changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions