[pve-devel] how does errfunc in run_command exactly work?

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Fri May 31 09:27:28 CEST 2013


Am 31.05.2013 08:39, schrieb Dietmar Maurer:
>> So the content or errmsg => is irrelevant? 
> 
> No, that used used as prefix: 	    die "$errmsg: $lastLineFromStderr";

OK thanks. Why i was asking. Ceph has switched a lot of output to stderr
when switching to cuttlefish. So for example right now the RBDPLugin
does not show any progress on snapshot rollback.

Is it correct to fix it this way:
    run_command($cmd, errmsg => "rbd snapshot $volname to $snap' error",
errfunc => sub { print STDERR shift; });

Greets,
Stefan



More information about the pve-devel mailing list