[libvirt] [PATCH] rbd: Do not append Ceph monitor port number 6789 if not provided
Wido den Hollander
wido at widodh.nl
Wed Jan 6 09:27:10 UTC 2016
On 01/06/2016 09:49 AM, Andrea Bolognani wrote:
> On Wed, 2016-01-06 at 09:32 +0100, Wido den Hollander wrote:
>> diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
>> index 2aa1d90..1354601 100644
>> --- a/src/util/virstoragefile.c
>> +++ b/src/util/virstoragefile.c
>> @@ -2246,7 +2246,7 @@ virStorageSourceRBDAddHost(virStorageSourcePtr src,
>> if (VIR_STRDUP(src->hosts[src->nhosts - 1].port, port) < 0)
>> goto error;
>> } else {
>> - if (VIR_STRDUP(src->hosts[src->nhosts - 1].port, "6789") < 0)
>> + if (VIR_STRDUP(src->hosts[src->nhosts - 1].port, NULL) < 0)
>> goto error;
>> }
>
> Shouldn't this be
>
>> if (VIR_STRDUP(src->hosts[src->nhosts - 1].port, port) < 0)
>> goto error;
>> } else {
>> - if (VIR_STRDUP(src->hosts[src->nhosts - 1].port, "6789") < 0)
>> - goto error;
>> + src->hosts[src->nhosts - 1].port = NULL;
>> }
>
What does that benefit? We set it to 6789 and to NULL afterwards? I just
want to get rid of any hardcoded monitor ports in libvirt for Ceph.
> instead?
>
> Cheers.
>
> --
> Andrea Bolognani
> Software Engineer - Virtualization Team
>
More information about the libvir-list
mailing list