Revision aefc2f89

b/lib/cmdlib/instance.py
3183 3183
    feedback_fn("Removing volumes on the secondary node...")
3184 3184
    for disk in old_disks:
3185 3185
      self.cfg.SetDiskID(disk, snode_uuid)
3186
      msg = self.rpc.call_blockdev_remove(snode_uuid, disk).fail_msg
3187
      if msg:
3188
        self.LogWarning("Could not remove block device %s on node %s,"
3189
                        " continuing anyway: %s", disk.iv_name,
3190
                        self.cfg.GetNodeName(snode_uuid), msg)
3186
      result = self.rpc.call_blockdev_remove(snode_uuid, disk)
3187
      result.Warn("Could not remove block device %s on node %s,"
3188
                  " continuing anyway" %
3189
                  (disk.iv_name, self.cfg.GetNodeName(snode_uuid)),
3190
                  self.LogWarning)
3191 3191

  
3192 3192
    feedback_fn("Removing unneeded volumes on the primary node...")
3193 3193
    for idx, disk in enumerate(old_disks):
3194 3194
      meta = disk.children[1]
3195 3195
      self.cfg.SetDiskID(meta, pnode_uuid)
3196
      msg = self.rpc.call_blockdev_remove(pnode_uuid, meta).fail_msg
3197
      if msg:
3198
        self.LogWarning("Could not remove metadata for disk %d on node %s,"
3199
                        " continuing anyway: %s", idx,
3200
                        self.cfg.GetNodeName(pnode_uuid), msg)
3196
      result = self.rpc.call_blockdev_remove(pnode_uuid, meta)
3197
      result.Warn("Could not remove metadata for disk %d on node %s,"
3198
                  " continuing anyway" %
3199
                  (idx, self.cfg.GetNodeName(pnode_uuid)),
3200
                  self.LogWarning)
3201 3201

  
3202 3202
  def _CreateNewDisk(self, idx, params, _):
3203 3203
    """Creates a new disk.

Also available in: Unified diff