]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: escape ipv6 for ceph mon hosts to librados
authorYi Li <yili@winhong.com>
Sun, 28 Apr 2019 02:29:53 +0000 (10:29 +0800)
committerJán Tomko <jtomko@redhat.com>
Tue, 18 Jun 2019 15:14:17 +0000 (17:14 +0200)
commitcdd362e0e7a34d4f8f102c75f2ca513d23dd1db0
tree9725c7dc06da68cd754c6705b3c61adfe263ca3b
parent53f3c43ac75f6c7c1e163c2378235932a061648d
storage: escape ipv6 for ceph mon hosts to librados

Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
so they are often referenced by IP rather than hostname for
convenience, or to avoid relying on DNS. Using IPv4 addresses as the
host name works already, but IPv6 addresses require rbd-specific
escaping because the colon is used as an option separator in the
string passed to librados.

Escape these colons, and enclose the IPv6 address in square brackets
so it is distinguished from the port, which is currently mandatory.

Signed-off-by: Yi Li <yili@winhong.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
docs/schemas/storagepool.rng
src/storage/storage_backend_rbd.c
tests/storagepoolxml2xmlin/pool-rbd-ipv6.xml [new file with mode: 0644]
tests/storagepoolxml2xmlout/pool-rbd-ipv6.xml [new file with mode: 0644]
tests/storagepoolxml2xmltest.c