Skip to content

[fix] Remove backup file list temp files after backup#264

Open
MichaelUray wants to merge 1 commit into
openwisp:masterfrom
MichaelUray:fix/backup-file-list-cleanup
Open

[fix] Remove backup file list temp files after backup#264
MichaelUray wants to merge 1 commit into
openwisp:masterfrom
MichaelUray:fix/backup-file-list-cleanup

Conversation

@MichaelUray

Copy link
Copy Markdown

Problem

The cleanup at the end of backup_configuration() uses a glob inside double
quotes:

rm "${BACKUP_FILE_LIST}*"

The shell does not expand the * inside quotes, so rm tries to delete a
single file literally named backup_file_list.conf*, which never exists. This
fails on every configuration update (rm: can't remove '.../backup_file_list.conf*') and leaves backup_file_list.conf and
backup_file_list.conf.tmp behind in the working directory (tmpfs on devices).

Fix

Delete the two files that are actually created, with -f so a missing file is
not an error.

Testing

shellcheck, shfmt, ./run-qa-checks and ./runtests all pass.

The cleanup at the end of backup_configuration() used a glob inside double
quotes -- rm "${BACKUP_FILE_LIST}*" -- so the shell did not expand the "*"
and rm tried to delete a single file literally named
"backup_file_list.conf*", which never exists. This failed on every
configuration update ("rm: can't remove '.../backup_file_list.conf*'") and
left backup_file_list.conf and backup_file_list.conf.tmp behind in the
working directory (tmpfs on devices).

Delete the two files that are actually created, with -f so a missing file
is not an error.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@MichaelUray, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 77a13955-9000-4f17-a221-a04a122fcac9

📥 Commits

Reviewing files that changed from the base of the PR and between d28df21 and 6186e43.

📒 Files selected for processing (1)
  • openwisp-config/files/openwisp.agent
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kilo-code-bot

kilo-code-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • openwisp-config/files/openwisp.agent

Reviewed by hy3:free · Input: 33.6K · Output: 875 · Cached: 76.4K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant