Commit Graph

898 Commits

Author SHA1 Message Date
5527c824dd cephtools: simplify ceph_check_keyfile 2018-07-04 16:56:24 +02:00
5402cea50d cephfs plugin: followup with some code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-04 15:07:33 +02:00
fe0d606f5e Use keyfile create/remove from CephTools
in the RBDPlugin, that is also shared by the CephFSPlugin

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-07-04 13:18:32 +02:00
e34ce14443 Cephfs storage plugin
- ability to mount through kernel and fuse client
 - allow mount options
 - get MONs from ceph config if not in storage.cfg
 - allow the use of ceph config with fuse client
 - Delete secret on cephfs storage creation

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-07-04 13:18:19 +02:00
3e47917203 Add simple keyring check for cephfs/rbd
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-07-04 13:13:21 +02:00
9b7ba1db42 Merge RBD and CephFS code into a helper module
Some methods for connecting to a ceph cluster are the same for RBD and
CephFS, these are merged into the helper modules.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-07-04 13:13:21 +02:00
6d3b36e1b0 api add: remove now uneeded $cred_file variable
was used for cleanup, which is now handled by on_delete_hook

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
f9602323c6 lvm: use add hook
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
2e109b4bc2 rbd: use add/delete hooks
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
ab5e32bb1d cifs: use add/delete hooks
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
3932ca0d1b add on_add and on_delete hooks
on_add_hook allows to encapsulate storage specific add steps, like
copying a keyring (RDB) or creating a volume group (LVM) in a clean
manner.
The same for deletion with on_delete_hook, here all should be cleaned
up, as much as possible.

Until now, this was done directly in the api config CREATE and DELETE
code, respectively, with a series of

if ($storage_type eq 'foo) {
    ...
} elsif ($storage_type eq 'bar') {
    ...
}

which isn't really that nice...

Another nice result of this approach is that also external plugins
can use those hooks and to their setup/cleanup steps sanely.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-07-03 12:27:34 +02:00
d7b707626a storage add: always extract password from parameters
as else we write it to /etc/pve/storage.cfg which is readable by
www-data, a not really private group...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-29 13:16:17 +02:00
2d4404fc63 add cifs: fix variable declaration in post if
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-29 13:15:26 +02:00
2fce40ea37 d/control: update pve-common version dependency
as we use the new param_mapping functionallity from PVE::CLIHandler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-27 13:24:53 +02:00
42f2c57dfa replace read_password with param_mapping
we only need this for cifs as this is the only type
of storage where we expect a password

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 13:23:21 +02:00
8b3d5c1f12 PVE/API2/Storage/Config.pm - set type in returns schema 2018-06-22 07:52:51 +02:00
3160dbf139 CIFS: add mkdir option allowing to switch off path creation
see commit: c7616abcb2
2018-06-14 07:49:43 +02:00
bed538e22f Add missing dependency to ceph-common
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-06-12 08:53:12 +02:00
5bc3edb243 followup: fix typo 2018-06-06 15:38:22 +02:00
c2f12dc648 Use enums for smbvers to prevent incorrect input 2018-06-06 15:36:25 +02:00
ff6fa67fb6 Make check_connection less costly.
This command will only check the needed share
and do not query the hole server shares.

This reduce the answer time and also has the benefit we check the
credentials on this share and not on the server.
2018-05-22 13:18:12 +02:00
9a75947b49 fix #1770: allow ex/import linked clones.
We encode the base-volume-name in the volname what is not needed.
On ex/import we need the correct dataset name.
2018-05-22 11:36:36 +02:00
d0d314a965 build: use git rev-parse for GITVERSION 2018-05-16 10:09:37 +02:00
b33b935b7e bump version to 5.0-23 2018-05-16 10:06:40 +02:00
840e3797a5 cifs: fix uninitialized warning in check_connection
otherwise this spams the log when check_connection runs into a timeout.
2018-05-16 10:06:00 +02:00
20cc2c38a4 bump version to 5.0-22
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-14 14:50:08 +02:00
d68c7bca46 whitespace fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-05-14 08:35:22 +02:00
fee2cb61e3 Fix typo. 2018-05-14 08:10:19 +02:00
ee8c176d3a Simplify image/template upload check.
All storage's witch are able to store images must have a path.
2018-05-14 08:10:19 +02:00
c0b969a39d bump version to 5.0-21 2018-05-08 11:51:52 +02:00
5fc02afb7d fix #1754: rbd: fix handling of external clusters
with the recent refactoring, external clusters were not handled
correctly with librd if a pveceph or storage specific ceph config
exists.

change the behaviour to include the pveceph config file only for pveceph
managed clusters, and a storage specific one only for external ones.

set mon_host correctly using the values from storage.cfg for external
librbd clusters.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-05-08 10:09:58 +02:00
fc05c9a0d8 fixup error message typo: s/sould/should/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-08 09:34:37 +02:00
cf8ded6a96 fix #1691: increase timeout in worker
A ZFS storage under heavy load can take more time.
2018-05-07 12:01:20 +02:00
894b9ecc1e fix #1691: replace udev check
`zfs create` add the creation job in a worker queue,
which should normally execute instantly. But there are circumstances
where the job will take a while to get processed.
If this is the case udev settle will see no dev in the queue and the program
will continue without an allocated dev.

The busy waiting is not best practice but the only way to be sure,
that the block device exists.
2018-05-07 12:01:20 +02:00
32ad421e34 bump version to 5.0-20 2018-05-04 15:34:11 +02:00
0b45fb3eb5 Fix #1750: set monhost split to old behavior
The path method of the RBDPlugin got a list with comma separated monhosts,
but it needs the list with semi-colon for qemu.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-05-04 14:18:04 +02:00
bce13b7f50 bump version to 5.0-19 2018-04-18 10:46:46 +02:00
6cc88e8ef1 Refactor of method build_cmd and path
Method build_cmd and path use similar code to generate the ceph command
line or qemu config parameters. They now use the private method
ceph_connect_option for parameter generation.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-04-18 10:45:06 +02:00
41aacc6cde Fix #1542: show storage utilization per pool
- get storage utilization per pool
 - use librados2-perl for pool status
 - add librados2-perl as build-depends and depends in debian/control

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-04-18 10:43:14 +02:00
32c0a1d59b bump version to 5.0-18
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:06:53 +01:00
566639d518 cifs: use correct pluging class name 2018-03-16 13:23:47 +01:00
a9db2ca8a5 cifs: move plugin related code into plugin 2018-03-16 13:08:32 +01:00
304344ce34 add missing "use PVE::Storage::LVMPlugin;" 2018-03-16 12:54:06 +01:00
fa1b42dd98 cifs plugin cleanups 2018-03-16 12:35:55 +01:00
c6fb7b80fc remove useless "use PVE::PTY;" 2018-03-16 12:09:37 +01:00
c26f3a7105 Add read_password in CLI. 2018-03-16 12:08:24 +01:00
6a26444462 Add cifsscan to CLI 2018-03-16 12:07:39 +01:00
b9cfb8cac7 Add cifsscan to API 2018-03-16 12:07:14 +01:00
4cab0acd27 Add cifsscan. 2018-03-16 12:06:37 +01:00
d787523984 Register CIFSPlugin in the storage plugin system. 2018-03-16 12:06:14 +01:00