Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fgiudici
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

The containerd shimv2 specification provides a 'publish-binary'
argument to allow reporting events from the shim up to the container
engine. The call to the publish binary is in the form:
$PUBLISH_BIN --address $ADDRESS publish --topic $TOPIC --namespace $NS

Usually the publish binary is the container engine itself: containerd
supports the "publish" command and shimv2 implementations use by
default the container engine as the publish binary.
Allow CRI-O to accept the "publish" command as required by the containerd
shimv2 specification, just ignoring the events without reporting errors.

Which issue(s) this PR fixes:

Right now when a kata-containers shimv2 workload is run with CRI-O,
the CRI-O binary is called by the containerd-shimv2 binary for every
sandbox event (e.g., sandbox creation, deletion, ...).
CRI-O returns an error as doesn't support the "publish" format above,
causing the containerd-shim-kata-v2 implementation to report an error
in the logs for each event.
Sample error:
time="2021-07-26T17:23:11.726445138+02:00" level=error msg="post event" error="failed to publish event: exit status 1" name=containerd-shim-v2 pid=9478 sandbox=6714bbfe5d600dc8c24f2c0fcf2e14857eb14cf85605aa213bb92660725335f3 source=containerd-kata-shim-v2

Special notes for your reviewer:

The "--address" global argument and "publish" command added are set to hidden but accepted without returning any error.

Does this PR introduce a user-facing change?

None

@fgiudici fgiudici requested review from mrunalp and runcom as code owners July 26, 2021 15:55
@openshift-ci openshift-ci bot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 26, 2021
@openshift-ci openshift-ci bot requested review from fidencio and sameo July 26, 2021 15:55
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2021

Hi @fgiudici. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 26, 2021
@fidencio
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 26, 2021
@fgiudici
Copy link
Contributor Author

/test ami_fedora

@codecov
Copy link

codecov bot commented Jul 26, 2021

Codecov Report

Merging #5129 (ed5eaee) into master (a414fed) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head ed5eaee differs from pull request most recent head 48ce34d. Consider uploading reports for the commit 48ce34d to get more accurate results

@@            Coverage Diff             @@
##           master    #5129      +/-   ##
==========================================
- Coverage   43.91%   43.89%   -0.02%     
==========================================
  Files         110      110              
  Lines       11453    11458       +5     
==========================================
  Hits         5030     5030              
- Misses       5946     5951       +5     
  Partials      477      477              

@fgiudici
Copy link
Contributor Author

/test ami_fedora

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2021
@saschagrunert
Copy link
Member

Ah the completions have to be updated: https://github.com/cri-o/cri-o/pull/5129/checks?check_run_id=3163396027

@fgiudici
Copy link
Contributor Author

Ah the completions have to be updated: https://github.com/cri-o/cri-o/pull/5129/checks?check_run_id=3163396027

Oh, right, thanks Sascha!

@fgiudici
Copy link
Contributor Author

/test ami_fedora

@fidencio
Copy link
Contributor

LGTM, as long as CI passes.
Thanks @fgiudici!

@fgiudici
Copy link
Contributor Author

/retest

@haircommander
Copy link
Member

you've still got some completions issues :\

@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests
3 are not at the moment

@fgiudici
Copy link
Contributor Author

fgiudici commented Jul 28, 2021

@haircommander , @TomSweeneyRedHat : thanks, sure, I have to fix completion still (Update: DONE!).
I am using this PR to test a new Fedora 34 AMI image for CI, so I am taking this slowly...
retested all to see if the integration test would pass (it did). I expected also the e2e_crun_cgroupv2 would have passed, let's see after I will update with the completion. Thanks!

@fgiudici fgiudici force-pushed the shimv2_publish_cmd branch from 9730a67 to 9826c3f Compare July 28, 2021 09:33
@fgiudici
Copy link
Contributor Author

/test ami_fedora

3 similar comments
@fgiudici
Copy link
Contributor Author

/test ami_fedora

@fgiudici
Copy link
Contributor Author

/test ami_fedora

@fgiudici
Copy link
Contributor Author

/test ami_fedora

@fgiudici fgiudici force-pushed the shimv2_publish_cmd branch from 9826c3f to 657836b Compare July 30, 2021 07:35
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2021
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2021
@fgiudici
Copy link
Contributor Author

/override ci/openshift-jenkins/ami_fedora

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 30, 2021

@fgiudici: fgiudici unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file.

Details

In response to this:

/override ci/openshift-jenkins/ami_fedora

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

The containerd shimv2 specification provides a 'publish-binary'
argument to allow reporting events from the shim up to the container
engine. The call to the publish binary is in the form:
$PUBLISH_BIN --address $ADDRESS publish --topic $TOPIC --namespace $NS

Usually the publish binary is the container engine itself: containerd
supports the "publish" command and shimv2 implementations use by
default the container engine as the publish binary.

Right now when a kata-containers shimv2 workload is run with CRI-O,
the CRI-O binary is called by the containerd-shimv2 binary for every
sandbox event (e.g., sandbox creation, deletion, ...).
CRI-O returns an error as doesn't support the "publish" format above,
causing the containerd-shim-kata-v2 implementation to report an error
for each event in the logs.
Sample error:
time="2021-07-26T17:23:11.726445138+02:00" level=error msg="post event" error="failed to publish event: exit status 1" name=containerd-shim-v2 pid=9478 sandbox=6714bbfe5d600dc8c24f2c0fcf2e14857eb14cf85605aa213bb92660725335f3 source=containerd-kata-shim-v2

Allow CRI-O to support the "publish" command as per the containerd
shimv2 specification, just ignoring the events without reporting any
error.

Signed-off-by: Francesco Giudici <[email protected]>
@fgiudici fgiudici force-pushed the shimv2_publish_cmd branch from 657836b to 48ce34d Compare August 4, 2021 09:58
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2021
@fgiudici
Copy link
Contributor Author

fgiudici commented Aug 4, 2021

rebased

@fgiudici
Copy link
Contributor Author

fgiudici commented Aug 4, 2021

/retest-required

@fgiudici
Copy link
Contributor Author

fgiudici commented Aug 4, 2021

/test e2e_cgroupv2

@fgiudici
Copy link
Contributor Author

fgiudici commented Aug 4, 2021

/test integration_cgroupv2

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 5, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fgiudici, saschagrunert

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

The pull request process is described 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

@haircommander
Copy link
Member

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2021
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

6 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 6, 2021

@fgiudici: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/ami_fedora 9826c3f link /test ami_fedora
ci/openshift-jenkins/e2e_crun_cgroupv2 48ce34d link /test e2e_cgroupv2

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@fgiudici
Copy link
Contributor Author

fgiudici commented Aug 6, 2021

/retest-required

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci openshift-ci bot merged commit 126b893 into cri-o:master Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants