Actions
Bug #4707
closedrbd CLI: bad error code masked by udevadm_settle
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
I found that despite my attempt to map a v2 image the rbd
CLI gave me an exit status of 0.
Looking at the code, I see this at the end of do_kernel_add():
string add = oss.str(); r = safe_write(fd, add.c_str(), add.size()); close(fd); // let udevadm do its job before we return if (udevadm_settle) { r = system("/sbin/udevadm settle"); if (r) { if (r < 0) cerr << "rbd: error executing udevadm as shell command!" << std::endl; else cerr << "rbd: '/sbin/udevadm settle' failed! (" << r << ")" <<std::endl; return r; } }
So whatever was returned by the write to /sys/bus/rbd/add gets
overwritten by the status of system("udevadm settle").
That's no good.
Updated by Alex Elder about 11 years ago
It looks like the other places udevadm settle is called
do not suffer from this problem.
Updated by Ian Colle about 11 years ago
- Priority changed from High to Urgent
- Target version set to v0.61 - Cuttlefish
Let's try to get this into Cuttlefish.
Updated by Sage Weil about 11 years ago
- Status changed from New to In Progress
- Assignee changed from Josh Durgin to Sage Weil
Updated by Sage Weil about 11 years ago
- Status changed from In Progress to Resolved
commit:568101fa72e29ee960fcf3d704f04edfd50bd072
Actions