[pve-devel] RBDPlugin.pm: ceph ls

Dietmar Maurer dietmar at proxmox.com
Fri Jun 15 10:34:08 CEST 2012


> Am 15.06.2012 10:08, schrieb Dietmar Maurer:
> >> when an rbd pool from ceph is empty the rbd_ls command fails. cause
> >> the command to run exits with error code 1 and prints to STDERR "pool
> >> kvmpool doesn't contain rbd images"
> >
> > I guess that is an rbd_ls error - so its better to fix that tool instead?
> 
> So you mean that the ceph devs should change their tool?

Yes. I see no reason why an ls return an error code if a pool is empty?

> >> Where i can i find a documentation to run_command?
> >
> > source code is in: pve-common/data/PVE/Tools.pm
> I read that already but could you give a hint how to prevent PVE from
> throwing an error if STDERR contains a specific string?

exec {
  run_comand(..., errmsg => 'MARKER');
};
my $err = $@;

if ($err =~ m/^MARKER:.*specific string/) ...







More information about the pve-devel mailing list