bc31ef8623
The current sheepdog driver has two bugs when deciding whether an image is cloneable: 1.It uses the addr in image_location url to find the image volume, if the image volume is found, then considers the image is cloneable, or considers it is not cloneable. Here has a problem, if cinder and glance use different sheepdog cluster, this may lead the image is always cloneable. In fact, it should use addr of cinder backend to find the image volume, not the glance backend. 2.The driver uses 'dog vdi list volumename' command to find a volume, if the command don't return an err, then considers the volume already exists. This means that it assumes the command would return an err code if the volume is not exists. But this is not the fact. Dog command always returns 0 no matter the volume exists or not: test for a existent volume: $ dog vdi list test01 -r = test01 0 4294967296 0 0 1469012083 40687a 3 $ echo $? 0 test for a nonexistent volume, return 0 and output nothing: $ dog vdi list testvolume -r $ echo $? 0 This patch fixed these two bugs. Change-Id: I17a8a29be5c1d994ad36a70b2f76000f9566fbde Closes-Bug: #1604740 |
||
---|---|---|
.. | ||
api | ||
backup | ||
brick | ||
cmd | ||
common | ||
compute | ||
config | ||
consistencygroup | ||
db | ||
hacking | ||
image | ||
interface | ||
keymgr | ||
locale | ||
message | ||
objects | ||
replication | ||
scheduler | ||
tests | ||
transfer | ||
volume | ||
wsgi | ||
zonemanager | ||
__init__.py | ||
context.py | ||
coordination.py | ||
exception.py | ||
flow_utils.py | ||
i18n.py | ||
manager.py | ||
opts.py | ||
policy.py | ||
quota_utils.py | ||
quota.py | ||
rpc.py | ||
service.py | ||
ssh_utils.py | ||
test.py | ||
utils.py | ||
version.py |