qemu: Report all errors on virtiofsd execution#2685
Conversation
|
/test |
|
hold on, I see the same commit |
Yes. I saw the other one while fixing this one. I assumed that since this was a "merge" workflow, it was cleaner to make it two separate issues and two separate commits. |
Codecov Report
@@ Coverage Diff @@
## master #2685 +/- ##
==========================================
+ Coverage 45.54% 51.70% +6.16%
==========================================
Files 118 118
Lines 17281 18943 +1662
==========================================
+ Hits 7871 9795 +1924
+ Misses 8533 8012 -521
- Partials 877 1136 +259 |
|
@c3d, a few comments:
|
From commit message (I split it on two lines to make it easier to read):
No, one part is for #2682, the other for #2582 (as luck would have it, single-digit difference). #2582 was your old fix, which is no longer necessary with this change, so I removed the code after checking the bug was still fixed. The commit message indicates that this results in a change of error message.
I'm not sure where you see the "Fixes:kata-containers#NNN"? To me, the PR only shows #NNN. Or are you saying I should add |
Ouch, and I read both as the same. You're right.
For some reason I saw "Fixes: kata-containers#NNN" Yesterday. But well, clearly it's not the case. So, just ignore the comment. :-) |
|
lgtm |
c586f18 to
e58d0fb
Compare
|
This needs to be ported to Kata 2.0 (https://github.com/kata-containers/kata-containers/tree/2.0-dev) |
|
/test-ubuntu |
| if err == nil { | ||
| q.state.VirtiofsdPid = cmd.Process.Pid | ||
| if err != nil { | ||
| return fmt.Errorf("virtiofs daemon %v returned with error: %v", q.config.VirtioFSDaemon, err); |
There was a problem hiding this comment.
@c3d, travis is failing here:
virtcontainers/qemu.go:675: File is not `gofmt`-ed with `-s` (gofmt)
return fmt.Errorf("virtiofs daemon %v returned with error: %v", q.config.VirtioFSDaemon, err);
WARN [runner/golint] Golint: can't lint 53 files: no file name for file &{Doc:0xc00dc5ac40 Package:19278537 Name:main Decls:[0xc01f5913c0 0xc01f591400 0xc01f591440 0xc01f591500 0xc01f591540 0xc01f591580 0xc01f5915c0 0xc01f591600 0xc01f591680 0xc01f591700 0xc01f591780 0xc01f591800 0xc01f591840 0xc01f591880] Scope:scope 0xc0256e55e0 {
var commit
var version
var envCmd
var configFilePathOption
const name
const project
const projectURL
const defaultRootDirectory
var showConfigPathsOption
const projectPrefix
var checkCmd
var defaultRuntimeConfiguration
var defaultSysConfRuntimeConfiguration
}
Imports:[0xc021557710] Unresolved:[fmt fmt fmt fmt] Comments:[0xc00dc5ac40 0xc00dc5ad80 0xc00dc5ae60 0xc00dc5bdc0 0xc013c3c420 0xc013c3d460 0xc013c3d9e0 0xc013e782c0 0xc013e789a0 0xc013e79b20 0xc013e79f00]}
The command ".ci/static-checks.sh" failed and exited with 1 during .
Seems that you'd need to have the (at least) first %v replaced by %s, so it wouldn't complain.
There was a problem hiding this comment.
Leftover semicolon. To much coding in C :-)
There was a problem hiding this comment.
And I didn't even realised that. /o.
Let me rerun the CI.
The virtiofs daemon may run into errors other than the file not existing, e.g. the file may not be executable. Fixes: kata-containers#2682 Message is now: virtiofs daemon /usr/local/bin/hello returned with error: fork/exec /usr/local/bin/virtiofsd: permission denied instead of panic: runtime error: invalid memory address or nil Fixes: kata-containers#2582 Message is now: virtiofs daemon /usr/local/bin/hello-not-found returned with error: fork/exec /usr/local/bin/hello-not-found: no such file or directory instead of: virtiofsd path (/usr/local/bin/hello-no-found) does not exist Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
e58d0fb to
4ee382c
Compare
|
/test-ubuntu |
|
Here's the link to the travis job, which never reported its result back |
|
Adding the backport label as would be good to have this one backported after merged. |
|
@fidencio I re-pushed after fixing the semi-colon. I think your beams crossed. |
|
So, as travis is not collaborating much, I've talked to @c3d privately and we'll revisit this one next week. Now, too-late-o'clock in our timezone. |
|
I'm closing and re-opening this PR with the hope that it'll bring us the travis results. |
|
/test-power |
|
/test-vfio |
|
jenkins-ci-ubuntu-18-04-initrd jenkins-ubuntu-18-04-vfio |
qemu: Report all errors on
virtiofsdexecutionThe
virtiofsdaemon may run into errors other than the file not existing, e.g. the file may not be executable.Fixes: #2682
Message is now:
instead of a segmentation fault with stack trace in
setupVirtiofsd:Fixes: #2582
This makes the original fix for #2582 unnecessary. The result is a change in error message.
Message is now:
instead of: