On Tue, Jul 16, 2024 at 06:09:17PM GMT, Thomas Lamprecht wrote:
> Am 15/07/2024 um 16:31 schrieb Christoph Heiss:
> > With that in mind it definitely could come in handy. Or maybe a separate
> > object "disks"/"other-disks"/etc. entirely? So as not have to filter out
> > the (non-)bootdisks again o
These have been around since 2012 - suffice to say they're not needed
anymore.
Signed-off-by: Max Carrara
---
src/PVE/Storage/Plugin.pm | 19 ---
1 file changed, 19 deletions(-)
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 6444390..3219f1f 100644
---
Signed-off-by: Max Carrara
---
src/PVE/Storage/BTRFSPlugin.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 42815cb..a503404 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlu
Signed-off-by: Max Carrara
---
src/PVE/Storage/CephFSPlugin.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PVE/Storage/CephFSPlugin.pm b/src/PVE/Storage/CephFSPlugin.pm
index 8aad518..98d1ba6 100644
--- a/src/PVE/Storage/CephFSPlugin.pm
+++ b/src/PVE/Storage/Ceph
RFC: Refactor / Cleanup of Storage Plugins
==
I know this looks like a lot of patches and a lot to read up front, but
the changes I want to discuss here are not that intricate. I will
elaborate more in the paragraphs below, which should make it all much
more
Because the directory plugin's subroutines are frequently used by
other plugins, it's best to factor these helpers into the common
module. This is a first step in making other plugins not depend on the
directory plugin anymore.
Simultaneously this commit also introduces the `Common::Path` module,
Signed-off-by: Max Carrara
---
src/PVE/API2/Storage/Config.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/PVE/API2/Storage/Config.pm b/src/PVE/API2/Storage/Config.pm
index e04b6ab..56124fe 100755
--- a/src/PVE/API2/Storage/Config.pm
+++ b/src/PVE/API2/Storage/Config.pm
@@ -9,7 +9,6 @@
Signed-off-by: Max Carrara
---
src/PVE/API2/Disks/LVM.pm | 12 ++--
src/PVE/API2/Disks/LVMThin.pm | 10 +-
src/PVE/API2/Storage/Scan.pm | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/PVE/API2/Disks/LVM.pm b/src/PVE/API2/Disks/LVM.pm
index 3c5b
Signed-off-by: Max Carrara
---
src/PVE/Storage/LvmThinPlugin.pm | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm
index 4b23623..480cc78 100644
--- a/src/PVE/Storage/LvmThinPlugin.pm
+++ b/src/
Signed-off-by: Max Carrara
---
src/PVE/Storage/CIFSPlugin.pm | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
index 2184471..18dc017 100644
--- a/src/PVE/Storage/CIFSPlugin.pm
+++ b/src/PVE/Storage/CIFSP
Signed-off-by: Max Carrara
---
src/PVE/API2/Storage/Config.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/PVE/API2/Storage/Config.pm b/src/PVE/API2/Storage/Config.pm
index 56124fe..648b0f9 100755
--- a/src/PVE/API2/Storage/Config.pm
+++ b/src/PVE/API2/Storage/Config.pm
@@ -8,7 +8,6 @@
This module's purpose is to provide shared functions, constants, etc.
for storage plugins and storage-related operations.
It also contains the `get_deprecation_warning` subroutine that makes
it easier to warn developers and/or plugin authors that a subroutine
will be removed in the future.
Signed
with the "new" sub in Common::LVM.
Signed-off-by: Max Carrara
---
src/PVE/API2/Disks/LVMThin.pm | 6 +++---
src/PVE/API2/Storage/Scan.pm | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/PVE/API2/Disks/LVMThin.pm b/src/PVE/API2/Disks/LVMThin.pm
index bd46478..142a062
with the recently moved ones from `Common` and `Common::Path`.
Signed-off-by: Max Carrara
---
src/PVE/Storage/BTRFSPlugin.pm | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index a503404..10fd441 100644
---
A plugin should only do "plugin stuff" and not provide helper subs
that other modules also use, so move those helpers into a separate
module and document them.
This new `Common::LVM` module is a submodule of `Common` (as its name
implies) as that logically groups LVM-related subroutines together.
This creates new helper subroutines in the `Common` module in order
to remove other plugins' dependency on `DirPlugin` in the future.
The methods are changed to call these helpers instead.
Simultaneously, emit a `warn`ing if deprecated methods / functions are
being used instead of just relying on
and deprecate the original helper, emitting a warning if it's used.
Also document the moved subroutine.
Signed-off-by: Max Carrara
---
src/PVE/Storage/Common/LVM.pm| 49
src/PVE/Storage/LvmThinPlugin.pm | 30 +++
2 files changed, 60 insertions
in order to be more in line with our style guide [0]. This also
renames some parameters for clarity.
[0]: https://pve.proxmox.com/wiki/Perl_Style_Guide
Signed-off-by: Max Carrara
---
src/PVE/Storage/Common/LVM.pm | 80 +--
1 file changed, 57 insertions(+), 23 del
As with the BTRFS plugin, the dependency on the directory plugin is
removed by using the helpers from the `Common` module instead of
calling the dir plugin's methods.
Deprecation warnings for the `get_volume_notes` and
`update_volume_notes` methods are also added.
Signed-off-by: Max Carrara
---
As with the BTRFS plugin, the dependency on the directory plugin is
removed by using the helpers from the `Common` module instead of
calling the dir plugin's methods.
Deprecation warnings for the `get_volume_notes` and
`update_volume_notes` methods are also added.
Signed-off-by: Max Carrara
---
Whether a directory-based storage's path is valid or not should not be
solely decided within a method of the directoy plugin, but should
instead be available to other plugins, possibly third-party plugins,
as well.
Therefore, factor that check into three different helper functions in
`Common::Path
This commit removes the BTRFS plugin's dependency on the directory
plugin. This is done by replacing calls to the dir plugin's methods
with the corresponding helper subroutines from the `Common` module
instead.
Furthermore, the methods `check_config` and `status` both get their
own implementations
As with the BTRFS plugin, the dependency on the directory plugin is
removed by using the helpers from the `Common` module instead of
calling the dir plugin's methods.
Deprecation warnings for the `get_volume_notes` and
`update_volume_notes` methods are also added.
Signed-off-by: Max Carrara
---
This subroutine does not appear to be used in any of our Perl code, so
remove it.
Signed-off-by: Max Carrara
---
src/PVE/Storage/ESXiPlugin.pm | 18 --
1 file changed, 18 deletions(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index d4b6afc..2bab7
The methods `get_manifest`, `esxi_mount` and `esxi_unmount` are made
private in order to prevent them from accidentally becoming part of
the plugin's public interface in the future.
Similar to the BTRFS changes, adapt the call sites accordingly. This
means that calls like
my $manifest = $class-
.. and also use a regular sub definition for `get_active_server` in
order to avoid the sub prefix deref syntax when calling it.
Signed-off-by: Max Carrara
---
src/PVE/Storage/GlusterfsPlugin.pm | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/PVE/Storage/G
The methods `btrfs_cmd` and `btrfs_get_subvol_id` are made private in
order to prevent them from accidentally becoming part of the plugin's
public interface in the future.
The call sites are adapted accordingly, due to the methods not being
accessible by reference via `$class` anymore. Therefore,
Because the `iscsi_discovery` subroutine is used by `PVE::Storage`
directly, move it and all other helpers independent from the plugin
into the new `PVE::Storage::Common::ISCSI` module. As the name
suggests, this new module collects ISCSI-related functionalities and
utils.
Due to the `iscsi_discov
Signed-off-by: Max Carrara
---
src/PVE/Storage/ESXiPlugin.pm | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index a35693d..d4b6afc 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiP
So it's not just an anonymous sub assigned to a reference, but a
"proper" private subroutine instead. Also update its only call site
correspondingly.
Signed-off-by: Max Carrara
---
src/PVE/Storage/LVMPlugin.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Storag
in order to prevent it from being used in other places or third-party
plugins.
Signed-off-by: Max Carrara
---
src/PVE/Storage/ISCSIDirectPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ISCSIDirectPlugin.pm
b/src/PVE/Storage/ISCSIDirectPlugin.pm
inde
Instead of assigning anonymous subs to a reference, make them "proper"
private subs instead. Thus, signatures like
my $foo = sub { ... };
are changed to
my sub foo { ... }
and their call sites are updated correspondingly.
The remaining helpers are also made private, because they're not use
Because this subroutine is not really a valuable helper for the common
ISCSI module, keep it inside the plugin and make it private instead.
Signed-off-by: Max Carrara
---
src/PVE/Storage/ISCSIPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ISCSIPlugi
Signed-off-by: Max Carrara
---
src/PVE/Storage/Common/ZFS.pm| 93 +++-
src/PVE/Storage/ZFSPoolPlugin.pm | 45 +++-
2 files changed, 99 insertions(+), 39 deletions(-)
diff --git a/src/PVE/Storage/Common/ZFS.pm b/src/PVE/Storage/Common/ZFS.pm
index 8b096
.. so that it is not just an anonymous sub assigned to a reference,
but a "proper" private subroutine instead. Also update its call sites
correspondingly.
Signed-off-by: Max Carrara
---
src/PVE/Storage/LvmThinPlugin.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src
The `nfs_is_mounted` and `nfs_mount` subroutines are not part of any
(official) public interface / API, nor are they used anywhere in our
code, so make them private to prevent haphazard use.
Signed-off-by: Max Carrara
---
src/PVE/Storage/NFSPlugin.pm | 4 ++--
1 file changed, 2 insertions(+), 2
Like the LVM and ISCSI modules, this module is meant to provide
commonly used ZFS helpers, so that ZFS-related functionality may be
shared more easily among plugins. Moreover, this module also ought to
help to reduce the inter-dependency of our own ZFS plugins, while
simultaneously making ZFS utili
In order to separate the invocation of ZFS CLI utlis from the plugin,
the `zfs_request` method is refactored into a helper subroutine and
placed in the common ZFS module.
The signature is changed, removing the `$class` parameter. The body
remains the same, so no behaviour is actually altered.
The
Signed-off-by: Maximiliano Sandoval
---
www/manager6/window/CephInstall.js | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/manager6/window/CephInstall.js
b/www/manager6/window/CephInstall.js
index 432c6719..32605129 100644
--- a/www/manager6/window/CephInstall.js
Signed-off-by: Maximiliano Sandoval
---
www/manager6/window/GuestImport.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/window/GuestImport.js
b/www/manager6/window/GuestImport.js
index 4bedc211..2577ece2 100644
--- a/www/manager6/window/GuestImport.js
+++ b/ww
Signed-off-by: Maximiliano Sandoval
---
bin/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/Makefile b/bin/Makefile
index 180a91b5..82d5c633 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -68,7 +68,7 @@ pve7to8.1:
printf ".TH PVE7TO8 1\n.SH NAME\npve7to8
Signed-off-by: Maximiliano Sandoval
---
PVE/API2/Ceph/OSD.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index 2893456a..5e39eed7 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -323,7 +323,7 @@ __PACKAGE__->regis
Signed-off-by: Maximiliano Sandoval
---
PVE/API2/Nodes.pm | 2 +-
PVE/APLInfo.pm | 2 +-
PVE/CLI/pveceph.pm | 2 +-
PVE/Service/pvestatd.pm | 2 +-
PVE/Status/Plugin.pm| 2 +-
www/manager6/Pars
On Tue, Jul 16, 2024 at 06:07:10PM GMT, Thomas Lamprecht wrote:
> Am 16/07/2024 um 11:31 schrieb Christoph Heiss:
> > Between the number of CPUs and the actual label, a space was missing -
> > resulting in an inconsistency vs. the "CPU usage" column.
> >
> > Also, fix a rather nonsensical check for
Between the number of CPUs and the actual label, a space was missing -
resulting in an inconsistency vs. the "CPU usage" column.
Signed-off-by: Christoph Heiss
---
www/manager6/Utils.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Uti
Comparing with Proxmox.Utils.render_cpu() seems just a slight oversight
in the condition. Fix it by aligning it with how it is done in
Proxmox.Utils.render_cpu() for consistency.
Signed-off-by: Christoph Heiss
---
www/manager6/Utils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Should be marked [v2] obviously, with v1 here [0].
Sorry for the noise, noticed it only after hitting send.
[0] https://lists.proxmox.com/pipermail/pve-devel/2024-July/064681.html
On Wed, Jul 17, 2024 at 02:49:50PM GMT, Christoph Heiss wrote:
> Comparing with Proxmox.Utils.render_cpu() seems jus
Signed-off-by: Maximiliano Sandoval
---
datacenter.cfg.5-opts.adoc | 2 +-
ha-manager.1-synopsis.adoc | 6 +++---
ha-manager.adoc| 2 +-
ha-resources-opts.adoc | 2 +-
notifications.adoc | 12 ++--
pct.1-synopsis.adoc| 6 +++---
pct.conf.5-opts.adoc
Updating the NIC of a VM when the following conditions were met:
* VM is turned off
* NIC is on a bridge that uses automatic dhcp
* Leave bridge unchanged
led to duplicate IPAM entries for the same network device.
This is due to the fact that the add_next_free_cidr always ran on
applying pending
Currently custom mappings cannot be edited, due to them having no VMID
value. The VMID parameter was always sent by the frontend to the
update call - even if it was empty - leading to validation failure on
the backend. Fix this by only sending the vmid parameter when it is
actually set.
Signed-off
When disabling the nftables firewall again, there is a race condition
where the nftables ruleset never gets flushed and persists after
disabling.
The nftables firewall update loop does a noop when the force disable
file exists. It only flushes the ruleset when nftables is disabled in
the configura
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> This target type allows users to perform HTTP requests to arbitrary
> third party (notification) services, for instance
> ntfy.sh/Discord/Slack.
>
> The configuration for these endpoints allows one to freely configure
> the URL, HTTP Method
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> Sending as an RFC because I don't want this merged yet; that being
> said, the feature should be mostly finished at this point, I'd
> appreciate any reviews and feedback.
>
> This series adds support for webhook notification targets to PVE
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> All in all pretty similar to other endpoint APIs.
> One thing worth noting is how secrets are handled. We never ever
> return the values of previously stored secrets in get_endpoint(s)
> calls, but only a list of the names of all secrets. T
Missed a `cargo fmt` here as well ;)
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> Signed-off-by: Lukas Wagner
> ---
> common/src/notify.rs | 63
> 1 file changed, 63 insertions(+)
>
> diff --git a/common/src/notify.rs b/common/src/notify
And missed `cargo fmt` here too ;)
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> This allows us to drop the impl of that function on the perl side.
>
> Signed-off-by: Lukas Wagner
> ---
> common/src/notify.rs | 9 +
> 1 file changed, 9 insertions(+)
>
> diff --git a/common/s
On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote:
> These just call the API implementation via the perl-rs bindings.
>
> Signed-off-by: Lukas Wagner
> ---
> PVE/API2/Cluster/Notifications.pm | 263 +-
> 1 file changed, 262 insertions(+), 1 deletion(-)
>
> diff -
Am 17/07/2024 um 11:39 schrieb Max Carrara:
> These have been around since 2012 - suffice to say they're not needed
> anymore.
That's really not a good argument though? Just because nobody checked
those closely for a long time it does not mean that they became
magically irrelevant.
Look, it can b
--- Begin Message ---
I have setup the new functionality according to the instructions from
[1] and [2], and tested various hashed and non-hashed passwords. The
only potential improvement would be to check if the provided hash is
valid because passing an invalid hash makes it rather impossible to
59 matches
Mail list logo