Remove gluster support

Development on gluster has stopped upstream, see:

https://marc.info/?l=fedora-devel-list&m=171934833215726&w=2
This commit is contained in:
Richard W.M. Jones
2024-06-27 16:11:20 +01:00
parent 43946911c7
commit c080449511
14 changed files with 1 additions and 202 deletions

View File

@@ -1160,16 +1160,6 @@ The equivalent API command would be:
><fs> add /disk.img protocol:(ftp|...) server:tcp:example.com
=head2 B<-a gluster://example.com[:port]/volname/image>
Add a disk image located on GlusterFS storage.
The server is the one running C<glusterd>, and may be C<localhost>.
The equivalent API command would be:
><fs> add volname/image protocol:gluster server:tcp:example.com
=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]>
Add a disk located on an iSCSI server.

View File

@@ -44,10 +44,6 @@ grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail
$VG guestfish -x -a ftp://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
# gluster
$VG guestfish -x -a gluster://example.com/disk </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive "disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail
# NBD
$VG guestfish -x -a nbd://example.com </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail

View File

@@ -357,13 +357,6 @@ The C<server> parameter must also be supplied - see below.
See also: L<guestfs(3)/FTP, HTTP AND TFTP>
=item C<protocol = \"gluster\">
Connect to the GlusterFS server.
The C<server> parameter must also be supplied - see below.
See also: L<guestfs(3)/GLUSTER>
=item C<protocol = \"iscsi\">
Connect to the iSCSI server.
@@ -416,7 +409,6 @@ is a list of server(s).
-------- --------------------------
file List must be empty or param not used at all
ftp|ftps|http|https|tftp Exactly one
gluster Exactly one
iscsi Exactly one
nbd Exactly one
rbd Zero or more

View File

