Revision cf5a8306 lib/backend.py

b/lib/backend.py
660 660
    raise ValueError("Can't create child device for %s, %s" %
661 661
                     (disk, size))
662 662
  if on_primary or disk.AssembleOnSecondary():
663
    device.Assemble()
663
    if not device.Assemble():
664
      raise errors.BlockDeviceError("Can't assemble device after creation,"
665
                                    " very unusual event - check the node"
666
                                    " daemon logs")
664 667
    device.SetSyncSpeed(constants.SYNC_SPEED)
665 668
    if on_primary or disk.OpenOnSecondary():
666 669
      device.Open(force=True)
......
1519 1522
    """Updates the cache information for a given device.
1520 1523

  
1521 1524
    """
1525
    if dev_path is None:
1526
      logger.Error("DevCacheManager.UpdateCache got a None dev_path")
1527
      return
1522 1528
    fpath = cls._ConvertPath(dev_path)
1523 1529
    if on_primary:
1524 1530
      state = "primary"
......
1538 1544
    """Remove data for a dev_path.
1539 1545

  
1540 1546
    """
1547
    if dev_path is None:
1548
      logger.Error("DevCacheManager.RemoveCache got a None dev_path")
1549
      return
1541 1550
    fpath = cls._ConvertPath(dev_path)
1542 1551
    try:
1543 1552
      utils.RemoveFile(fpath)

Also available in: Unified diff