all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie
@ 2025-08-11 14:18 Stefan Hanreich
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stefan Hanreich @ 2025-08-11 14:18 UTC (permalink / raw)
  To: pdm-devel

Some additional properties got introduced for existing structs, which prevented
PDM from building on Trixie. Also, on startup the privileged API would
immediately fail setting the owner of the priv socket, so fix that as well.

proxmox-datacenter-manager:

Stefan Hanreich (3):
  qemu: set with_conntrack_state when remote migrating
  api: privileged: fix fchownat call
  lxc: qemu: set new status properties

 server/src/api/pve/qemu.rs                          |  1 +
 server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
 ui/src/pve/lxc.rs                                   |  5 +++++
 ui/src/pve/qemu.rs                                  |  7 +++++++
 4 files changed, 16 insertions(+), 10 deletions(-)


Summary over all repositories:
  4 files changed, 16 insertions(+), 10 deletions(-)

-- 
Generated by git-murpp 0.8.0

_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating
  2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
@ 2025-08-11 14:18 ` Stefan Hanreich
  2025-08-12  8:02   ` [pdm-devel] applied: " Dominik Csapak
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call Stefan Hanreich
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Stefan Hanreich @ 2025-08-11 14:18 UTC (permalink / raw)
  To: pdm-devel

The migrate endpoint got an additional parameter, so it needs to be
set when invoking the API endpoint from PVE. Since remote migration
currently doesn't support migrating conntrack status, default to
None.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 server/src/api/pve/qemu.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/src/api/pve/qemu.rs b/server/src/api/pve/qemu.rs
index dea0550..5a41a69 100644
--- a/server/src/api/pve/qemu.rs
+++ b/server/src/api/pve/qemu.rs
@@ -373,6 +373,7 @@ pub async fn qemu_migrate(
         target,
         targetstorage: target_storage,
         with_local_disks,
+        with_conntrack_state: None,
     };
     let upid = pve.migrate_qemu(&node, vmid, params).await?;
 
-- 
2.47.2


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call
  2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
@ 2025-08-11 14:18 ` Stefan Hanreich
  2025-08-12  7:31   ` Lukas Wagner
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties Stefan Hanreich
  2025-08-12  7:08 ` [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Dominik Csapak
  3 siblings, 1 reply; 10+ messages in thread
From: Stefan Hanreich @ 2025-08-11 14:18 UTC (permalink / raw)
  To: pdm-devel

When starting the privileged API, the server would fail with the
following error messages:

Error: unable to set ownership for api socket '/run/proxmox-datacenter-manager/priv.sock' - EINVAL: Invalid argument

chown(2) only supports the AT_SYMLINK_NOFOLLOW, not AT_SYMLINK_FOLLOW
so this was probably a oversight. Pass empty flags to fchownat
instead.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/server/src/bin/proxmox-datacenter-privileged-api.rs b/server/src/bin/proxmox-datacenter-privileged-api.rs
index 66033eb..bd2c6dd 100644
--- a/server/src/bin/proxmox-datacenter-privileged-api.rs
+++ b/server/src/bin/proxmox-datacenter-privileged-api.rs
@@ -161,16 +161,9 @@ async fn run() -> Result<(), Error> {
                 format_err!("unable to set mode for api socket '{sockpath:?}' - {err}")
             })?;
 
-            fchownat(
-                None,
-                sockpath,
-                None,
-                Some(api_user.gid),
-                AtFlags::AT_SYMLINK_FOLLOW,
-            )
-            .map_err(|err| {
-                format_err!("unable to set ownership for api socket '{sockpath}' - {err}")
-            })?;
+            fchownat(None, sockpath, None, Some(api_user.gid), AtFlags::empty()).map_err(
+                |err| format_err!("unable to set ownership for api socket '{sockpath}' - {err}"),
+            )?;
 
             log::info!("created socket, notifying readiness to systemd and starting API server");
 
-- 
2.47.2


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties
  2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call Stefan Hanreich
@ 2025-08-11 14:18 ` Stefan Hanreich
  2025-08-12  8:02   ` [pdm-devel] applied: " Dominik Csapak
  2025-08-12  7:08 ` [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Dominik Csapak
  3 siblings, 1 reply; 10+ messages in thread
From: Stefan Hanreich @ 2025-08-11 14:18 UTC (permalink / raw)
  To: pdm-devel

PVE 9 introduced some additional properties to LxcStatus and
QemuStatus. Default the new properties to None in the UI when showing
a dummy state while loading.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 ui/src/pve/lxc.rs  | 5 +++++
 ui/src/pve/qemu.rs | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/ui/src/pve/lxc.rs b/ui/src/pve/lxc.rs
index c43ac9e..07c8876 100644
--- a/ui/src/pve/lxc.rs
+++ b/ui/src/pve/lxc.rs
@@ -267,6 +267,11 @@ impl yew::Component for LxcanelComp {
                 name: None,
                 netin: None,
                 netout: None,
+                pressurecpusome: None,
+                pressurememoryfull: None,
+                pressurememorysome: None,
+                pressureiosome: None,
+                pressureiofull: None,
                 status: serde_json::from_value(serde_json::Value::String(
                     props.info.status.clone(),
                 ))
diff --git a/ui/src/pve/qemu.rs b/ui/src/pve/qemu.rs
index 57e5e74..48266e5 100644
--- a/ui/src/pve/qemu.rs
+++ b/ui/src/pve/qemu.rs
@@ -267,10 +267,17 @@ impl yew::Component for QemuPanelComp {
                 maxdisk: Some(props.info.maxdisk as i64),
                 maxmem: Some(props.info.maxmem as i64),
                 mem: Some(props.info.mem as i64),
+                memhost: None,
                 name: None,
                 netin: None,
                 netout: None,
                 pid: None,
+                pressurecpusome: None,
+                pressurecpufull: None,
+                pressurememoryfull: None,
+                pressurememorysome: None,
+                pressureiosome: None,
+                pressureiofull: None,
                 qmpstatus: None,
                 running_machine: None,
                 running_qemu: None,
-- 
2.47.2


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* Re: [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie
  2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
                   ` (2 preceding siblings ...)
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties Stefan Hanreich
@ 2025-08-12  7:08 ` Dominik Csapak
  2025-08-12  7:32   ` Lukas Wagner
  3 siblings, 1 reply; 10+ messages in thread
From: Dominik Csapak @ 2025-08-12  7:08 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Stefan Hanreich

all 3 patches look good to me (and I would have arrived pretty much at 
the same changes)

so consider this

Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>

(can also apply them myself if someone else gives their r-b/t-b)

On 8/11/25 16:18, Stefan Hanreich wrote:
> Some additional properties got introduced for existing structs, which prevented
> PDM from building on Trixie. Also, on startup the privileged API would
> immediately fail setting the owner of the priv socket, so fix that as well.
> 
> proxmox-datacenter-manager:
> 
> Stefan Hanreich (3):
>    qemu: set with_conntrack_state when remote migrating
>    api: privileged: fix fchownat call
>    lxc: qemu: set new status properties
> 
>   server/src/api/pve/qemu.rs                          |  1 +
>   server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
>   ui/src/pve/lxc.rs                                   |  5 +++++
>   ui/src/pve/qemu.rs                                  |  7 +++++++
>   4 files changed, 16 insertions(+), 10 deletions(-)
> 
> 
> Summary over all repositories:
>    4 files changed, 16 insertions(+), 10 deletions(-)
> 



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* Re: [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call Stefan Hanreich
@ 2025-08-12  7:31   ` Lukas Wagner
  2025-08-12  8:03     ` Dominik Csapak
  0 siblings, 1 reply; 10+ messages in thread
From: Lukas Wagner @ 2025-08-12  7:31 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Stefan Hanreich

On Mon Aug 11, 2025 at 4:18 PM CEST, Stefan Hanreich wrote:
> When starting the privileged API, the server would fail with the
> following error messages:
>
> Error: unable to set ownership for api socket '/run/proxmox-datacenter-manager/priv.sock' - EINVAL: Invalid argument
>
> chown(2) only supports the AT_SYMLINK_NOFOLLOW, not AT_SYMLINK_FOLLOW
> so this was probably a oversight. Pass empty flags to fchownat
> instead.
>
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
>  server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/server/src/bin/proxmox-datacenter-privileged-api.rs b/server/src/bin/proxmox-datacenter-privileged-api.rs
> index 66033eb..bd2c6dd 100644
> --- a/server/src/bin/proxmox-datacenter-privileged-api.rs
> +++ b/server/src/bin/proxmox-datacenter-privileged-api.rs
> @@ -161,16 +161,9 @@ async fn run() -> Result<(), Error> {
>                  format_err!("unable to set mode for api socket '{sockpath:?}' - {err}")
>              })?;
>  
> -            fchownat(
> -                None,
> -                sockpath,
> -                None,
> -                Some(api_user.gid),
> -                AtFlags::AT_SYMLINK_FOLLOW,
> -            )
> -            .map_err(|err| {
> -                format_err!("unable to set ownership for api socket '{sockpath}' - {err}")
> -            })?;
> +            fchownat(None, sockpath, None, Some(api_user.gid), AtFlags::empty()).map_err(
> +                |err| format_err!("unable to set ownership for api socket '{sockpath}' - {err}"),
> +            )?;
>  
>              log::info!("created socket, notifying readiness to systemd and starting API server");
>  

For what it's worth, I already sent a similar patch that was already
applied by Thomas, but I guess he did not push the changes.

My patch used AT_SYMLINK_NOFOLLOW instead of passing no flags, but since
the socket is not and probably will never be a symlink, it should not
matter.

https://lore.proxmox.com/pdm-devel/20250807123712.218439-1-l.wagner@proxmox.com/T/#t



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* Re: [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie
  2025-08-12  7:08 ` [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Dominik Csapak
@ 2025-08-12  7:32   ` Lukas Wagner
  0 siblings, 0 replies; 10+ messages in thread
From: Lukas Wagner @ 2025-08-12  7:32 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Dominik Csapak

On Tue Aug 12, 2025 at 9:08 AM CEST, Dominik Csapak wrote:
> all 3 patches look good to me (and I would have arrived pretty much at 
> the same changes)
>
> so consider this
>
> Tested-by: Dominik Csapak <d.csapak@proxmox.com>
> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
>
> (can also apply them myself if someone else gives their r-b/t-b)

Looks good to me, feel free to apply them.

Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] applied: [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
@ 2025-08-12  8:02   ` Dominik Csapak
  0 siblings, 0 replies; 10+ messages in thread
From: Dominik Csapak @ 2025-08-12  8:02 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Stefan Hanreich



On 8/11/25 16:18, Stefan Hanreich wrote:
> The migrate endpoint got an additional parameter, so it needs to be
> set when invoking the API endpoint from PVE. Since remote migration
> currently doesn't support migrating conntrack status, default to
> None.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
>   server/src/api/pve/qemu.rs | 1 +
>   1 file changed, 1 insertion(+)
> 
>

applied, thanks!


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] applied: [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties
  2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties Stefan Hanreich
@ 2025-08-12  8:02   ` Dominik Csapak
  0 siblings, 0 replies; 10+ messages in thread
From: Dominik Csapak @ 2025-08-12  8:02 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Stefan Hanreich



On 8/11/25 16:18, Stefan Hanreich wrote:
> PVE 9 introduced some additional properties to LxcStatus and
> QemuStatus. Default the new properties to None in the UI when showing
> a dummy state while loading.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
>   ui/src/pve/lxc.rs  | 5 +++++
>   ui/src/pve/qemu.rs | 7 +++++++
>   2 files changed, 12 insertions(+)
> 
>

applied, thanks!


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* Re: [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call
  2025-08-12  7:31   ` Lukas Wagner
@ 2025-08-12  8:03     ` Dominik Csapak
  0 siblings, 0 replies; 10+ messages in thread
From: Dominik Csapak @ 2025-08-12  8:03 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Lukas Wagner,
	Stefan Hanreich



On 8/12/25 09:31, Lukas Wagner wrote:
> On Mon Aug 11, 2025 at 4:18 PM CEST, Stefan Hanreich wrote:
>> When starting the privileged API, the server would fail with the
>> following error messages:
>>
>> Error: unable to set ownership for api socket '/run/proxmox-datacenter-manager/priv.sock' - EINVAL: Invalid argument
>>
>> chown(2) only supports the AT_SYMLINK_NOFOLLOW, not AT_SYMLINK_FOLLOW
>> so this was probably a oversight. Pass empty flags to fchownat
>> instead.
>>
>> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
>> ---
>>   server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
>>   1 file changed, 3 insertions(+), 10 deletions(-)
>>
>> diff --git a/server/src/bin/proxmox-datacenter-privileged-api.rs b/server/src/bin/proxmox-datacenter-privileged-api.rs
>> index 66033eb..bd2c6dd 100644
>> --- a/server/src/bin/proxmox-datacenter-privileged-api.rs
>> +++ b/server/src/bin/proxmox-datacenter-privileged-api.rs
>> @@ -161,16 +161,9 @@ async fn run() -> Result<(), Error> {
>>                   format_err!("unable to set mode for api socket '{sockpath:?}' - {err}")
>>               })?;
>>   
>> -            fchownat(
>> -                None,
>> -                sockpath,
>> -                None,
>> -                Some(api_user.gid),
>> -                AtFlags::AT_SYMLINK_FOLLOW,
>> -            )
>> -            .map_err(|err| {
>> -                format_err!("unable to set ownership for api socket '{sockpath}' - {err}")
>> -            })?;
>> +            fchownat(None, sockpath, None, Some(api_user.gid), AtFlags::empty()).map_err(
>> +                |err| format_err!("unable to set ownership for api socket '{sockpath}' - {err}"),
>> +            )?;
>>   
>>               log::info!("created socket, notifying readiness to systemd and starting API server");
>>   
> 
> For what it's worth, I already sent a similar patch that was already
> applied by Thomas, but I guess he did not push the changes.
> 
> My patch used AT_SYMLINK_NOFOLLOW instead of passing no flags, but since
> the socket is not and probably will never be a symlink, it should not
> matter.
> 
> https://lore.proxmox.com/pdm-devel/20250807123712.218439-1-l.wagner@proxmox.com/T/#t
> 
> 
> 
for that reason i refrained from applying this one for now, don't want
to create git conflicts with thomas branch maybe...




_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

end of thread, other threads:[~2025-08-12  8:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
2025-08-12  8:02   ` [pdm-devel] applied: " Dominik Csapak
2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call Stefan Hanreich
2025-08-12  7:31   ` Lukas Wagner
2025-08-12  8:03     ` Dominik Csapak
2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties Stefan Hanreich
2025-08-12  8:02   ` [pdm-devel] applied: " Dominik Csapak
2025-08-12  7:08 ` [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Dominik Csapak
2025-08-12  7:32   ` Lukas Wagner

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