Commit Graph

28 Commits

Author SHA1 Message Date
Thomas Lamprecht
a1e09e496e iscsi: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 12:02:47 +02:00
Mira Limbeck
245b651789 fix #2460: use dm-uuid-mpath- as fallback for multipath
With Debian Buster it looks like the 'scsi-' method is no longer
reliable. In addition to that, which is also used for non-multipath
systems, add the 'dm-uuid-mpath-' method as fallback. This is also used
by openstack (see os-brick
39b201160b/os_brick/initiator/linuxscsi.py (L400))

Also sort the output of readdir so 'scsi-' is always after
'dm-uuid-mpath-' so the output of pvesm list does not change for systems
that worked before.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2020-07-07 16:58:25 +02:00
Dominik Csapak
3587acc80a fix #2474: always show iscsi content
Instead of relying on list_volumes of Plugin.pm (which filters by
the content types set in the config), use our own to always
show the luns of an iscsi.

This makes sense here, since we need it to show the luns when using
it as base storage for LVM (where we have content type 'none' set).

It does not interfere with the rest of the GUI, since on e.g. disk
creation, we already filter the storages in the dropdown by content
type, iow. an iscsi storage used this way still does not show up
when trying to create a disk.

This also shows the luns now in the 'Content' tab, but this is also
OK, since the user cannot actually do anything there with the luns.
(Besides looking at them)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-07 18:09:50 +02:00
Thomas Lamprecht
553c9b21a7 iscis: add iscsi_session helper
allows to write some code sligthly nicer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-03 11:33:34 +01:00
Thomas Lamprecht
c29bad0d90 iscsi: sort and split module usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-03 11:33:34 +01:00
Aaron Lauterer
4f430a43ba ISCSI: whitespace cleanup
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-03-03 11:33:34 +01:00
Aaron Lauterer
42b988f735 fix #2620: storage API: iSCSI: return active field as integer
If active, the return value was a string: "1" and not an integer.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-03-03 11:33:34 +01:00
Wolfgang Bumiller
9edb99a5a7 add Storage::get_bandwidth_limit helper
Takes an operation, an optional requested bandwidth
limit override, and a list of storages involved in the
operation and lowers the requested bandwidth against global
and storage-specific limits unless the user has permissions
to change those.
This means:
 * Global limits apply to all users without Sys.Modify on /
   (as they can change datacenter.cfg options via the API).
 * Storage specific limits apply to users without
   Datastore.Allocate access on /storage/X for any involved
   storage X.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-31 12:25:32 +01:00
Dominik Csapak
5da48ca6ea add select_existing to plugindata for iscsi(direct)
this will be used in the gui, for determining if we need to select
something from the storage when using for an image

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:23:52 +01:00
Emmanuel Kasper
6b4acdb460 ISCSIPlugin: Use long options for readability
We otherwise use the long options everywhere in the plugin.
This will build the following command:

iscsiadm  --mode session --sid 1 --rescan
Rescanning session [sid: 1, target: xxx, portal: yyy]
2017-10-09 10:50:11 +02:00
Dietmar Maurer
bb3fc38b2d ISCSIPlugin: improve session parser 2015-11-02 17:12:14 +01:00
Wolfgang Bumiller
1689e627a6 iSCSI ipv6 support 2015-08-31 15:50:34 +02:00
Dietmar Maurer
e67069eb58 path: corretly implement path to snapshots 2015-08-27 12:03:46 +02:00
Dietmar Maurer
7800e84d28 parse_volname: always return image format 2015-08-12 07:01:07 +02:00
Stefan Priebe
f236eaf80e Storage Plugins: extend clone_image by snap parameter and add support to RBDPlugin
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-07-17 07:54:36 +02:00
Dietmar Maurer
452e3ee780 bug fix: use filesysetm_path for LVM/iSCSI storage
So that the genrice Storage::Plugin code works again (get_subdir() fails on
this type of storage).
2013-09-19 06:41:51 +02:00
Dietmar Maurer
7acee37a30 since wheezy, iscsiadm -m session throw an error code if no session exist.
So we can't bring up the iscsi storage

This patch is based on the patch submitted by Alexandre, but we only
suppress error messages when there are no active sessions. Other errors still
trigges an exceptions.
2013-05-13 08:00:16 +02:00
Alexandre Derumier
2c5a70971a has_feature : fix key = snap
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 10:08:04 +01:00
Alexandre Derumier
7e8c6888b2 iscsi : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:28:25 +01:00
Dietmar Maurer
32437ed279 check base image use count inside vdisk_free
To make it work with all storage types.
2013-02-01 06:55:39 +01:00
Dietmar Maurer
5eab0272f0 add stubs for create_base and cone_image 2013-01-31 07:47:02 +01:00
Alexandre Derumier
852a55f7d2 iscsi : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:53:09 +01:00
Alexandre Derumier
0244a7b9c6 ISCSIPlugin : volume_resize
die as we can't resize iscsi devices

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:09 +02:00
Alexandre Derumier
a1301c92d6 ISCSIPlugin : remove specific volume_size_info
no need to use volume_size_info, we can use generic volume_size_info from Plugin. (file_size_info)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:03 +02:00
Alexandre Derumier
a548fd488f iscsiplugin:volume_size_info
return nothing for now, as we can't get volume used inside the volume, stats are empty.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:06 +02:00
Alexandre Derumier
03b5bfdf9c iscsi: add check_connection
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-19 11:00:39 +02:00
Dietmar Maurer
5521b5805b fix return value for path() 2012-05-23 13:11:20 +02:00
Dietmar Maurer
1dc01b9f30 new plugin architecture 2012-05-23 08:00:13 +02:00