all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage
@ 2026-03-02 13:45 Lukas Sichert
  2026-03-02 13:45 ` [PATCH proxmox 1/4] fix #7315: generate: add support for new certificate variant Lukas Sichert
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Lukas Sichert @ 2026-03-02 13:45 UTC (permalink / raw)
  To: pdm-devel; +Cc: Lukas Sichert

Currently, the calculation for total storage in a cluster with shared
storage is incorrect. For every node to which the shared storage is
configured, the storage capacity is added to the total capacity.

In order to perform the correct calculations, the pve backend must
provide a "shared" flag to the datacenter-manager backend. The PVE
backend already responds with the flag. However, since the flag is not
described in the JSON schema, the Rust backend cannot extract the value.

Currently, regenerating the Rust files, where the schema is described
for the Rust backend, is not possible because a new Windows certificate
has been added. 

Threfore in this series:
  -the generate script is updated,
  -the generated files after running 'make refresh' are updated,
  -the shared flag is added to the json schema,
  -the storage calculations are corrected using the shared flag.

proxmox:
Lukas Sichert (2):
  fix #7315: generate: add support for new certificate variant
  fix #7315: run make refresh

 pve-api-types/generate.pl            |  1 +
 pve-api-types/pve-api.json           | 85 ++++++++++++++++++++-----
 pve-api-types/src/generated/types.rs | 92 +++++++++++++++++++++++++---
 3 files changed, 154 insertions(+), 24 deletions(-)

pve-manager:
Lukas Sichert (1):
  fix #7315: add missing storage flag to json Schema

 PVE/API2/Cluster.pm | 5 +++++
 1 file changed, 5 insertions(+)


proxmox-datacenter-manager:
Lukas Sichert (1):
  fix #7135: ui: correct calculations for shared storages

 cli/client/src/resources.rs       | 1 +
 lib/pdm-api-types/src/resource.rs | 2 ++
 server/src/api/resources.rs       | 1 +
 server/src/views/tests.rs         | 1 +
 ui/src/pve/remote_overview.rs     | 9 +++++++--
 5 files changed, 12 insertions(+), 2 deletions(-)


-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH proxmox 1/4] fix #7315: generate: add support for new certificate variant
  2026-03-02 13:45 [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage Lukas Sichert
@ 2026-03-02 13:45 ` Lukas Sichert
  2026-03-02 13:45 ` SPAM: [PATCH proxmox 2/4] fix #7315: run make refresh Lukas Sichert
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Lukas Sichert @ 2026-03-02 13:45 UTC (permalink / raw)
  To: pdm-devel; +Cc: Lukas Sichert

Since the last time the types.rs has been generated a new Windows
certificate variant was added. As no mapping for this variant to a rust
enum exits, generating the types fails.

To add support for this variant, add a mapping from the Perl definition
to a Rust enum.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 pve-api-types/generate.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pve-api-types/generate.pl b/pve-api-types/generate.pl
index e5c5d051..ba732e9d 100755
--- a/pve-api-types/generate.pl
+++ b/pve-api-types/generate.pl
@@ -94,6 +94,7 @@ Schema2Rust::register_enum_variant('QemuConfigEfidisk0Efitype::2m' => 'Mb2');
 Schema2Rust::register_enum_variant('QemuConfigEfidisk0Efitype::4m' => 'Mb4');
 Schema2Rust::register_enum_variant('QemuConfigEfidisk0MsCert::2011' => 'CA2011');
 Schema2Rust::register_enum_variant('QemuConfigEfidisk0MsCert::2023' => 'CA2023');
+Schema2Rust::register_enum_variant('QemuConfigEfidisk0MsCert::2023w' => 'CA2023w');
 Schema2Rust::register_enum_variant('QemuConfigHugepages::2' => 'Mb2');
 Schema2Rust::register_enum_variant('QemuConfigHugepages::1024' => 'Mb1024');
 Schema2Rust::register_enum_variant('PveQmRngSource::/dev/urandom', => 'DevUrandom');
-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* SPAM: [PATCH proxmox 2/4] fix #7315: run make refresh
  2026-03-02 13:45 [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage Lukas Sichert
  2026-03-02 13:45 ` [PATCH proxmox 1/4] fix #7315: generate: add support for new certificate variant Lukas Sichert
