fix: map DEBUG_MOVER annotation to LOG_LEVEL in mover Jobs

Open Beginner friendly
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go, kubernetes
Domain
backend, devops

Research direction

Start in internal/mover/ceph/job.go at the hardcoded LOG_LEVEL=info and the AppendDebugMoverEnvVar call, then compare the fallback handling in cmd/mover/main.go. Verify that the DEBUG_MOVER annotation results in debug-level mover logs while the default remains unchanged.

Written by the indexing model from the issue text.

Description

Problem

The VolSync debug-mover annotation (volsync.backube/enable-debug-mover) injects DEBUG_MOVER=1 into mover Jobs via utils.AppendDebugMoverEnvVar. However, the mover binary (cmd/mover/main.go) only reads LOG_LEVEL, and the Job hardcodes LOG_LEVEL=info (internal/mover/ceph/job.go:104).

As a result, setting the annotation on a ReplicationSource/ReplicationDestination CR does not raise mover log verbosity.

Expected

Annotating the CR should produce debug-level mover logs.

Suggested Fix

In internal/mover/ceph/job.go, after calling AppendDebugMoverEnvVar, check if DEBUG_MOVER=1 is present in the env list and set LOG_LEVEL=debug accordingly. Alternatively, have the mover binary read DEBUG_MOVER as a fallback.

References

  • internal/mover/ceph/job.go:104 - hardcoded LOG_LEVEL=info
  • internal/mover/ceph/job.go:280 - AppendDebugMoverEnvVar call
  • cmd/mover/main.go:71 - envOrDefault(constant.EnvLogLevel, "info")
Dominant language
Go
Stars
0
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.