From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id A020A1FF142 for ; Mon, 02 Mar 2026 16:15:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8865F25A; Mon, 2 Mar 2026 16:16:49 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 02 Mar 2026 16:16:45 +0100 Message-Id: Subject: Re: [PATCH manager v1 1/1] api: startall: print info message if guest is skipped due to no onboot From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Fiona Ebner" , =?utf-8?q?Michael_K=C3=B6ppl?= , X-Mailer: aerc 0.21.0 References: <20260302134929.136399-1-m.koeppl@proxmox.com> <8e184210-3442-4040-9423-48184aeb95be@proxmox.com> <2c43947b-aa2d-40e0-96c9-b8f8567527ea@proxmox.com> In-Reply-To: <2c43947b-aa2d-40e0-96c9-b8f8567527ea@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772464582685 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.172 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.012 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 1.188 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.93 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: GLM4EXKCOD55KUS3ASI7X2G6T2ELG4N2 X-Message-ID-Hash: GLM4EXKCOD55KUS3ASI7X2G6T2ELG4N2 X-MailFrom: m.koeppl@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 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 Mon Mar 2, 2026 at 4:10 PM CET, Fiona Ebner wrote: > Am 02.03.26 um 4:02 PM schrieb Michael K=C3=B6ppl: >> On Mon Mar 2, 2026 at 3:09 PM CET, Fiona Ebner wrote: >>> Am 02.03.26 um 2:49 PM schrieb Michael K=C3=B6ppl: >>>> The documentation states that startall only starts guests with >>>> onboot=3D1 by default, and that this behavior can be overridden using = the >>>> force parameter. However, when startall is invoked via the pvenode CLI >>>> without the force parameter, the Bulk Start task silently completes wi= th >>>> just "TASK OK", giving no indication of why certain VMs were not start= ed. >>>> The added informational message addresses this by clearly communicatin= g >>>> to users why those VMs were skipped. >>>> >>>> Signed-off-by: Michael K=C3=B6ppl >>>> --- >>>> I encountered this while using startall and stopall myself and while >>>> RTFM would indeed have helped, I still felt that an informational >>>> message would improve the user's experience, especially since stopall >>>> will stop all VMs without force=3D1, whereas startall requires the for= ce >>>> param. I only added the informational messages and did not change any >>>> behavior because the behavior makes sense to me after thinking about >>>> it some more. >>>> >>>> PVE/API2/Nodes.pm | 7 ++++++- >>>> 1 file changed, 6 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm >>>> index 5bd6fe492..3faa1e800 100644 >>>> --- a/PVE/API2/Nodes.pm >>>> +++ b/PVE/API2/Nodes.pm >>>> @@ -1969,7 +1969,12 @@ sub get_start_stop_list { >>>> my $resList =3D {}; >>>> foreach my $vmid (keys %$vmlist) { >>>> my $conf =3D $vmlist->{$vmid}->{conf}; >>>> - next if $autostart && !$conf->{onboot}; >>>> + >>>> + if ($autostart && !$conf->{onboot}) { >>>> + print >>>> + "skipping $vmid because 'onboot' is not set in guest = config, use 'force' parameter to override\n"; >>>> + next; >>>> + } >>> >>> I think printing it for every single guest without onboot is too much, >>> because there could be thousands of such guests. One message at the >>> beginning of the API call should be enough. >>> >>=20 >> Yeah, I wasn't entirely sure printing it for every guest is a good idea >> either. Thanks for the feedback. I guess something like "skipping guests >> without 'onboot' set in guest config, use 'force' param to override" >> once at the beginning? >>=20 >>> And I feel like the invocation from pve-guests.service should not have >>> such a message end up in syslog to avoid confusion. It uses >>> /usr/bin/pvesh --nooutput create /nodes/localhost/startall >>> so maybe this is already the case. Could you check? >>> >>=20 >> I agree, but --nooutput does not seem to prevent this. I'll have a look >> how this can be avoided. > > If it can't easily be avoided, I guess the message is best formulated in > a purely descriptive way, i.e. without "use to override", and rather > just mention that it's because force is not set. Ack, thanks! I'll send a v2.