[pve-devel] [PATCH v4 pve-container 1/5] Ensure that container startup warnings are displayed if startup fails.
Fiona Ebner
f.ebner at proxmox.com
Mon Nov 17 16:15:11 CET 2025
Am 17.11.25 um 12:30 PM schrieb Robert Obkircher:
>
> On 11/13/25 17:14, Fiona Ebner wrote:
>> Am 13.11.25 um 4:04 PM schrieb Robert Obkircher:
>>> During container startup, warnings are written to a file, which is
>>> later logged to the RESTEnvironment. This should also happen in the
>>> presence of errors, so move it outside the eval block.
>>>
>>> Signed-off-by: Robert Obkircher <r.obkircher at proxmox.com>
>>> ---
>>> src/PVE/LXC.pm | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
>>> index 89ccb54..44e20bc 100644
>>> --- a/src/PVE/LXC.pm
>>> +++ b/src/PVE/LXC.pm
>>> @@ -2976,10 +2976,12 @@ sub vm_start {
>>> # if debug is requested, print the log it also when the
>>> start succeeded
>>> print_ct_stderr_log($vmid) if $is_debug;
>> Should the same be done for the error log here?
> This is only for debug output in case of success. The preceding call
> already prints the log if it dies.
Oh, right, it's usually starting the monitor that fails.
Without '--debug', there's just not much to work with:
[I] root at pve9a1 ~# pct start 101
sync_wait: 34 An error occurred in another process (expected sequence
number 7)
__lxc_start: 2127 Failed to spawn container "101"
startup for container '101' failed
Maybe we could print a line to tell users that there is '--debug' after
such a failure to get more info? Or we might want to set a log level for
the non-debug start-up ('-l ERROR' or '-l WARN'). From a quick test,
this doesn't seem to behave as expected though, i.e. the log with '-l
DEBUG' has more lines of level ERROR than the log with '-l ERROR', which
is strange :S and would need to be looked into.
But it's independent of this series :)
More information about the pve-devel
mailing list