Comment 7 for bug 1508230

Revision history for this message
wangqiang.sheng (wangqiangsheng) wrote :

查找问题定位:/usr/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.py

3,解决问题bug:
  修改前:
    if image_meta.disk_format != 'raw':
  修改后:
    if image_meta['disk_format'] != 'raw':
179
180 def is_cloneable(self, image_location, image_meta):
181 import ipdb;ipdb.set_trace()
182 url = image_location['url']
183 try:
184 fsid, pool, image, snapshot = self.parse_url(url)
185 except exception.ImageUnacceptable as e:
186 LOG.debug('not cloneable: %s', e)
187 return False
188
189 if self._get_fsid() != fsid:
190 reason = '%s is in a different ceph cluster' % url
191 LOG.debug(reason)
192 return False
193
194 # Add william , image_meta.disk_format != 'raw'
195 # so ...
196 if image_meta['disk_format'] != 'raw':
197 reason = ("rbd image clone requires image format to be "
198 "'raw' but image {0} is '{1}'").format(
199 url, image_meta.disk_format)
200 LOG.debug(reason)
201 return False

http://swq499809608.blog.51cto.com/797714/1722459
详情查看链接!