« Previous | Next » 

Revision cf5a8306

IDcf5a8306e7ac620834efe50f70bb93ed9b2d6fd2
Parent 65fe4693
Child c7b46d59

Added by Iustin Pop almost 15 years ago

Fix a unhandled error case in device creation

The block device creation process is the following:
- device create
- device assembly (on primary or depending on dev_type, on secondary
too)
- set sync speed
- return

The problem is that device assembly after creation was not checked for
errors, and as this is a very unusual case, we did not have problems
with it (or we didn't detect them). The recent DevCacheManager however
tripped on this case (because the dev_path of the device is None if the
assembly fails) and the creation aborted with an unclear error message.

The patch adds a check for the assembly success and aborts the creation
of the device in this case - the error is quite clear in the instance
add, for example. The patch also changes DevCacheManager to log the
cases when dev_path is None but not raise an error (keeping consistent
with the goal that the cache manager should be transparent to the code).

For the record, this error case was detected with a mismatch between
drbd kernel module and utilities.

Reviewed-by: imsnah

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences