diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 9d4265f9a..1f3247f37 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -1202,18 +1202,6 @@ The equivalent API command would be: > add pool/disk protocol:rbd server:tcp:example.com:port -=head2 B<-a sheepdog://[example.com[:port]]/volume/image> - -Add a disk image located on a Sheepdog volume. - -The server name is optional. Although libguestfs and Sheepdog -supports multiple servers, only at most one server can be specified -when using this URI syntax. - -The equivalent API command would be: - - > add volume protocol:sheepdog [server:tcp:example.com] - =head2 B<-a ssh://[user@]example.com[:port]/disk.img> Add a disk image located on a remote server, accessed using the Secure diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh index 1446e21f3..533a3ce0c 100755 --- a/fish/test-add-uri.sh +++ b/fish/test-add-uri.sh @@ -63,13 +63,6 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te $VG guestfish -x -a rbd:///pool/disk test-add-uri.out 2>&1 grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail -# sheepdog -$VG guestfish -x -a sheepdog:///volume/image test-add-uri.out 2>&1 -grep -sq 'add_drive "volume/image" "protocol:sheepdog"' test-add-uri.out || fail - -$VG guestfish -x -a sheepdog://example.com:3000/volume/image test-add-uri.out 2>&1 -grep -sq 'add_drive "volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail - # ssh $VG guestfish -x -a ssh://example.com/disk.img test-add-uri.out 2>&1 grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail diff --git a/generator/actions_core.ml b/generator/actions_core.ml index 877303dad..9a0025df0 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -382,13 +382,6 @@ The C parameter may be supplied. See below. See also: L. -=item C - -Connect to the Sheepdog server. -The C parameter may also be supplied - see below. - -See also: L. - =item C Connect to the Secure Shell (ssh) server. @@ -412,7 +405,6 @@ is a list of server(s). iscsi Exactly one nbd Exactly one rbd Zero or more - sheepdog Zero or more ssh Exactly one Each list element is a string specifying a server. The string must be diff --git a/lib/drives.c b/lib/drives.c index a3a2712b5..ab1b8c49c 100644 --- a/lib/drives.c +++ b/lib/drives.c @@ -261,46 +261,6 @@ create_drive_rbd (guestfs_h *g, return create_drive_non_file (g, data); } -static struct drive * -create_drive_sheepdog (guestfs_h *g, - const struct drive_create_data *data) -{ - size_t i; - - if (data->username != NULL) { - error (g, _("sheepdog: you cannot specify a username with this protocol")); - return NULL; - } - if (data->secret != NULL) { - error (g, _("sheepdog: you cannot specify a secret with this protocol")); - return NULL; - } - - for (i = 0; i < data->nr_servers; ++i) { - if (data->servers[i].transport != drive_transport_none && - data->servers[i].transport != drive_transport_tcp) { - error (g, _("sheepdog: only tcp transport is supported")); - return NULL; - } - if (data->servers[i].port == 0) { - error (g, _("sheepdog: port number must be specified")); - return NULL; - } - } - - if (STREQ (data->exportname, "")) { - error (g, _("sheepdog: volume parameter should not be an empty string")); - return NULL; - } - - if (data->exportname[0] == '/') { - error (g, _("sheepdog: volume parameter must not begin with a '/'")); - return NULL; - } - - return create_drive_non_file (g, data); -} - static struct drive * create_drive_ssh (guestfs_h *g, const struct drive_create_data *data) @@ -455,7 +415,6 @@ guestfs_int_drive_protocol_to_string (enum drive_protocol protocol) case drive_protocol_iscsi: return "iscsi"; case drive_protocol_nbd: return "nbd"; case drive_protocol_rbd: return "rbd"; - case drive_protocol_sheepdog: return "sheepdog"; case drive_protocol_ssh: return "ssh"; case drive_protocol_tftp: return "tftp"; } @@ -838,10 +797,6 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, data.protocol = drive_protocol_rbd; drv = create_drive_rbd (g, &data); } - else if (STREQ (protocol, "sheepdog")) { - data.protocol = drive_protocol_sheepdog; - drv = create_drive_sheepdog (g, &data); - } else if (STREQ (protocol, "ssh")) { data.protocol = drive_protocol_ssh; drv = create_drive_ssh (g, &data); diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index 7233af0f3..87ba0824d 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -215,7 +215,6 @@ enum drive_protocol { drive_protocol_iscsi, drive_protocol_nbd, drive_protocol_rbd, - drive_protocol_sheepdog, drive_protocol_ssh, drive_protocol_tftp, }; diff --git a/lib/guestfs.pod b/lib/guestfs.pod index a28fd5a1a..7e3b58efb 100644 --- a/lib/guestfs.pod +++ b/lib/guestfs.pod @@ -832,21 +832,7 @@ L =head3 SHEEPDOG -Libguestfs can access Sheepdog disks. - -To do this, set the optional C and C parameters of -L like this: - - char **servers = { /* optional servers ... */ NULL }; - guestfs_add_drive_opts (g, "volume", - GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", - GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog", - GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, - -1); - -The optional list of C may be zero or more server addresses -(C<"hostname:port">). The format of the server strings is documented -in L. +Sheepdog support was removed in libguestfs 1.54 (2024). =head3 SSH diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c index c90ceb7f2..f3b96f468 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1543,8 +1543,6 @@ construct_libvirt_xml_disk (guestfs_h *g, protocol_str = "nbd"; goto network_protocols; case drive_protocol_rbd: protocol_str = "rbd"; goto network_protocols; - case drive_protocol_sheepdog: - protocol_str = "sheepdog"; goto network_protocols; case drive_protocol_ssh: protocol_str = "ssh"; /*FALLTHROUGH*/ @@ -2002,7 +2000,6 @@ add_secret (guestfs_h *g, virConnectPtr conn, case drive_protocol_https: case drive_protocol_iscsi: case drive_protocol_nbd: - case drive_protocol_sheepdog: case drive_protocol_ssh: case drive_protocol_tftp: secret_raw = (unsigned char *) safe_strdup (g, secret); @@ -2082,7 +2079,6 @@ find_secret (guestfs_h *g, case drive_protocol_http: case drive_protocol_https: case drive_protocol_nbd: - case drive_protocol_sheepdog: case drive_protocol_ssh: case drive_protocol_tftp: /* set to a default value above */ ; diff --git a/lib/qemu.c b/lib/qemu.c index 5800915b4..5c9b1808a 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -926,14 +926,6 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g, secret ? secret : ""); } - case drive_protocol_sheepdog: - if (src->nr_servers == 0) - return safe_asprintf (g, "sheepdog:%s", src->u.exportname); - else /* XXX How to pass multiple hosts? */ - return safe_asprintf (g, "sheepdog:%s:%d:%s", - src->servers[0].u.hostname, src->servers[0].port, - src->u.exportname); - case drive_protocol_ssh: return make_uri (g, "ssh", src->username, src->secret, &src->servers[0], src->u.exportname); @@ -1012,7 +1004,6 @@ guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, case drive_protocol_iscsi: case drive_protocol_nbd: case drive_protocol_rbd: - case drive_protocol_sheepdog: /* XXX depends on server version */ break; /* Protocols which don't support discard. */ diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh index a34644e1d..afbeddec6 100755 --- a/tests/disks/test-qemu-drive-libvirt.sh +++ b/tests/disks/test-qemu-drive-libvirt.sh @@ -79,13 +79,6 @@ check_output grep -sq -- '-drive file=nbd:1.2.3.4:1234,' "$DEBUG_QEMU_FILE" || fail nbd rm "$DEBUG_QEMU_FILE" -# Sheepdog. - -$guestfish -d sheepdog run ||: -check_output -grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail sheepdog -rm "$DEBUG_QEMU_FILE" - # Local, stored in a pool. $guestfish -d pool1 run ||: diff --git a/tests/disks/test-qemu-drive-libvirt.xml.in b/tests/disks/test-qemu-drive-libvirt.xml.in index ded9fade1..245f2a17b 100644 --- a/tests/disks/test-qemu-drive-libvirt.xml.in +++ b/tests/disks/test-qemu-drive-libvirt.xml.in @@ -97,23 +97,6 @@ - - 5 - sheepdog - 1048576 - - hvm - - - - - - - - - - - 5 pool1 diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh index 777ed3b26..9ee7df389 100755 --- a/tests/disks/test-qemu-drive.sh +++ b/tests/disks/test-qemu-drive.sh @@ -109,16 +109,6 @@ check_output grep -sq -- '-drive file=nbd:unix:/socket,' "$DEBUG_QEMU_FILE" || fail rm "$DEBUG_QEMU_FILE" -# Sheepdog. - -guestfish <