5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-11 05:18:01 +03:00
Commit Graph

989 Commits

Author SHA1 Message Date
Thomas Lamprecht
4b3088a0a8 get_monaddr_list: also ensure that returned 'mon addr' are defined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-09 15:23:44 +01:00
Alwin Antreich
187df8553e ceph: get_monaddr_list: exclude general monitor section
Else, if a general MON section existed in the ceph.conf, we added a
undefined entry and a cephfs storage can't be mounted anymore.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-09 13:40:21 +01:00
David Limbeck
5b5534a9d7 fix use of uninitialized value in parse_ceph_config
Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2019-01-03 10:26:57 +01:00
Thomas Lamprecht
8e3c05c1b9 bump version to 5.0-35
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-12-20 10:50:45 +01:00
Thomas Lamprecht
ab3e0a7fbe d/control: bump pve-cluster version dependency to 5.0-32
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-12-20 10:49:06 +01:00
Dominik Csapak
71be011328 register ceph.conf parser/writer
With this we can use cfs_read_file/cfs_write_file and cfs_lock_file.

Code for writing is mostly copied from pve-managers CephTools.pm,
with the addition of mgr sections.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-12-20 09:26:11 +01:00
Dominik Csapak
4050fcc16b move Storage/CephTools to CephConfig
it is not a storage plugin, and it makes more sense to have it
top-level, but there we cannot name it CephTools because of the
existing ones in pve-manager

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-12-20 09:26:11 +01:00
Thomas Lamprecht
36d4af9ba8 bump version to 5.0-34
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-12-14 12:22:22 +01:00
Wolfgang Bumiller
c3442aa554 Fix #2020: use /sys to map nvmeXnY to nvmeX
`nvmeX` devices nodes are apparently allocated independently
from their namespace block devices `nvmeXnY` and therefore
they are not strictly related by name. For instance:
  $ readlink /sys/block/nvme0n1/device
  ../../nvme1
  $ readlink /sys/block/nvme1n1/device
  ../../nvme0

Here /dev/nvme0n1 is the first namespace of /dev/nvme1 while
/dev/nvme1n1 is the first namespace of /dev/nvme0.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-12-10 14:54:11 +01:00
Alwin Antreich
d35a0b4b62 Fix #2019: CephFS storage misses maxfiles
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-12-07 13:47:05 +01:00
Thomas Lamprecht
434c91b645 bump version to 5.0-33
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-27 13:23:48 +01:00
Thomas Lamprecht
54e0b0034b cephfs: tell systemd that mount mount requires network
As we mount this manually and thus systemd doesn't know about any
dependency for cephFS mounts, this got umounted only at the last
stage of shutdown, where network wasn't active anymore.

But, CephFS needs to be connected to an active MDS for a clean
unmount so without network this mount would delay shutdown for quite
a bit, until after some minutes systemd gave up and forced unmount.

So tell systemd that this mount requires network, which can be done
with the '_netdev'[0] mount option, that lucky for us can be also
passed to a mount call and isn't only available for fstab.

with this a mount gets, among others:
> Wants=network-online.target
> Before=umount.target remote-fs.target
> After=remote-fs-pre.target system.slice network.target network-online.target -.mount

Which does the trick for us.

[0]: https://www.freedesktop.org/software/systemd/man/systemd.mount.html#_netdev

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-27 12:10:36 +01:00
Thomas Lamprecht
957321a86e pvesm: add scan subcommands
Change to a cleaner sub command interface grouping all scan commands.

