Skip to content

OCI hook improvements#108

Merged
enp0s3 merged 2 commits into
openshift-virtualization:mainfrom
enp0s3:fix-oci-hook-2
May 14, 2026
Merged

OCI hook improvements#108
enp0s3 merged 2 commits into
openshift-virtualization:mainfrom
enp0s3:fix-oci-hook-2

Conversation

@enp0s3
Copy link
Copy Markdown
Member

@enp0s3 enp0s3 commented May 14, 2026

Signed-off-by: Igor Bezukh ibezukh@redhat.com

We've found a parsing issue in the hook script - rc variable was capturing the stdout instead
of capturing the exit code. This caused subsequent if conditions to fail.

In addition to the fix the PID is now parsed from the data passed to the hook stdin. This
improvement allows reliability in the data source.

enp0s3 added 2 commits May 14, 2026 06:36
The hook script was using rc=$(crun update ...) which captures stdout,
but crun does not print its exit code to stdout. This caused empty rc
values leading to "integer expression expected" and "numeric argument
required" errors in production. Use the $? exit code instead.

Signed-off-by: Igor Bezukh <ibezukh@redhat.com>
relying on files could be fragile while the data passed
to the hook via the stdin is consistent.

the cgroup path however doesn't appar in the stdin data
so for that we still have to parse config.json

Signed-off-by: Igor Bezukh <ibezukh@redhat.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign barakmor1 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@enp0s3
Copy link
Copy Markdown
Member Author

enp0s3 commented May 14, 2026

/cc @Barakmor1

@openshift-ci openshift-ci Bot requested a review from Barakmor1 May 14, 2026 03:51
Copy link
Copy Markdown
Member

@Barakmor1 Barakmor1 left a comment

Choose a reason for hiding this comment

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

Thank you

@openshift-ci openshift-ci Bot added the lgtm label May 14, 2026
@enp0s3 enp0s3 merged commit f921737 into openshift-virtualization:main May 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants