kata-containers / agent

Kata Containers version 1.x agent (for version 2.x see https://github.com/kata-containers/kata-containers). Virtual Machine agent for hardware virtualized containers
https://katacontainers.io/
Apache License 2.0
241 stars 114 forks source link

Consistent device address matching between `getDeviceName()` and `listenToUdevEvents()` #849

Closed dgibson closed 3 years ago

dgibson commented 3 years ago

This is a fix for issue #848. While we're there, simplify the code a bit and rename a poorly named data structure.

dgibson commented 3 years ago

Not sure if this should get a backport or not. It is, technically, a bug, but the chances of hitting it in practice are pretty small AFAICT.

codecov[bot] commented 3 years ago

Codecov Report

Merging #849 into master will increase coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #849      +/-   ##
==========================================
+ Coverage   57.85%   57.94%   +0.08%     
==========================================
  Files          17       17              
  Lines        2373     2373              
==========================================
+ Hits         1373     1375       +2     
+ Misses        839      838       -1     
+ Partials      161      160       -1     
dgibson commented 3 years ago

I don't really understand how my change can be reducing test coverage, since I've removed code and not changed the tests.

devimc commented 3 years ago

/test

dgibson commented 3 years ago

what's the next step? I think we need device handlers for VFIO devices, this way the agent will wait for them, right?

Yes. I'm working on it.

devimc commented 3 years ago

/test

devimc commented 3 years ago

@dgibson I see that #850 includes these changes, should we close this and review/merge #850 ?

dgibson commented 3 years ago

I'm fine either way. These patches are essentially a prerequisite for #850 , so I don't mind if they go in as two PRs or one.

dgibson commented 3 years ago

/test-ubuntu

dgibson commented 3 years ago

/test

dgibson commented 3 years ago

Hmmm the CI says .ci/teardown.sh: line 260: make: command not found

I don't think that's my fault...

jodh-intel commented 3 years ago

@dgibson - hahaa! That's a pretty brutal tear down script eh? :smile:

@GabyCT - That make error seems to be being caused by https://github.com/kata-containers/ci/blob/master/jenkins/jobs/kata-containers-agent-rhel-8-q35-PR/config.xml#L135..L142. But if so, that implies PATH isn't set at that point. If so, we need to add /bin:/usr/bin.

But I think the main problem is the previous error:

Error: 
 Problem: package podman-1.9.3-2.module+el8.2.1+6867+366c07d6.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed
  - package containerd.io-1.2.6-3.3.el7.x86_64 conflicts with containerd provided by containerd.io-1.3.7-3.1.el8.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by containerd.io-1.2.6-3.3.el7.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with containerd provided by containerd.io-1.2.6-3.3.el7.x86_64
  - cannot install both containerd.io-1.3.7-3.1.el8.x86_64 and containerd.io-1.2.6-3.3.el7.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-60.rc8.module+el8.1.0+4081+b29780af.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-60.rc8.module+el8.1.0+4081+b29780af.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-64.rc9.module+el8.1.1+5259+bcdd613a.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-64.rc9.module+el8.1.1+5259+bcdd613a.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-65.rc10.module+el8.2.0+6368+cf16aa14.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-65.rc10.module+el8.2.0+6368+cf16aa14.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-61.rc8.module+el8.1.0+4873+4a24e241.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-61.rc8.module+el8.1.0+4873+4a24e241.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-65.rc10.module+el8.2.0+5762+aaee29fb.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-65.rc10.module+el8.2.0+5762+aaee29fb.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-66.rc10.module+el8.2.1+6465+1a51e8b6.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-66.rc10.module+el8.2.1+6465+1a51e8b6.x86_64
  - cannot install the best update candidate for package podman-1.0.5-1.gitf604175.module+el8.0.0+4017+bbba319f.x86_64
  - cannot install the best update candidate for package containerd.io-1.2.6-3.3.el7.x86_64
  - package runc-1.0.0-64.rc10.module+el8.2.0+6369+1f4293b4.x86_64 is filtered out by modular filtering
  - package runc-1.0.0-64.rc10.module+el8.2.0+5728+ac3aae00.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Failed at 26: sudo -E yum -y update
devimc commented 3 years ago

/test-centos /test-rhel