From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id EEDC71FF0AA for ; Tue, 17 Nov 2026 10:22:03 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 73B9B215CB; Tue, 17 Nov 2026 10:22:00 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 17 Nov 2026 10:21:56 +0100 Message-Id: From: "Daniel Kral" To: "Dominik Rusovac" , Subject: Re: [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode X-Mailer: aerc 0.22.0-45-gc30c872fde7b-dirty References: <20261113152620.2662417-1-d.rusovac@proxmox.com> <20261113152620.2662417-2-d.rusovac@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794907316556 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.558 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: NUB3HIRRD5XKVMWDWR5OM67PNMJ2WLEY X-Message-ID-Hash: NUB3HIRRD5XKVMWDWR5OM67PNMJ2WLEY X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Thomas Skinner X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue Nov 17, 2026 at 9:58 AM CET, Dominik Rusovac wrote: > thx for the review, will send a v5 > > On Mon Nov 16, 2026 at 12:57 PM CET, Daniel Kral wrote: >> On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: >> >> A PVE::Tools::run_command() would be enough here AFAICT, because if it >> fails then we just fail here as well and forward the error message. >> > > I will write a dedicated wrapper that queues a request to enable/disable > maintenance=20 Hm, run_command() might be a better separation here. If a wrapper would be called here directly, then essentially pvedaemon would write to HA state, but if the ha-manager CLI is run here then just HA-specific code writes to the HA state. No hard feelings though, would just like to minimize the HA stack's API surface to read-only helpers for external packages while letting any writes go through API/CLI paths from the HA stack directly.