@@ -194,37 +194,6 @@ create_drive_curl (guestfs_h *g,
return create_drive_non_file (g, data);
}
static struct drive *
create_drive_gluster (guestfs_h *g,
const struct drive_create_data *data)
{
if (data->username != NULL) {
error (g, _("gluster: you cannot specify a username with this protocol"));
return NULL;
}
if (data->secret != NULL) {
error (g, _("gluster: you cannot specify a secret with this protocol"));
return NULL;
}
if (data->nr_servers != 1) {
error (g, _("gluster: you must specify exactly one server"));
return NULL;
}
if (STREQ (data->exportname, "")) {
error (g, _("gluster: volume name parameter should not be an empty string"));
return NULL;
}
if (data->exportname[0] == '/') {
error (g, _("gluster: volume/image must not begin with a '/'"));
return NULL;
}
return create_drive_non_file (g, data);
}
static int
nbd_port (void)
{
@@ -481,7 +450,6 @@ guestfs_int_drive_protocol_to_string (enum drive_protocol protocol)
case drive_protocol_file: return "file";
case drive_protocol_ftp: return "ftp";
case drive_protocol_ftps: return "ftps";
case drive_protocol_gluster: return "gluster";
case drive_protocol_http: return "http";
case drive_protocol_https: return "https";
case drive_protocol_iscsi: return "iscsi";
@@ -850,10 +818,6 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
data.protocol = drive_protocol_ftps;
drv = create_drive_curl (g, &data);
}
else if (STREQ (protocol, "gluster")) {
data.protocol = drive_protocol_gluster;
drv = create_drive_gluster (g, &data);
}
else if (STREQ (protocol, "http")) {
data.protocol = drive_protocol_http;
drv = create_drive_curl (g, &data);

View File

@@ -210,7 +210,6 @@ enum drive_protocol {
drive_protocol_file,
drive_protocol_ftp,
drive_protocol_ftps,
drive_protocol_gluster,
drive_protocol_http,
drive_protocol_https,
drive_protocol_iscsi,
@@ -225,9 +224,6 @@ enum drive_transport {
drive_transport_none = 0, /* no transport specified */
drive_transport_tcp, /* +tcp */
drive_transport_unix, /* +unix */
/* XXX In theory gluster+rdma could be supported here, but
* I have no idea what gluster+rdma URLs would look like.
*/
};
struct drive_server {

View File

@@ -748,26 +748,7 @@ L</guestfs_add_drive_opts>.
=head3 GLUSTER
Libguestfs can access Gluster disks.
To do this, set the optional C<protocol> and C<server> parameters of
L</guestfs_add_drive_opts> like this:
char **servers = { "gluster.example.org:24007", NULL };
guestfs_add_drive_opts (g, "volname/image",
GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster",
GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
-1);
C<servers> (the C<server> parameter) is a list which must have a
single element. The single element is a string defining the Gluster
server. The format of this string is documented in
L</guestfs_add_drive_opts>.
Note that gluster usually requires the client process (ie. libguestfs)
to run as B<root> and will give unfathomable errors if it is not
(eg. "No data available").
Glusterfs support was removed in libguestfs 1.54 (2024).
=head3 ISCSI

View File

@@ -1537,8 +1537,6 @@ construct_libvirt_xml_disk (guestfs_h *g,
* or:
* <host transport='unix' socket='/path/to/socket'/>
*/
case drive_protocol_gluster:
protocol_str = "gluster"; goto network_protocols;
case drive_protocol_iscsi:
protocol_str = "iscsi"; goto network_protocols;
case drive_protocol_nbd:
@@ -2000,7 +1998,6 @@ add_secret (guestfs_h *g, virConnectPtr conn,
case drive_protocol_file:
case drive_protocol_ftp:
case drive_protocol_ftps:
case drive_protocol_gluster:
case drive_protocol_http:
case drive_protocol_https:
case drive_protocol_iscsi:
@@ -2082,7 +2079,6 @@ find_secret (guestfs_h *g,
case drive_protocol_file:
case drive_protocol_ftp:
case drive_protocol_ftps:
case drive_protocol_gluster:
case drive_protocol_http:
case drive_protocol_https:
case drive_protocol_nbd:

View File

@@ -827,20 +827,6 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g,
return make_uri (g, "ftps", src->username, src->secret,
&src->servers[0], src->u.exportname);
case drive_protocol_gluster:
switch (src->servers[0].transport) {
case drive_transport_none:
return make_uri (g, "gluster", NULL, NULL,
&src->servers[0], src->u.exportname);
case drive_transport_tcp:
return make_uri (g, "gluster+tcp", NULL, NULL,
&src->servers[0], src->u.exportname);
case drive_transport_unix:
return make_uri (g, "gluster+unix", NULL, NULL,
&src->servers[0], NULL);
}
break;
case drive_protocol_http:
return make_uri (g, "http", src->username, src->secret,
&src->servers[0], src->u.exportname);
@@ -1023,7 +1009,6 @@ guestfs_int_discard_possible (guestfs_h *g, struct drive *drv,
switch (drv->src.protocol) {
/* Protocols which support discard. */
case drive_protocol_file:
case drive_protocol_gluster:
case drive_protocol_iscsi:
case drive_protocol_nbd:
case drive_protocol_rbd:

View File

@@ -642,7 +642,6 @@ TESTS += \
regressions/rhbz1011907-1165785.sh \
regressions/rhbz1174551.sh \
regressions/rhbz1175196.sh \
regressions/rhbz1370424.sh \
regressions/rhbz1477623.sh \
regressions/rhbz1930996.sh \
regressions/test-big-heap \
@@ -675,8 +674,6 @@ EXTRA_DIST += \
regressions/rhbz1091803.sh \
regressions/rhbz1174551.sh \
regressions/rhbz1175196.sh \
regressions/rhbz1370424.sh \
regressions/rhbz1370424.xml \
regressions/rhbz1477623.sh \
regressions/rhbz1930996.sh \
regressions/test-noexec-stack.pl

View File

@@ -65,13 +65,6 @@ check_output
grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2
rm "$DEBUG_QEMU_FILE"
# Gluster.
$guestfish -d gluster run ||:
check_output
grep -sq -- '-drive file=gluster://1.2.3.4:1234/volname/image,' "$DEBUG_QEMU_FILE" || fail gluster
rm "$DEBUG_QEMU_FILE"
# iSCSI.
$guestfish -d iscsi run ||:

View File

@@ -59,25 +59,6 @@
</devices>
</domain>
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
<test:runstate>5</test:runstate> <!-- 5 == VIR_DOMAIN_SHUTOFF -->
<name>gluster</name>
<memory>1048576</memory>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<disk type='network' device='disk'>
<driver name='qemu'/>
<source protocol='gluster' name='volname/image'>
<host name='1.2.3.4' port='1234'/>
</source>
<target dev='vda' bus='virtio'/>
</disk>
</devices>
</domain>
<domain type='test' xmlns:test='http://libvirt.org/schemas/domain/test/1.0'>
<test:runstate>5</test:runstate> <!-- 5 == VIR_DOMAIN_SHUTOFF -->
<name>iscsi</name>

View File

@@ -72,16 +72,6 @@ check_output
grep -sq -- '-drive file=http://www.example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
rm "$DEBUG_QEMU_FILE"
# Gluster.
guestfish <<EOF ||:
add "volname/image" "format:raw" "protocol:gluster" "server:www.example.com:24007"
run
EOF
check_output
grep -sq -- '-drive file=gluster://www.example.com:24007/volname/image,' "$DEBUG_QEMU_FILE" || fail
rm "$DEBUG_QEMU_FILE"
# iSCSI.
guestfish <<EOF ||:

View File

@@ -1,34 +0,0 @@
#!/bin/bash -
# libguestfs
# Copyright (C) 2016 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Regression test for:
# https://bugzilla.redhat.com/show_bug.cgi?id=1370424
# Handle a network disk without a port attribute.
set -e
$TEST_FUNCTIONS
skip_if_skipped
guestfish <<EOF
-add-domain rhbz1370424 \
libvirturi:test://$srcdir/regressions/rhbz1370424.xml \
readonly:true
# The test is just that the above command does not segfault.
# We don't need to do anything else here.
EOF

View File

@@ -1,28 +0,0 @@
<node>
<domain type='test'>
<name>rhbz1370424</name>
<memory>1048576</memory>
<vcpu>2</vcpu>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<devices>
<disk type='network' device='disk'>
<driver name='qemu' type='raw'/>
<source protocol='gluster' name='gluster-vol/test.qcow2'>
<host name='localhost'/>
</source>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
</devices>
</domain>
</node>