提交 8546f723 编写于 作者: J John Ferlan

rbd: Move the encryption check in build

No sense opening a connection only to fail because we don't support the
type of build being attempted.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 15118aca
......@@ -696,15 +696,15 @@ virStorageBackendRBDBuildVol(virConnectPtr conn,
goto cleanup;
}
if (!(ptr = virStorageBackendRBDNewState(conn, pool)))
goto cleanup;
if (vol->target.encryption != NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("storage pool does not support encrypted volumes"));
goto cleanup;
}
if (!(ptr = virStorageBackendRBDNewState(conn, pool)))
goto cleanup;
if ((r = virStorageBackendRBDCreateImage(ptr->ioctx, vol->name,
vol->target.capacity)) < 0) {
virReportSystemError(-r, _("failed to create volume '%s/%s'"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部