[libvirt] [PATCH] qemu: add port check for iscsi host when disk type is network
Ján Tomko
jtomko at redhat.com
Thu Nov 13 09:41:53 UTC 2014
On 11/13/2014 10:28 AM, Shanzhi Yu wrote:
> For network type disk, host port is not checked when source protocol is
> iscsi, so the error is not sure when with invalid port. If pass -1 to port
> the error will be
> error: Failed to start domain rh6-i
> error: An error occurred, but the cause is unknown
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
> Signed-off-by: Shanzhi Yu <shyu at redhat.com>
> ---
> src/qemu/qemu_command.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index f674ba9..f806225 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3016,6 +3016,12 @@ qemuBuildNetworkDriveURI(int protocol,
> case VIR_STORAGE_NET_PROTOCOL_FTPS:
> case VIR_STORAGE_NET_PROTOCOL_TFTP:
> case VIR_STORAGE_NET_PROTOCOL_ISCSI:
> + if (STRNEQ_NULLABLE(hosts->port,"3260")) {
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("expected port for iscsi host should be 3260"));
> + goto cleanup;
> + }
> +
NACK
We need to allow other ports than 3260. (And your check would be done for FTP,
HTTP and all the other protocols that fall through to the _ISCI case)
Jan
> case VIR_STORAGE_NET_PROTOCOL_GLUSTER:
> if (nhosts != 1) {
> virReportError(VIR_ERR_INTERNAL_ERROR,
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141113/d47ddaa1/attachment-0001.sig>
More information about the libvir-list
mailing list