Loading include/daemon/relocation/config_manager.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ read_hosts_file(); void do_relocation(hostmap_t hosts); void reload_distribution_configuration(); } // namespace gkfs::relocation #endif // GEKKOFS_CONFIG_MANAGER_HPP No newline at end of file src/daemon/relocation/config_manager.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -115,10 +115,15 @@ calculate_random_slicing() { dist->addDisks(&disks); } // Trigger all the hosts of the old configuration since they will need // to be sinding away their data. trigger_hosts = rs_hosts; } else { // Trigger all (!) the hosts: // - those of the old configuration as they need to send away their data // - the new hosts, because they need to reload the new rs configuration // Start with all the host of the new configuration trigger_hosts = rsdist.get_hosts_map(); // add the "old" hosts, ignoring existing keys trigger_hosts.insert(rs_hosts.begin(), rs_hosts.end()); } else { // no resconfig exists, create from scratch GKFS_DATA->spdlogger()->info( "{}() No existing random slicing configuration found, " "creating from scratch with {} hosts.", Loading Loading @@ -216,4 +221,13 @@ do_relocation(hostmap_t hosts) { margo_finalize(mid); } void reload_distribution_configuration() { auto dist_impl = make_shared<VDRIVE::DistRandSlice>(); dist_impl->from_file(GKFS_DATA->hosts_file() + ".rsconfig"); auto distributor = make_shared<gkfs::rpc::RandomSlicingDistributor>(dist_impl); GKFS_DATA->distributor(distributor); } } // namespace gkfs::relocation No newline at end of file src/daemon/relocation/transmitter.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -41,14 +41,8 @@ namespace gkfs::relocation { int transmit_metadata_and_data(gkfs::rpc::host_t localhost) { // TODO(dauer) return error code on error { // TODO(dauer) move this to somewhere appropriate auto dist_impl = make_shared<VDRIVE::DistRandSlice>(); dist_impl->from_file(GKFS_DATA->hosts_file() + ".rsconfig"); auto distributor = make_shared<gkfs::rpc::RandomSlicingDistributor>(dist_impl); GKFS_DATA->distributor(distributor); } reload_distribution_configuration(); auto mid = RPC_DATA->client_rpc_mid(); auto relocate_metadata_id = Loading Loading
include/daemon/relocation/config_manager.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ read_hosts_file(); void do_relocation(hostmap_t hosts); void reload_distribution_configuration(); } // namespace gkfs::relocation #endif // GEKKOFS_CONFIG_MANAGER_HPP No newline at end of file
src/daemon/relocation/config_manager.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -115,10 +115,15 @@ calculate_random_slicing() { dist->addDisks(&disks); } // Trigger all the hosts of the old configuration since they will need // to be sinding away their data. trigger_hosts = rs_hosts; } else { // Trigger all (!) the hosts: // - those of the old configuration as they need to send away their data // - the new hosts, because they need to reload the new rs configuration // Start with all the host of the new configuration trigger_hosts = rsdist.get_hosts_map(); // add the "old" hosts, ignoring existing keys trigger_hosts.insert(rs_hosts.begin(), rs_hosts.end()); } else { // no resconfig exists, create from scratch GKFS_DATA->spdlogger()->info( "{}() No existing random slicing configuration found, " "creating from scratch with {} hosts.", Loading Loading @@ -216,4 +221,13 @@ do_relocation(hostmap_t hosts) { margo_finalize(mid); } void reload_distribution_configuration() { auto dist_impl = make_shared<VDRIVE::DistRandSlice>(); dist_impl->from_file(GKFS_DATA->hosts_file() + ".rsconfig"); auto distributor = make_shared<gkfs::rpc::RandomSlicingDistributor>(dist_impl); GKFS_DATA->distributor(distributor); } } // namespace gkfs::relocation No newline at end of file
src/daemon/relocation/transmitter.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -41,14 +41,8 @@ namespace gkfs::relocation { int transmit_metadata_and_data(gkfs::rpc::host_t localhost) { // TODO(dauer) return error code on error { // TODO(dauer) move this to somewhere appropriate auto dist_impl = make_shared<VDRIVE::DistRandSlice>(); dist_impl->from_file(GKFS_DATA->hosts_file() + ".rsconfig"); auto distributor = make_shared<gkfs::rpc::RandomSlicingDistributor>(dist_impl); GKFS_DATA->distributor(distributor); } reload_distribution_configuration(); auto mid = RPC_DATA->client_rpc_mid(); auto relocate_metadata_id = Loading