fix: pin buildah/podman to vfs and route docker.io through Harbor #38

Merged
rcsheets merged 1 commit from fix/buildah-vfs-storage-conf into main 2026-05-01 00:19:00 +00:00
Owner

Two related runtime-config changes to /etc/containers/:

storage.conf — force vfs and wipe any prior storage state. The
STORAGE_DRIVER env var was meant to coerce both tools to vfs, but
podman's storage subsystem reads any prior driver metadata from the
storage path before consulting the env, so leftover 'overlay' state
from a previous run made podman try overlay at smoke-test time and
hit "overlay is not supported over overlayfs" (fuse-overlayfs isn't
installed in this runner container). storage.conf is authoritative.

registries.conf — mirror docker.io through Harbor's docker-hub proxy
project. Saves Hub-egress bandwidth and dodges rate limits. gcr.io
(distroless base) isn't proxied by Harbor today, so it pulls direct.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Two related runtime-config changes to /etc/containers/: storage.conf — force vfs and wipe any prior storage state. The STORAGE_DRIVER env var was meant to coerce both tools to vfs, but podman's storage subsystem reads any prior driver metadata from the storage path before consulting the env, so leftover 'overlay' state from a previous run made podman try overlay at smoke-test time and hit "overlay is not supported over overlayfs" (fuse-overlayfs isn't installed in this runner container). storage.conf is authoritative. registries.conf — mirror docker.io through Harbor's docker-hub proxy project. Saves Hub-egress bandwidth and dodges rate limits. gcr.io (distroless base) isn't proxied by Harbor today, so it pulls direct. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix: pin buildah/podman to vfs and route docker.io through Harbor
All checks were successful
ci / check (pull_request) Successful in 42s
00ff858547
Two related runtime-config changes to /etc/containers/:

storage.conf — force vfs and wipe any prior storage state. The
STORAGE_DRIVER env var was meant to coerce both tools to vfs, but
podman's storage subsystem reads any prior driver metadata from the
storage path before consulting the env, so leftover 'overlay' state
from a previous run made podman try overlay at smoke-test time and
hit "overlay is not supported over overlayfs" (fuse-overlayfs isn't
installed in this runner container). storage.conf is authoritative.

registries.conf — mirror docker.io through Harbor's docker-hub proxy
project. Saves Hub-egress bandwidth and dodges rate limits. gcr.io
(distroless base) isn't proxied by Harbor today, so it pulls direct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.18.0 | Full Review | Claude Sonnet 4 | tracking id r-f3f00b-8c20c0
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: Approve — Well-structured CI/CD fix that addresses specific container storage issues with clear documentation and proper configuration.
Complexity: moderate

Code Review

Summary

This PR adds explicit container storage and registry configuration to resolve buildah/podman runtime issues in the CI environment. The changes are well-documented and address real operational problems.

Positive Aspects

1. Clear Problem Definition

The comments clearly explain the root causes:

  • Environment variable STORAGE_DRIVER=vfs is insufficient because podman reads existing storage metadata first
  • Overlay storage fails in nested containers without fuse-overlayfs
  • Docker Hub rate limiting and bandwidth concerns

2. Proper Configuration Management

  • Storage configuration: Forces vfs driver and cleans up any existing state
  • Registry mirroring: Routes docker.io through Harbor proxy while leaving gcr.io direct
  • Both configurations are written to their canonical locations (/etc/containers/)

3. Good Documentation

The inline comments provide excellent context for future maintainers, explaining not just what the configuration does but why it's necessary.

4. Safe Cleanup

The rm -rf /var/lib/containers/storage /run/containers/storage ensures a clean slate, preventing contamination from previous runs.

Technical Analysis

Configuration Files

  • storage.conf: Standard TOML format, minimal but complete configuration
  • registries.conf: Proper registry mirror syntax, selective mirroring approach

Integration Points

  • Placement before the "Set image tags" step is correct - configuration needs to be in place before any container operations
  • Uses existing ${{ env.REGISTRY }} variable consistently

Edge Cases Considered

  • Handles the overlay-over-overlayfs problem explicitly
  • Accounts for Harbor not proxying all registries (gcr.io exemption)
  • Cleans up storage state to prevent interference

Potential Considerations

Security

  • Configuration files are written to standard system locations - appropriate for a container environment
  • No sensitive data in the configuration files
  • Registry mirror uses the same Harbor registry already configured for authentication

Performance

  • vfs storage is slower than overlay but more reliable in constrained environments
  • Registry mirroring should improve performance by reducing external network calls
  • The storage cleanup adds minimal overhead

Maintainability

  • Configuration is inline rather than external files, keeping it close to the logic
  • Clear comments explain the business reasoning
  • Follows the established pattern of other configuration steps

Minor Observations

  • The step name "Configure buildah/podman storage and registry mirror" accurately describes the dual purpose
  • File placement in the workflow is logical and maintains the existing flow
  • No breaking changes to the overall build process

Conclusion

This is a solid operational fix that addresses real container runtime issues with clear documentation and appropriate safeguards. The changes are focused, well-reasoned, and follow good CI/CD practices.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.18.0 | Full Review | Claude Sonnet 4 | tracking id `r-f3f00b-8c20c0`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: Approve** — Well-structured CI/CD fix that addresses specific container storage issues with clear documentation and proper configuration. **Complexity:** moderate # Code Review ## Summary This PR adds explicit container storage and registry configuration to resolve buildah/podman runtime issues in the CI environment. The changes are well-documented and address real operational problems. ## Positive Aspects ### 1. Clear Problem Definition The comments clearly explain the root causes: - Environment variable `STORAGE_DRIVER=vfs` is insufficient because podman reads existing storage metadata first - Overlay storage fails in nested containers without fuse-overlayfs - Docker Hub rate limiting and bandwidth concerns ### 2. Proper Configuration Management - **Storage configuration**: Forces vfs driver and cleans up any existing state - **Registry mirroring**: Routes docker.io through Harbor proxy while leaving gcr.io direct - Both configurations are written to their canonical locations (`/etc/containers/`) ### 3. Good Documentation The inline comments provide excellent context for future maintainers, explaining not just what the configuration does but why it's necessary. ### 4. Safe Cleanup The `rm -rf /var/lib/containers/storage /run/containers/storage` ensures a clean slate, preventing contamination from previous runs. ## Technical Analysis ### Configuration Files - **storage.conf**: Standard TOML format, minimal but complete configuration - **registries.conf**: Proper registry mirror syntax, selective mirroring approach ### Integration Points - Placement before the "Set image tags" step is correct - configuration needs to be in place before any container operations - Uses existing `${{ env.REGISTRY }}` variable consistently ### Edge Cases Considered - Handles the overlay-over-overlayfs problem explicitly - Accounts for Harbor not proxying all registries (gcr.io exemption) - Cleans up storage state to prevent interference ## Potential Considerations ### Security - Configuration files are written to standard system locations - appropriate for a container environment - No sensitive data in the configuration files - Registry mirror uses the same Harbor registry already configured for authentication ### Performance - vfs storage is slower than overlay but more reliable in constrained environments - Registry mirroring should improve performance by reducing external network calls - The storage cleanup adds minimal overhead ### Maintainability - Configuration is inline rather than external files, keeping it close to the logic - Clear comments explain the business reasoning - Follows the established pattern of other configuration steps ## Minor Observations - The step name "Configure buildah/podman storage and registry mirror" accurately describes the dual purpose - File placement in the workflow is logical and maintains the existing flow - No breaking changes to the overall build process ## Conclusion This is a solid operational fix that addresses real container runtime issues with clear documentation and appropriate safeguards. The changes are focused, well-reasoned, and follow good CI/CD practices.
rcsheets deleted branch fix/buildah-vfs-storage-conf 2026-05-01 00:19:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/pr-reviewer!38
No description provided.