Commit 5468b95b authored by Dietmar Maurer's avatar Dietmar Maurer

fix osd remove

parent f18317d7
...@@ -1159,7 +1159,7 @@ __PACKAGE__->register_method ({ ...@@ -1159,7 +1159,7 @@ __PACKAGE__->register_method ({
'--', $param->{dev}]); '--', $param->{dev}]);
}; };
return $rpcenv->fork_worker('cephcreateods', $param->{dev}, $authuser, $worker); return $rpcenv->fork_worker('cephcreateosd', $param->{dev}, $authuser, $worker);
}}); }});
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
...@@ -1211,18 +1211,18 @@ __PACKAGE__->register_method ({ ...@@ -1211,18 +1211,18 @@ __PACKAGE__->register_method ({
die "osd is still runnung (up == 1)\n" if $osdstat->{up}; die "osd is still runnung (up == 1)\n" if $osdstat->{up};
my $osdsection = "osd.$osdid"; my $osdsection = "osd.$osdid";
my $worker = sub { my $worker = sub {
my $upid = shift; my $upid = shift;
print "destroy OSD $param->{osdid}\n"; print "destroy OSD $osdsection\n";
eval { &$ceph_service_cmd('stop', $osdsection); }; eval { &$ceph_service_cmd('stop', $osdsection); };
warn $@ if $@; warn $@ if $@;
print "Remove $osdsection from the CRUSH map\n"; print "Remove $osdsection from the CRUSH map\n";
&$run_ceph_cmd(['osd', 'crush', 'remove', $osdid]); &$run_ceph_cmd(['osd', 'crush', 'remove', $osdsection]);
print "Remove the $osdsection authentication key.\n"; print "Remove the $osdsection authentication key.\n";
&$run_ceph_cmd(['auth', 'del', $osdsection]); &$run_ceph_cmd(['auth', 'del', $osdsection]);
...@@ -1231,7 +1231,7 @@ __PACKAGE__->register_method ({ ...@@ -1231,7 +1231,7 @@ __PACKAGE__->register_method ({
&$run_ceph_cmd(['osd', 'rm', $osdid]); &$run_ceph_cmd(['osd', 'rm', $osdid]);
}; };
return $rpcenv->fork_worker('cephdestroyods', $osdsection, $authuser, $worker); return $rpcenv->fork_worker('cephdestroyosd', $osdsection, $authuser, $worker);
}}); }});
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment