Compare commits

..

2 Commits

Author SHA1 Message Date
Stefan Agner
c3e7601ad0 Log when cidfile path cleanup fails (#6788)
The cleanup of a leftover cidfile path before creating a new container
silently suppressed any OSError from rmdir/unlink. When that cleanup
fails (e.g. the path is a non-empty directory or still busy from a
pending bind unmount), the subsequent touch() raises IsADirectoryError
with no breadcrumb explaining why the path was in an unexpected state.

Replace the bare suppress(OSError) with an explicit error log so the
underlying failure is visible in the Supervisor log when the follow-up
touch() blows up. Behavior is otherwise unchanged: a failed cleanup
still falls through to touch() as before.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 01:04:56 +02:00
dependabot[bot]
0ad1016bdd Bump release-drafter/release-drafter from 7.2.0 to 7.2.1 (#6787)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](5de9358398...563bf13265)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  dependency-version: 7.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-30 10:28:24 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ jobs:
echo "version=$datepre.$newpost" >> "$GITHUB_OUTPUT"
- name: Run Release Drafter
uses: release-drafter/release-drafter@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
uses: release-drafter/release-drafter@563bf132657a13ded0b01fcb723c5a58cdd824e2 # v7.2.1
with:
tag: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}

View File

@@ -485,11 +485,15 @@ class DockerAPI(CoreSysAttributes):
# Remove the file/directory if it exists e.g. as a leftover from unclean shutdown
# Note: Can be a directory if Docker auto-started container with restart policy
# before Supervisor could write the CID file
with suppress(OSError):
try:
if cidfile_path.is_dir():
cidfile_path.rmdir()
elif cidfile_path.is_file():
cidfile_path.unlink(missing_ok=True)
except OSError as err:
_LOGGER.error(
"Can't cleanup cidfile path %s: %s", cidfile_path, err
)
# Create empty CID file before adding it to volumes to prevent Docker
# from creating it as a directory if container auto-starts