Wolfgang Link [Fri, 16 Mar 2018 09:22:52 +0000 (10:22 +0100)]
Add cifs in create API call.
In this patch the nodes will be deleted if the nodes parameter comes with a empty string.
We need this in the GUI when update the nodes in the config to reset if a nodes.
If we do not erase the empty hash the storage online check would be skipped.
Also the password and user would not be verified.
Before, 'undef' was equivalent to unlimited, but '0' is the
"explicitly unlimited" value, so if the user doesn't request
an override, apply limits as if the user was unprivileged
(otherwise there's no way for privileged users to explicitly
ask to not override the configured limits).
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Alwin Antreich [Fri, 2 Mar 2018 11:03:46 +0000 (12:03 +0100)]
Fix #1574: could not disable krbd-incompatible image features
To prevent an error when disabling features of a rbd image with already
disabled flags. This aborted the CT/VM cloning halfway through with
a leftover rbd image, but no vmid.conf to it.
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>
Dominik Csapak [Wed, 8 Nov 2017 08:01:58 +0000 (09:01 +0100)]
(finally) fix #1099: return disklist correctly
in get_disks, when called with a parameter 'cciss/cXdY', we replaced
the '/' with '!' so that we can properly poll the information
about it from /sys/block/
but we have to replace the '!' with '/' again in our result list,
because the caller does not know anything about it and fails, because
the original dev is not in the list
to allow differentiating between user-created external RBD storage
entries (WITH monhost), and those created and managed by pveceph
(without).
making monhost non-fixed allows easily opting into the managed behaviour via
'pvesm set STORAGE -delete monhost', but is also helpful for external clusters
(i.e., after adding or removing a monitor you need to update the monhost
parameter..)
This turns is_mountpoint more into export(5)'s `mountpoint`
property.
Given the directory storage with the properties:
path /a/b/c
is_mountpoint $value
$value = yes
Same as before, /a/b/c must be mounted.
$value = no (or not set)
Same as before, no effect.
$value = /a/b
New: /a/b must be mounted (as opposed to /a/b/c)
Philip Abernethy [Thu, 10 Aug 2017 11:14:52 +0000 (13:14 +0200)]
Fix #1474: Fixes input and output of print_storage
Accommodates changes in 44ae567 and d40e27d by
reordering checks to allow for proper filtering
of disabled storages. Also reorders two checks to
prevent autovivification resulting in disabled
storages always showing in output.
Thomas Lamprecht [Thu, 27 Jul 2017 10:16:46 +0000 (12:16 +0200)]
pvesm status: improve output and its format
Add column names at top of output, this allows easier understanding
of what each column means.
Use leading spaces on the percentage column so that this is lined up.
Switch out the 1/0 from the active column with the actual status
(active, inactive, disabled).
Show N/A if storage is disabled.
Use $res->{total} instead of calculating a sum of used and available.
Remove wrong rounding - if we want to display 2 digits from the
fractional part we would need to add 0.005 not 0.5, this made the
result quite wrong depending on the storage size.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Thu, 29 Jun 2017 12:48:13 +0000 (14:48 +0200)]
Fixes: #1415 do not block pvestatd when nfsd is stopped on the server side
Wrap the -d test with run_or_get_killed sub this test
can make pvestatd hang on I/O wait when a nfsd process is stopped
This might help with other file based storages, for instance
directory storages on unplugged USB devices.
This replaces the path-based and lvm/thin special cases in
storage_migrate with the already generic-enough zfspool
case which is already using import/export and does not
directly depend on zfs anymore.
All of them have a `+size` prefix to show that they're not
"pure raw" or "pure tar" streams, because some storage may
need to know in advance how much storage to allocate.
The formats are explained in comments.
PVE::Storage::Plugin now has default implementations for
these for non-incremental streams exporting the current
(rather than a snapshot state).
To use qcow2 or vmdk formats $with_snapshots must be true,
otherwise raw/tar will be used where $with_snapshots must
be false.
add debian directory and move the respective files there and add
missing (rules, compat).
Move control.in to control as no sed search & replacement must be
done. Add a Source section to the control file.
Rename the "check" Makefile target to "test" so that the dh_auto_test
helper executes it automatically on build.
Move the verify_api check to this target.
Cleanup the "clean" target and remove outdated commented out stuff
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The volume_snapshot call was missing the condition when to
create a snapshot. Make the whole logic easier to follow
with a $migration_snapshot boolean.
Also get rid of the remote `pvesm free -snapshot` call by
using import's new -delete-snapshot parameter.
This deletes a snapshot on *success*, done directly in the
CLI handler, as the rollback/delete on failure is already
happening inside the plugin's import method.