@ 2026-03-02 13:45 ` Lukas Sichert
  2026-03-02 13:45 ` [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema Lukas Sichert
  2026-03-02 13:45 ` [PATCH datacenter-manager 4/4] fix #7135: ui: correct calculations for shared storages Lukas Sichert
  3 siblings, 0 replies; 6+ messages in thread
From: Lukas Sichert @ 2026-03-02 13:45 UTC (permalink / raw)
  To: pdm-devel; +Cc: Lukas Sichert

Update the generated files after running 'make refresh'.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 pve-api-types/pve-api.json           | 85 ++++++++++++++++++++-----
 pve-api-types/src/generated/types.rs | 92 +++++++++++++++++++++++++---
 2 files changed, 153 insertions(+), 24 deletions(-)

diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index 7674a7cb..0ffed956 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -946,6 +946,7 @@
                "Cascadelake-Server-v2",
                "Cascadelake-Server-v4",
                "Cascadelake-Server-v5",
+               "ClearwaterForest",
                "Conroe",
                "Cooperlake",
                "Cooperlake-v2",
@@ -953,16 +954,23 @@
                "coreduo",
                "EPYC",
                "EPYC-Genoa",
+               "EPYC-Genoa-v2",
                "EPYC-IBPB",
                "EPYC-Milan",
                "EPYC-Milan-v2",
+               "EPYC-Milan-v3",
                "EPYC-Rome",
                "EPYC-Rome-v2",
                "EPYC-Rome-v3",
                "EPYC-Rome-v4",
+               "EPYC-Rome-v5",
+               "EPYC-Turin",
                "EPYC-v3",
                "EPYC-v4",
+               "EPYC-v5",
                "GraniteRapids",
+               "GraniteRapids-v2",
+               "GraniteRapids-v3",
                "Haswell",
                "Haswell-IBRS",
                "Haswell-noTSX",
@@ -976,6 +984,7 @@
                "Icelake-Server-v4",
                "Icelake-Server-v5",
                "Icelake-Server-v6",
+               "Icelake-Server-v7",
                "IvyBridge",
                "IvyBridge-IBRS",
                "KnightsMill",
@@ -1000,6 +1009,11 @@
                "SandyBridge-IBRS",
                "SapphireRapids",
                "SapphireRapids-v2",
+               "SapphireRapids-v3",
+               "SapphireRapids-v4",
+               "SierraForest",
+               "SierraForest-v2",
+               "SierraForest-v3",
                "Skylake-Client",
                "Skylake-Client-IBRS",
                "Skylake-Client-noTSX-IBRS",
@@ -7427,7 +7441,7 @@
                                           "type": "string"
                                        },
                                        "max_relocate": {
-                                          "description": "Maximal number of service relocate tries when a service failes to start.",
+                                          "description": "Maximal number of service relocate tries when a service fails to start.",
                                           "optional": 1,
                                           "type": "integer"
                                        },
@@ -7504,7 +7518,7 @@
                                        },
                                        "max_relocate": {
                                           "default": 1,
-                                          "description": "Maximal number of service relocate tries when a service failes to start.",
+                                          "description": "Maximal number of service relocate tries when a service fails to start.",
                                           "minimum": 0,
                                           "optional": 1,
                                           "type": "integer"
@@ -11005,7 +11019,12 @@
                                           "type": "integer"
                                        },
                                        "maxworkers": {
-                                          "alias": "max-workers"
+                                          "default": 4,
+                                          "description": "Defines the maximum number of tasks running concurrently. Deprecated, use 'max-workers' instead.",
+                                          "maximum": 64,
+                                          "minimum": 1,
+                                          "optional": 1,
+                                          "type": "integer"
                                        },
                                        "timeout": {
                                           "description": "Default start timeout in seconds. Only valid for VMs. (default depends on the guest configuration).",
@@ -11067,7 +11086,12 @@
                                           "type": "integer"
                                        },
                                        "maxworkers": {
-                                          "alias": "max-workers"
+                                          "default": 4,
+                                          "description": "Defines the maximum number of tasks running concurrently. Deprecated, use 'max-workers' instead.",
+                                          "maximum": 64,
+                                          "minimum": 1,
+                                          "optional": 1,
+                                          "type": "integer"
                                        },
                                        "timeout": {
                                           "default": 180,
@@ -11124,7 +11148,12 @@
                                           "type": "integer"
                                        },
                                        "maxworkers": {
-                                          "alias": "max-workers"
+                                          "default": 4,
+                                          "description": "Defines the maximum number of tasks running concurrently. Deprecated, use 'max-workers' instead.",
+                                          "maximum": 64,
+                                          "minimum": 1,
+                                          "optional": 1,
+                                          "type": "integer"
                                        },
                                        "statestorage": {
                                           "completion": ("Code")[],
@@ -11190,7 +11219,12 @@
                                           "type": "integer"
                                        },
                                        "maxworkers": {
-                                          "alias": "max-workers"
+                                          "default": 1,
+                                          "description": "Defines the maximum number of tasks running concurrently. Deprecated, use 'max-workers' instead.",
+                                          "maximum": 64,
+                                          "minimum": 1,
+                                          "optional": 1,
+                                          "type": "integer"
                                        },
                                        "online": {
                                           "description": "Enable live migration for VMs and restart migration for CTs.",
@@ -15830,7 +15864,7 @@
                            },
                            "release-lock": {
                               "default": 1,
-                              "description": "When lock-token has been provided and configuration successfully commited, release the lock automatically afterwards",
+                              "description": "When lock-token has been provided and configuration successfully committed, release the lock automatically afterwards",
                               "optional": 1,
                               "type": "boolean"
                            }
@@ -16065,6 +16099,11 @@
                                  "optional": 1,
                                  "type": "string"
                               },
+                              "shared": {
+                                 "description": "Determines if the storage is shared",
+                                 "optional": 1,
+                                 "type": "boolean"
+                              },
                               "status": {
                                  "description": "Resource type dependent status.",
                                  "optional": 1,
@@ -20048,10 +20087,11 @@
                                                    },
                                                    "ms-cert": {
                                                       "default": "2011",
-                                                      "description": "Informational marker indicating the version of the latest Microsof UEFI certificate that has been enrolled by Proxmox VE.",
+                                                      "description": "Informational marker indicating the version of the latest Microsoft UEFI certificate that has been enrolled by Proxmox VE. The value '2023w' means that both the 'Microsoft UEFI CA 2023' and the 'Windows UEFI CA 2023' certificates are included. The value '2023' is deprecated and for compatibility only.",
                                                       "enum": [
                                                          "2011",
-                                                         "2023"
+                                                         "2023",
+                                                         "2023w"
                                                       ],
                                                       "optional": 1,
                                                       "type": "string"
@@ -21341,7 +21381,7 @@
                                                 "description": "Configure the VGA hardware.",
                                                 "format": {
                                                    "clipboard": {
-                                                      "description": "Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Migration with VNC clipboard is not yet supported!",
+                                                      "description": "Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Live migration with a VNC clipboard is not possible with QEMU machine version < 10.1.",
                                                       "enum": [
                                                          "vnc"
                                                       ],
@@ -21672,10 +21712,11 @@
                                                    },
                                                    "ms-cert": {
                                                       "default": "2011",
-                                                      "description": "Informational marker indicating the version of the latest Microsof UEFI certificate that has been enrolled by Proxmox VE.",
+                                                      "description": "Informational marker indicating the version of the latest Microsoft UEFI certificate that has been enrolled by Proxmox VE. The value '2023w' means that both the 'Microsoft UEFI CA 2023' and the 'Windows UEFI CA 2023' certificates are included. The value '2023' is deprecated and for compatibility only.",
                                                       "enum": [
                                                          "2011",
-                                                         "2023"
+                                                         "2023",
+                                                         "2023w"
                                                       ],
                                                       "optional": 1,
                                                       "type": "string"
@@ -24715,13 +24756,13 @@
                                                       "type": "integer"
                                                    },
                                                    "mem": {
-                                                      "description": "Currently used memory in bytes.",
+                                                      "description": "Currently used memory in bytes. Does not take into account kernel same-page merging (KSM). Uses information from ballooning when available.",
                                                       "optional": 1,
                                                       "renderer": "bytes",
                                                       "type": "integer"
                                                    },
                                                    "memhost": {
-                                                      "description": "Current memory usage on the host.",
+                                                      "description": "Current memory usage on the host. Does not take into account kernel same-page merging (KSM).",
                                                       "optional": 1,
                                                       "renderer": "bytes",
                                                       "type": "integer"
@@ -30195,6 +30236,13 @@
                                                       "type": "boolean",
                                                       "verbose_description": "Whether to include the mount point in backups (only used for volume mount points)."
                                                    },
+                                                   "keepattrs": {
+                                                      "default": 0,
+                                                      "description": "Inherit ownership and permissions from the mount point directory.",
+                                                      "optional": 1,
+                                                      "type": "boolean",
+                                                      "verbose_description": "Inherit UID, GID and access mode from the mount point directory, if it exists already."
+                                                   },
                                                    "mountoptions": {
                                                       "description": "Extra mount options for rootfs/mps.",
                                                       "format_description": "opt[;opt...]",
@@ -31816,7 +31864,7 @@
                                                       "type": "string"
                                                    },
                                                    "host-managed": {
-                                                      "description": "Whether this interface's IP configuration should be managed by the host.",
+                                                      "description": "Whether this interface's IP configuration should be managed by the host. When enabled, the host (rather than the container) is responsible for the interface's IP configuration. The container should not run its own DHCP client or network manager on this interface. This is useful for containers that lack an internal network management stack, like many application containers.",
                                                       "optional": 1,
                                                       "type": "boolean"
                                                    },
@@ -48956,6 +49004,7 @@
                                     "properties": {
                                        "name": {
                                           "description": "Package name.",
+                                          "pattern": ("Regex")["(?^:[a-z0-9][-+.a-z0-9:]+)"],
                                           "type": "string"
                                        },
                                        "node": {
@@ -53197,7 +53246,11 @@
                                     "type": "integer"
                                  },
                                  "maxworkers": {
-                                    "alias": "max-workers"
+                                    "description": "Maximal number of parallel migration job. If not set, uses'max_workers' from datacenter.cfg. One of both must be set!Deprecated, use 'max-workers' instead.",
+                                    "maximum": 64,
+                                    "minimum": 1,
+                                    "optional": 1,
+                                    "type": "integer"
                                  },
                                  "node": {
                                     "description": "The cluster node name.",
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index d0d39b59..ca7d7bc3 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -915,6 +915,10 @@ fn test_regex_compilation_4() {
             optional: true,
             type: String,
         },
+        shared: {
+            default: false,
+            optional: true,
+        },
         status: {
             optional: true,
             type: String,
@@ -1077,6 +1081,11 @@ pub struct ClusterResource {
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub sdn: Option<String>,
 
+    /// Determines if the storage is shared
+    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub shared: Option<bool>,
+
     /// Resource type dependent status.
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub status: Option<String>,
@@ -3619,6 +3628,10 @@ fn test_regex_compilation_9() {
             default: false,
             optional: true,
         },
+        keepattrs: {
+            default: false,
+            optional: true,
+        },
         mountoptions: {
             optional: true,
             type: String,
@@ -3667,6 +3680,11 @@ pub struct LxcConfigMp {
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub backup: Option<bool>,
 
+    /// Inherit ownership and permissions from the mount point directory.
+    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub keepattrs: Option<bool>,
+
     /// Extra mount options for rootfs/mps.
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub mountoptions: Option<String>,
@@ -3805,6 +3823,11 @@ pub struct LxcConfigNet {
     pub gw6: Option<String>,
 
     /// Whether this interface's IP configuration should be managed by the host.
+    /// When enabled, the host (rather than the container) is responsible for
+    /// the interface's IP configuration. The container should not run its own
+    /// DHCP client or network manager on this interface. This is useful for
+    /// containers that lack an internal network management stack, like many
+    /// application containers.
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     #[serde(rename = "host-managed")]
@@ -10007,6 +10030,8 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "Cascadelake-Server-v5")]
     /// Cascadelake-Server-v5.
     CascadelakeServerV5,
+    /// ClearwaterForest.
+    ClearwaterForest,
     /// Conroe.
     Conroe,
     /// Cooperlake.
@@ -10026,6 +10051,9 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "EPYC-Genoa")]
     /// EPYC-Genoa.
     EpycGenoa,
+    #[serde(rename = "EPYC-Genoa-v2")]
+    /// EPYC-Genoa-v2.
+    EpycGenoaV2,
     #[serde(rename = "EPYC-IBPB")]
     /// EPYC-IBPB.
     EpycIbpb,
@@ -10035,6 +10063,9 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "EPYC-Milan-v2")]
     /// EPYC-Milan-v2.
     EpycMilanV2,
+    #[serde(rename = "EPYC-Milan-v3")]
+    /// EPYC-Milan-v3.
+    EpycMilanV3,
     #[serde(rename = "EPYC-Rome")]
     /// EPYC-Rome.
     EpycRome,
@@ -10047,14 +10078,29 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "EPYC-Rome-v4")]
     /// EPYC-Rome-v4.
     EpycRomeV4,
+    #[serde(rename = "EPYC-Rome-v5")]
+    /// EPYC-Rome-v5.
+    EpycRomeV5,
+    #[serde(rename = "EPYC-Turin")]
+    /// EPYC-Turin.
+    EpycTurin,
     #[serde(rename = "EPYC-v3")]
     /// EPYC-v3.
     EpycV3,
     #[serde(rename = "EPYC-v4")]
     /// EPYC-v4.
     EpycV4,
+    #[serde(rename = "EPYC-v5")]
+    /// EPYC-v5.
+    EpycV5,
     /// GraniteRapids.
     GraniteRapids,
+    #[serde(rename = "GraniteRapids-v2")]
+    /// GraniteRapids-v2.
+    GraniteRapidsV2,
+    #[serde(rename = "GraniteRapids-v3")]
+    /// GraniteRapids-v3.
+    GraniteRapidsV3,
     /// Haswell.
     Haswell,
     #[serde(rename = "Haswell-IBRS")]
@@ -10093,6 +10139,9 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "Icelake-Server-v6")]
     /// Icelake-Server-v6.
     IcelakeServerV6,
+    #[serde(rename = "Icelake-Server-v7")]
+    /// Icelake-Server-v7.
+    IcelakeServerV7,
     /// IvyBridge.
     IvyBridge,
     #[serde(rename = "IvyBridge-IBRS")]
@@ -10160,6 +10209,20 @@ pub enum PveVmCpuConfReportedModel {
     #[serde(rename = "SapphireRapids-v2")]
     /// SapphireRapids-v2.
     SapphireRapidsV2,
+    #[serde(rename = "SapphireRapids-v3")]
+    /// SapphireRapids-v3.
+    SapphireRapidsV3,
+    #[serde(rename = "SapphireRapids-v4")]
+    /// SapphireRapids-v4.
+    SapphireRapidsV4,
+    /// SierraForest.
+    SierraForest,
+    #[serde(rename = "SierraForest-v2")]
+    /// SierraForest-v2.
+    SierraForestV2,
+    #[serde(rename = "SierraForest-v3")]
+    /// SierraForest-v3.
+    SierraForestV3,
     #[serde(rename = "Skylake-Client")]
     /// Skylake-Client.
     SkylakeClient,
@@ -11483,8 +11546,11 @@ serde_plain::derive_display_from_serialize!(QemuConfigEfidisk0Efitype);
 serde_plain::derive_fromstr_from_deserialize!(QemuConfigEfidisk0Efitype);
 
 #[api]
-/// Informational marker indicating the version of the latest Microsof UEFI
-/// certificate that has been enrolled by Proxmox VE.
+/// Informational marker indicating the version of the latest Microsoft UEFI
+/// certificate that has been enrolled by Proxmox VE. The value '2023w' means
+/// that both the 'Microsoft UEFI CA 2023' and the 'Windows UEFI CA 2023'
+/// certificates are included. The value '2023' is deprecated and for
+/// compatibility only.
 #[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
 pub enum QemuConfigEfidisk0MsCert {
     #[serde(rename = "2011")]
@@ -11494,6 +11560,9 @@ pub enum QemuConfigEfidisk0MsCert {
     #[serde(rename = "2023")]
     /// 2023.
     CA2023,
+    #[serde(rename = "2023w")]
+    /// 2023w.
+    CA2023w,
     /// Unknown variants for forward compatibility.
     #[serde(untagged)]
     UnknownEnumValue(FixedString),
@@ -13109,7 +13178,8 @@ pub struct QemuConfigVga {
 
 #[api]
 /// Enable a specific clipboard. If not set, depending on the display type the
-/// SPICE one will be added. Migration with VNC clipboard is not yet supported!
+/// SPICE one will be added. Live migration with a VNC clipboard is not possible
+/// with QEMU machine version < 10.1.
 #[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
 pub enum QemuConfigVgaClipboard {
     #[serde(rename = "vnc")]
@@ -15244,12 +15314,15 @@ pub struct QemuStatus {
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub maxmem: Option<i64>,
 
-    /// Currently used memory in bytes.
+    /// Currently used memory in bytes. Does not take into account kernel
+    /// same-page merging (KSM). Uses information from ballooning when
+    /// available.
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub mem: Option<i64>,
 
-    /// Current memory usage on the host.
+    /// Current memory usage on the host. Does not take into account kernel
+    /// same-page merging (KSM).
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub memhost: Option<i64>,
@@ -15397,7 +15470,7 @@ pub struct ReloadSdn {
     pub lock_token: Option<String>,
 
     /// When lock-token has been provided and configuration successfully
-    /// commited, release the lock automatically afterwards
+    /// committed, release the lock automatically afterwards
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     #[serde(rename = "release-lock")]
@@ -22170,12 +22243,15 @@ pub struct VmEntry {
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub maxmem: Option<i64>,
 
-    /// Currently used memory in bytes.
+    /// Currently used memory in bytes. Does not take into account kernel
+    /// same-page merging (KSM). Uses information from ballooning when
+    /// available.
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub mem: Option<i64>,
 
-    /// Current memory usage on the host.
+    /// Current memory usage on the host. Does not take into account kernel
+    /// same-page merging (KSM).
     #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
     #[serde(default, skip_serializing_if = "Option::is_none")]
     pub memhost: Option<i64>,
-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema
  2026-03-02 13:45 [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage Lukas Sichert
  2026-03-02 13:45 ` [PATCH proxmox 1/4] fix #7315: generate: add support for new certificate variant Lukas Sichert
  2026-03-02 13:45 ` SPAM: [PATCH proxmox 2/4] fix #7315: run make refresh Lukas Sichert
@ 2026-03-02 13:45 ` Lukas Sichert
  2026-03-02 13:51   ` Dominik Rusovac
  2026-03-02 13:45 ` [PATCH datacenter-manager 4/4] fix #7135: ui: correct calculations for shared storages Lukas Sichert
  3 siblings, 1 reply; 6+ messages in thread
From: Lukas Sichert @ 2026-03-02 13:45 UTC (permalink / raw)
  To: pdm-devel; +Cc: Lukas Sichert

The response to the API-call '/cluster/resources' includes a shared flag
for storages, that are also seen by other nodes in the cluster. But as
this is not listed in the schema, the proxmox-datacenter backend
cannot access the value.

Add the missing `shared` boolean field to the schema definition of the
API handler so the value is properly exposed.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 PVE/API2/Cluster.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index d6003a7d..062abaee 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -428,6 +428,11 @@ __PACKAGE__->register_method({
                     format => 'pve-storage-content-list',
                     optional => 1,
                 },
+                shared => {
+                    description => "Determines if the storage is shared",
+                    type => 'boolean',
+                    optional => 1,
+                },
                 plugintype => {
                     description => "More specific type, if available.",
                     type => 'string',
-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH datacenter-manager 4/4] fix #7135: ui: correct calculations for shared storages
  2026-03-02 13:45 [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage Lukas Sichert
                   ` (2 preceding siblings ...)
  2026-03-02 13:45 ` [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema Lukas Sichert
@ 2026-03-02 13:45 ` Lukas Sichert
  3 siblings, 0 replies; 6+ messages in thread
From: Lukas Sichert @ 2026-03-02 13:45 UTC (permalink / raw)
  To: pdm-devel; +Cc: Lukas Sichert

Currently the storage calculation for a cluster in the
datacenter-manager is incorrect when a shared storage is involved. Each
node reports the shared storage separately, causing it to be counted
multiple times in the total capacity.

To be able to handle shared storages correctly, introduce a `shared`
field to PveStorageResource and parse it from the API-Resonse. After
that use the field and the storage name to only count the shared storage
once. This also aligns pdm storage calculation with the one in the
pve-frontend.

Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
 cli/client/src/resources.rs       | 1 +
 lib/pdm-api-types/src/resource.rs | 2 ++
 server/src/api/resources.rs       | 1 +
 server/src/views/tests.rs         | 1 +
 ui/src/pve/remote_overview.rs     | 9 +++++++--
 5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/cli/client/src/resources.rs b/cli/client/src/resources.rs
index 9b91a4b..74763bf 100644
--- a/cli/client/src/resources.rs
+++ b/cli/client/src/resources.rs
@@ -85,6 +85,7 @@ impl fmt::Display for PrintResource<resource::PveStorageResource> {
             disk,
             maxdisk,
             id: _,
+            shared: _,
             ref storage,
             ref node,
             ref status,
diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
index 93f8bd2..b68777c 100644
--- a/lib/pdm-api-types/src/resource.rs
+++ b/lib/pdm-api-types/src/resource.rs
@@ -355,6 +355,8 @@ pub struct PveStorageResource {
     pub node: String,
     /// Storage status
     pub status: String,
+    /// shared flag
+    pub shared: bool,
 }
 
 #[api]
diff --git a/server/src/api/resources.rs b/server/src/api/resources.rs
index 5d5fe2c..a966109 100644
--- a/server/src/api/resources.rs
+++ b/server/src/api/resources.rs
@@ -1135,6 +1135,7 @@ pub(super) fn map_pve_storage(
             storage: resource.storage.unwrap_or_default(),
             node: resource.node.unwrap_or_default(),
             status: resource.status.unwrap_or_default(),
+            shared: resource.shared.unwrap_or_default(),
         }),
         _ => None,
     }
diff --git a/server/src/views/tests.rs b/server/src/views/tests.rs
index 9f49620..b8c63b4 100644
--- a/server/src/views/tests.rs
+++ b/server/src/views/tests.rs
@@ -14,6 +14,7 @@ fn make_storage_resource(remote: &str, node: &str, storage_name: &str) -> Resour
         storage: storage_name.into(),
         node: node.into(),
         status: "available".into(),
+        shared: false,
     })
 }
 
diff --git a/ui/src/pve/remote_overview.rs b/ui/src/pve/remote_overview.rs
index e452131..5b63539 100644
--- a/ui/src/pve/remote_overview.rs
+++ b/ui/src/pve/remote_overview.rs
@@ -1,3 +1,4 @@
+use std::collections::HashSet;
 use std::rc::Rc;
 
 use proxmox_yew_comp::{Status, StatusRow};
@@ -72,12 +73,16 @@ impl RemotePanelComp {
         let mut nodes = 0;
         let mut cpu_usage = 0.0;
         let mut level = None;
+        let mut seen_shared_storages: HashSet<String> = HashSet::new();
 
         for res in ctx.props().resources.iter() {
             match res {
                 PveResource::Storage(store) => {
-                    storage += store.disk;
-                    max_storage += store.maxdisk;
+                    let storage_name = store.storage.clone();
+                    if seen_shared_storages.insert(storage_name) {
+                        storage += store.disk;
+                        max_storage += store.maxdisk;
+                    }
                 }
                 PveResource::Qemu(qemu) => {
                     guests += 1;
-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema
  2026-03-02 13:45 ` [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema Lukas Sichert
@ 2026-03-02 13:51   ` Dominik Rusovac
  0 siblings, 0 replies; 6+ messages in thread
From: Dominik Rusovac @ 2026-03-02 13:51 UTC (permalink / raw)
  To: Lukas Sichert, pdm-devel

I think it should be "Determines whether the storage is shared"




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-02 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-02 13:45 [PATCH api-types/manager/datacenter-manager 0/4] fix #7315: datacenter-manager: fix wrong calculation of total storage Lukas Sichert
2026-03-02 13:45 ` [PATCH proxmox 1/4] fix #7315: generate: add support for new certificate variant Lukas Sichert
2026-03-02 13:45 ` SPAM: [PATCH proxmox 2/4] fix #7315: run make refresh Lukas Sichert
2026-03-02 13:45 ` [PATCH manager 3/4] fix #7315: types: add missing storage flag to json schema Lukas Sichert
2026-03-02 13:51   ` Dominik Rusovac
2026-03-02 13:45 ` [PATCH datacenter-manager 4/4] fix #7135: ui: correct calculations for shared storages Lukas Sichert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal