tree-wide: fix typos with codespell
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -238,7 +238,7 @@ my $real_volume_id = sub {
|
|||||||
raise_param_exc({ volume => $@ }) if $@;
|
raise_param_exc({ volume => $@ }) if $@;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
raise_param_exc({ volume => "no storage speficied - incomplete volume ID" })
|
raise_param_exc({ volume => "no storage specified - incomplete volume ID" })
|
||||||
if !$storeid;
|
if !$storeid;
|
||||||
|
|
||||||
$volid = "$storeid:$volume";
|
$volid = "$storeid:$volume";
|
||||||
@ -435,7 +435,7 @@ __PACKAGE__->register_method ({
|
|||||||
if ($vtype eq 'backup'
|
if ($vtype eq 'backup'
|
||||||
&& $path =~ /(.*\/vzdump-\w+-\d+-\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2})[^\/]+$/) {
|
&& $path =~ /(.*\/vzdump-\w+-\d+-\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2})[^\/]+$/) {
|
||||||
my $logpath = "$1.log";
|
my $logpath = "$1.log";
|
||||||
# try to cleanup our backup log file too, if still exisiting, #318
|
# try to cleanup our backup log file too, if still existing, #318
|
||||||
unlink($logpath) if -e $logpath;
|
unlink($logpath) if -e $logpath;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -513,7 +513,7 @@ __PACKAGE__->register_method ({
|
|||||||
|
|
||||||
# do all parameter checks first
|
# do all parameter checks first
|
||||||
|
|
||||||
# then do all short running task (to raise errors befor we go to background)
|
# then do all short running task (to raise errors before we go to background)
|
||||||
|
|
||||||
# then start the worker task
|
# then start the worker task
|
||||||
my $worker = sub {
|
my $worker = sub {
|
||||||
|
|||||||
@ -123,7 +123,7 @@ sub get_monaddr_list {
|
|||||||
|
|
||||||
my $monhostlist = {};
|
my $monhostlist = {};
|
||||||
|
|
||||||
# get all ip adresses from mon_host
|
# get all ip addresses from mon_host
|
||||||
my $monhosts = [ split (/[ ,;]+/, $config->{global}->{mon_host} // "") ];
|
my $monhosts = [ split (/[ ,;]+/, $config->{global}->{mon_host} // "") ];
|
||||||
|
|
||||||
foreach my $monhost (@$monhosts) {
|
foreach my $monhost (@$monhosts) {
|
||||||
|
|||||||
@ -251,7 +251,7 @@ sub get_lvm_devices {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# if something goes wrong, we do not want
|
# if something goes wrong, we do not want
|
||||||
# to give up, but indicate an error has occured
|
# to give up, but indicate an error has occurred
|
||||||
warn "$@\n" if $@;
|
warn "$@\n" if $@;
|
||||||
|
|
||||||
my $uuids = {
|
my $uuids = {
|
||||||
@ -794,7 +794,7 @@ sub get_blockdev {
|
|||||||
die "No valid block device\n" if index($dev, $block_dev) == -1;
|
die "No valid block device\n" if index($dev, $block_dev) == -1;
|
||||||
|
|
||||||
$block_dev = "/dev/$block_dev";
|
$block_dev = "/dev/$block_dev";
|
||||||
die "Block device does not exsists\n" if !(-b $block_dev);
|
die "Block device does not exists\n" if !(-b $block_dev);
|
||||||
|
|
||||||
return $block_dev;
|
return $block_dev;
|
||||||
}
|
}
|
||||||
@ -836,7 +836,7 @@ sub append_partition {
|
|||||||
|
|
||||||
my $partition;
|
my $partition;
|
||||||
|
|
||||||
# loop again to detect the real partiton device which does not always follow
|
# loop again to detect the real partition device which does not always follow
|
||||||
# a strict $devname$partition scheme like /dev/nvme0n1 -> /dev/nvme0n1p1
|
# a strict $devname$partition scheme like /dev/nvme0n1 -> /dev/nvme0n1p1
|
||||||
dir_glob_foreach("/sys/block/$devname", qr/\Q$devname\E.*$newpartid/, sub {
|
dir_glob_foreach("/sys/block/$devname", qr/\Q$devname\E.*$newpartid/, sub {
|
||||||
my ($part) = @_;
|
my ($part) = @_;
|
||||||
|
|||||||
@ -190,7 +190,7 @@ sub storage_check_enabled {
|
|||||||
|
|
||||||
# storage_can_replicate:
|
# storage_can_replicate:
|
||||||
# return true if storage supports replication
|
# return true if storage supports replication
|
||||||
# (volumes alocated with vdisk_alloc() has replication feature)
|
# (volumes allocated with vdisk_alloc() has replication feature)
|
||||||
sub storage_can_replicate {
|
sub storage_can_replicate {
|
||||||
my ($cfg, $storeid, $format) = @_;
|
my ($cfg, $storeid, $format) = @_;
|
||||||
|
|
||||||
@ -1846,7 +1846,7 @@ sub get_bandwidth_limit {
|
|||||||
my ($operation, $storage_list, $override) = @_;
|
my ($operation, $storage_list, $override) = @_;
|
||||||
|
|
||||||
# called for each limit (global, per-storage) with the 'default' and the
|
# called for each limit (global, per-storage) with the 'default' and the
|
||||||
# $operation limit and should udpate $override for every limit affecting
|
# $operation limit and should update $override for every limit affecting
|
||||||
# us.
|
# us.
|
||||||
my $use_global_limits = 0;
|
my $use_global_limits = 0;
|
||||||
my $apply_limit = sub {
|
my $apply_limit = sub {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ sub systemd_netmount {
|
|||||||
|
|
||||||
# don't do default deps, systemd v241 generator produces ordering deps on both
|
# don't do default deps, systemd v241 generator produces ordering deps on both
|
||||||
# local-fs(-pre) and remote-fs(-pre) targets if we use the required _netdev
|
# local-fs(-pre) and remote-fs(-pre) targets if we use the required _netdev
|
||||||
# option. Over thre corners this gets us an ordering cycle on shutdown, which
|
# option. Over three corners this gets us an ordering cycle on shutdown, which
|
||||||
# may make shutdown hang if the random cycle breaking hits the "wrong" unit to
|
# may make shutdown hang if the random cycle breaking hits the "wrong" unit to
|
||||||
# delete.
|
# delete.
|
||||||
my $unit = <<"EOF";
|
my $unit = <<"EOF";
|
||||||
|
|||||||
@ -197,7 +197,7 @@ sub path {
|
|||||||
sub clone_image {
|
sub clone_image {
|
||||||
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
|
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
|
||||||
|
|
||||||
die "storage definintion has no path\n" if !$scfg->{path};
|
die "storage definition has no path\n" if !$scfg->{path};
|
||||||
|
|
||||||
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
|
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
|
||||||
$class->parse_volname($volname);
|
$class->parse_volname($volname);
|
||||||
|
|||||||
@ -344,7 +344,7 @@ sub alloc_image {
|
|||||||
|
|
||||||
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
||||||
|
|
||||||
die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
|
die "illegal name '$name' - should be 'vm-$vmid-*'\n"
|
||||||
if $name && $name !~ m/^vm-$vmid-/;
|
if $name && $name !~ m/^vm-$vmid-/;
|
||||||
|
|
||||||
my $vgs = lvm_vgs();
|
my $vgs = lvm_vgs();
|
||||||
|
|||||||
@ -358,7 +358,7 @@ my $delete_lun = sub {
|
|||||||
# step 3: save to be safe ...
|
# step 3: save to be safe ...
|
||||||
$execute_remote_command->($scfg, $timeout, $targetcli, 'saveconfig');
|
$execute_remote_command->($scfg, $timeout, $targetcli, 'saveconfig');
|
||||||
|
|
||||||
# update interal cache
|
# update internal cache
|
||||||
$free_lu_name->($scfg, $volname);
|
$free_lu_name->($scfg, $volname);
|
||||||
|
|
||||||
last;
|
last;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ sub alloc_image {
|
|||||||
|
|
||||||
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
||||||
|
|
||||||
die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
|
die "illegal name '$name' - should be 'vm-$vmid-*'\n"
|
||||||
if $name && $name !~ m/^vm-$vmid-/;
|
if $name && $name !~ m/^vm-$vmid-/;
|
||||||
|
|
||||||
my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
|
my $vgs = PVE::Storage::LVMPlugin::lvm_vgs();
|
||||||
|
|||||||
@ -565,7 +565,7 @@ sub path {
|
|||||||
|
|
||||||
my $repo = PVE::PBSClient::get_repository($scfg);
|
my $repo = PVE::PBSClient::get_repository($scfg);
|
||||||
|
|
||||||
# artifical url - we currently do not use that anywhere
|
# artificial url - we currently do not use that anywhere
|
||||||
my $path = "pbs://$repo/$name";
|
my $path = "pbs://$repo/$name";
|
||||||
|
|
||||||
return ($path, $vmid, $vtype);
|
return ($path, $vmid, $vtype);
|
||||||
@ -758,7 +758,7 @@ sub activate_storage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
die "$storeid: Cannot find datastore '$datastore', check permissions and existance!\n";
|
die "$storeid: Cannot find datastore '$datastore', check permissions and existence!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub deactivate_storage {
|
sub deactivate_storage {
|
||||||
|
|||||||
@ -134,7 +134,7 @@ my $defaultData = {
|
|||||||
},
|
},
|
||||||
maxfiles => {
|
maxfiles => {
|
||||||
description => "Deprecated: use 'prune-backups' instead. " .
|
description => "Deprecated: use 'prune-backups' instead. " .
|
||||||
"Maximal number of backup files per VM. Use '0' for unlimted.",
|
"Maximal number of backup files per VM. Use '0' for unlimited.",
|
||||||
type => 'integer',
|
type => 'integer',
|
||||||
minimum => 0,
|
minimum => 0,
|
||||||
optional => 1,
|
optional => 1,
|
||||||
@ -445,7 +445,7 @@ sub parse_config {
|
|||||||
# Storage implementation
|
# Storage implementation
|
||||||
|
|
||||||
# called during addition of storage (before the new storage config got written)
|
# called during addition of storage (before the new storage config got written)
|
||||||
# die to abort additon if there are (grave) problems
|
# die to abort addition if there are (grave) problems
|
||||||
# NOTE: runs in a storage config *locked* context
|
# NOTE: runs in a storage config *locked* context
|
||||||
sub on_add_hook {
|
sub on_add_hook {
|
||||||
my ($class, $storeid, $scfg, %param) = @_;
|
my ($class, $storeid, $scfg, %param) = @_;
|
||||||
@ -553,7 +553,7 @@ sub get_subdir {
|
|||||||
|
|
||||||
my $path = $scfg->{path};
|
my $path = $scfg->{path};
|
||||||
|
|
||||||
die "storage definintion has no path\n" if !$path;
|
die "storage definition has no path\n" if !$path;
|
||||||
|
|
||||||
my $subdir = $vtype_subdirs->{$vtype};
|
my $subdir = $vtype_subdirs->{$vtype};
|
||||||
|
|
||||||
@ -689,7 +689,7 @@ sub clone_image {
|
|||||||
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
|
my ($class, $scfg, $storeid, $volname, $vmid, $snap) = @_;
|
||||||
|
|
||||||
# this only works for file based storage types
|
# this only works for file based storage types
|
||||||
die "storage definintion has no path\n" if !$scfg->{path};
|
die "storage definition has no path\n" if !$scfg->{path};
|
||||||
|
|
||||||
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
|
my ($vtype, $basename, $basevmid, undef, undef, $isBase, $format) =
|
||||||
$class->parse_volname($volname);
|
$class->parse_volname($volname);
|
||||||
@ -1142,7 +1142,7 @@ sub status {
|
|||||||
|
|
||||||
my $path = $scfg->{path};
|
my $path = $scfg->{path};
|
||||||
|
|
||||||
die "storage definintion has no path\n" if !$path;
|
die "storage definition has no path\n" if !$path;
|
||||||
|
|
||||||
my $timeout = 2;
|
my $timeout = 2;
|
||||||
my $res = PVE::Tools::df($path, $timeout);
|
my $res = PVE::Tools::df($path, $timeout);
|
||||||
@ -1166,7 +1166,7 @@ sub activate_storage {
|
|||||||
|
|
||||||
my $path = $scfg->{path};
|
my $path = $scfg->{path};
|
||||||
|
|
||||||
die "storage definintion has no path\n" if !$path;
|
die "storage definition has no path\n" if !$path;
|
||||||
|
|
||||||
# this path test may hang indefinitely on unresponsive mounts
|
# this path test may hang indefinitely on unresponsive mounts
|
||||||
my $timeout = 2;
|
my $timeout = 2;
|
||||||
|
|||||||
@ -293,7 +293,7 @@ sub alloc_image {
|
|||||||
|
|
||||||
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
die "unsupported format '$fmt'" if $fmt ne 'raw';
|
||||||
|
|
||||||
die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
|
die "illegal name '$name' - should be 'vm-$vmid-*'\n"
|
||||||
if $name && $name !~ m/^vm-$vmid-/;
|
if $name && $name !~ m/^vm-$vmid-/;
|
||||||
|
|
||||||
my $volname = $name;
|
my $volname = $name;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ my $vtype_subdirs = PVE::Storage::Plugin::get_vtype_subdirs();
|
|||||||
my $tests = [
|
my $tests = [
|
||||||
# failed matches
|
# failed matches
|
||||||
[ $scfg_with_path, 'none', "unknown vtype 'none'\n" ],
|
[ $scfg_with_path, 'none', "unknown vtype 'none'\n" ],
|
||||||
[ {}, 'iso', "storage definintion has no path\n" ],
|
[ {}, 'iso', "storage definition has no path\n" ],
|
||||||
];
|
];
|
||||||
|
|
||||||
# creates additional positive tests
|
# creates additional positive tests
|
||||||
|
|||||||
Reference in New Issue
Block a user