Alias to old command names for backward compatibility
Best viewed with the ignore whitespace/indent change '-w' flag from
git

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 14:11:38 +01:00
Thomas Lamprecht
95de09ae15 bump version to 5.0-32
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 15:27:32 +01:00
Thomas Lamprecht
39581b5240 d/control: bump pve-common dependency and break older pve-manager
To ensure that we have the new SysFSTools available and as previously
we hosted the API scan endoints which pve-manager registered so
record the break of older versions.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 14:44:51 +01:00
Dominik Csapak
98bf79f78b remove usb scan code
this is now in PVE::SysFSTools

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 13:20:04 +01:00
Dominik Csapak
a0965edde7 remove PVE/API2/Storage/Scan.pm
since those are now defined in pve-manager

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 13:20:04 +01:00
Dominik Csapak
7963ba74bb move Scan API calls from PVE/API2/Storage/Scan.pm to pvesm.pm
since the calls for the real API are defined now in pve-managers Scan.pm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 13:20:04 +01:00
Thomas Lamprecht
a0908caa99 APIAGE followup: fix typo and print versions in error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 12:18:03 +01:00
Wolfgang Bumiller
042dd4be1f plugin loader: add an APIAGE
With the addition of the map/unmap_volume() methods we made
an (actually unnecessary) API version bump.
All current users of these methods fall back to path() when
they return undef, so plugins implementing version 1 are
in fact compatible currently. (In fact, the default
Plugin::map_volume() could fall back to it on its own, but
doesn't currently).

For now let's just allow plugins older plugins to also be
loaded by introducing an API age variable. With it, if we
have a reason to break older plugins, we can have a
deprecation period during which older plugins cause a
warning instead of refusing to load altogether.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-11-19 10:47:46 +01:00
Thomas Lamprecht
49cc7802f7 LVM: lock on volume_resize
This is important for shared LVM storages. As with deletes and
creates of images, as else we may have not the up-to-date metadata
and extents may get reused if another node created an image during
the same time, for example.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-15 10:13:57 +01:00
Thomas Lamprecht
a4bdab17bb fix #862: do not resolve portal adress on storage add
as described in #862:

> I experienced a problem with ISCSI portal when using a hostname and
> not IP.
> The GUI resolves the hostname to an IP and writes it to storage.cfg.
> As my setup requires hostnames, i needed to change the config
> manually back to the hostname which is working fine.
>
> Why is this conversion done? If I enter a hostname, i want to have a
> hostname. If i enter an IP address i want to have an IP address.

This makes sense to me, a feature of using domains is that they
are/should be resolved when actually using (i.e., connecting to them)
so resolving it once on add does not seems like a good idea (if I do
not miss something - as this is a classic "imported from SVN" I do
not have any rationale to look at).

So save the work and pass it as is.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-15 10:06:19 +01:00
Thomas Lamprecht
5124548d5d bump version to 5.0-31
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-09 17:26:34 +01:00
Dietmar Maurer
40d698932e implement map_volume and unmap_volume
This allows to request a mapped device/path explicitly, regardles of
the storage option, eg. krbd option in the RBDplugin.

Bump of the storage ABI => 2

Co-authored-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-11-09 17:25:51 +01:00
Thomas Lamprecht
8b6b710265 folowup: fix whitespace errors and s/and/&&/ for consistency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-09 15:27:08 +01:00
Tim Marx
5b4b715771 storage zfs: removed unused variable
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-11-09 14:49:43 +01:00
Tim Marx
32f749b840 storage zfs: changed return value description & optionals
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-11-09 14:49:43 +01:00
Tim Marx
a49fc735e5 close #1949: storage zfs: changed zpool command parser
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-11-09 14:49:43 +01:00
Tim Marx
b005f2f483 Fix: api zfs: changed return value name to errors
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-10-29 10:33:39 +01:00
Thomas Lamprecht
e6c4144fa6 d/control: record pve-cluster build dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-18 13:25:34 +02:00
Thomas Lamprecht
db59cd4493 bump version to 5.0-30
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-03 17:02:55 +02:00
Thomas Lamprecht
a298e55665 remove outdated unused API2::Storage::Replication module
this was not installed, had references to non-existing modules
(e.g., PVE::ReplicationTools) and the things it probably was intended
for are done in pve-manager, which has full access to all pve perl
libs and API methods (from a dependency POV)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-03 16:58:57 +02:00
Thomas Lamprecht
0370861cfd diskmanage: rename check_unused to assert_disk_unused
to have a clear method name for this. check_XYZ suggests also that we
return true if the check was OK, but we don't.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-03 14:51:38 +02:00
Thomas Lamprecht
9280153e10 rename check_available to assert_sid_unused
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-03 14:49:14 +02:00
Dominik Csapak
4dcb16c0dc fix #1929: only check storage if user want to create one
this is useful if a user wants to create similar storage on each host

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dominik Csapak
820bab50b9 add missing storage check in LVM Disk API
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dominik Csapak
76c1e57be7 refactor disk/storage checks for Disk API
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dietmar Maurer
94836d7b8c pvesm iscsiscan: fix cli parameters
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-10-01 10:56:18 +02:00
Thomas Lamprecht
c9fc2bc994 bump version to 5.0-29
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 11:21:37 +02:00
Thomas Lamprecht
dd9e97ed14 find_free_diskname: fixup regex match operator
Co-developed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 11:21:37 +02:00
Dietmar Maurer
0057171085 Fix #1925: untaint rbd JSON output
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-09-19 11:21:37 +02:00
Thomas Lamprecht
729c2594f9 bump version to 5.0-28
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-14 11:42:23 +02:00
Dominik Csapak
401b56fc54 fix #1912: find the partition instead of guessing it
instead of using '$dev1' as partition,
get the information from /sys/block/$dev

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-14 11:24:42 +02:00
Thomas Lamprecht
dd1fa860d0 get_vm_disk_number: follow up cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-14 09:19:08 +02:00
Stoiko Ivanov
f4cc2c4afe Fix #1913: get_vm_disk_number: clone plugindata to avoid side effects
Accessing a non-existing 'format' key in plugindata (e.g., in LvmThinPlugin),
created it by autovivication, thus breaking the fallback to the default value
'raw' upon any following access.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-14 09:17:40 +02:00
Thomas Lamprecht
9dcf88bb27 bump version to 5.0-27
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-12 15:00:45 +02:00
Alwin Antreich
e5b2206f8a rbd: krbd_feature_disable was not disabling features
$features is actually an array reference, so use it as one.
This broke creation and migration of disks on rbd storages

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-12 14:56:36 +02:00
Thomas Lamprecht
83a40b8d3b refactor is_valid_vm_diskname to private simpler sub
This was newly introduced and is only used once, so having a
wantarray return mechanism, without ever using it or knowing for sure
if this may help with reuse of the method is not ideal.

Make the sub a module private one just returning the vm disk number
or explicit undef. Pass it the $suffix variable, to avoid recomputing
it every time called by out caller's loop.

If there's re-use potential in the future we can actually decide what
makes sense to return.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-11 07:52:43 +02:00
Stoiko Ivanov
c4a29df483 refactor finding next diskname for all plugins
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-10 12:21:10 +02:00
Thomas Lamprecht
59fa9fd6a3 next diskname: start ids with 0 to honor MAX_VOLUMES_PER_GUEST
else we can only have MAX_VOLUMES_PER_GUEST-1 disk per VMID,
not tragic but possible confusing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-10 11:21:12 +02:00