Skip to content

Conversation

@MayorFaj
Copy link
Contributor

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Container creation now validates artifact mounts exist, preventing creation of containers that cannot start due to missing artifacts.

Fixes #27747

@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@MayorFaj MayorFaj force-pushed the fix-artifact-validation-27747 branch from c9cce5f to 558c1b0 Compare December 17, 2025 19:28
Validate artifact mounts exist at container creation time instead of
start time. This prevents creation of containers that can never start
due to missing artifacts, providing immediate feedback with clear error
messages.

Fixes: containers#27747
Signed-off-by: MayorFaj <[email protected]>
@MayorFaj MayorFaj force-pushed the fix-artifact-validation-27747 branch from 7ef0da3 to ed3c92d Compare December 17, 2025 21:15

// validateArtifactVolumes checks that all artifacts exist and are accessible
// at container creation time, preventing creation of containers that can never start.
func validateArtifactVolumes(ctx context.Context, rt *libpod.Runtime, artifactVolumes []*specgen.ArtifactVolume) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this function can be repurposed for start containers.

Copy link
Contributor Author

@MayorFaj MayorFaj Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good suggestion. would it be ideal to implement that in this PR, or create a followup PR ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the latest changes has this update now

@MayorFaj MayorFaj requested a review from Honny1 December 22, 2025 20:06
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.

Artifact volume validation fails at container start instead of creation, creating unstartable containers

2 participants