Skip to content

Commit

Permalink
ceph: re-open rados connection inside worker process
Browse files Browse the repository at this point in the history
  • Loading branch information
maurerdietmar committed Jan 21, 2014
1 parent addd0cb commit 707a6c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PVE/API2/Ceph.pm
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ __PACKAGE__->register_method ({
my $worker = sub {
my $upid = shift;

$rados = PVE::RADOS->new(); # reopen

$rados->mon_command({ prefix => "mon remove", name => $monid, format => 'plain' });

eval { &$ceph_service_cmd('stop', $monsection); };
Expand Down Expand Up @@ -1286,7 +1288,6 @@ __PACKAGE__->register_method ({
my $bindata = $rados->mon_command({ prefix => 'auth get client.bootstrap-osd', format => 'plain' });
PVE::Tools::file_set_contents($ceph_bootstrap_osd_keyring, $bindata);
};


my $worker = sub {
my $upid = shift;
Expand Down Expand Up @@ -1372,6 +1373,8 @@ __PACKAGE__->register_method ({
my $worker = sub {
my $upid = shift;

$rados = PVE::RADOS->new(); # reopen

print "destroy OSD $osdsection\n";

eval { &$ceph_service_cmd('stop', $osdsection); };
Expand Down

0 comments on commit 707a6c6

Please sign in to comment.