[cinder-lvm] Resolve issue when there are multiple loop devices
If a deployment fails, there may end up being multiple loopback devices pointing to the same image file. This currently breaks the systemd unit file because it cannot handle starting two devices properly. We only need one device, so just in case this situation arises, we now ensure that anything more than the first device is ignored when running 'Get or create LVM loopback device'. Change-Id: I012ee9c60bce4148da8ec6fe077ee20cfe34d555 Related-bug: #1873899
This commit is contained in:
parent
4354a96787
commit
d9152a601e
|
@ -114,7 +114,7 @@ outputs:
|
|||
losetup -f /var/lib/cinder/cinder-volumes --show
|
||||
exit_code=2
|
||||
else
|
||||
echo ${existing_device}
|
||||
echo ${existing_device%$'\n'*}
|
||||
fi
|
||||
exit ${exit_code}
|
||||
args:
|
||||
|
|
Loading…
Reference in New Issue