Fix capture of out in alloc_osd
This commit is contained in:
@@ -124,7 +124,7 @@ std::function<bool(void)> cli_tool_t::start_alloc_osd(json11::Json cfg, uint64_t
|
|||||||
json11::Json::array cmd = cfg["command"].array_items();
|
json11::Json::array cmd = cfg["command"].array_items();
|
||||||
auto alloc_osd = new alloc_osd_t();
|
auto alloc_osd = new alloc_osd_t();
|
||||||
alloc_osd->parent = this;
|
alloc_osd->parent = this;
|
||||||
return [alloc_osd, &out]()
|
return [alloc_osd, out]()
|
||||||
{
|
{
|
||||||
alloc_osd->loop();
|
alloc_osd->loop();
|
||||||
if (alloc_osd->is_done())
|
if (alloc_osd->is_done())
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ void etcd_state_client_t::etcd_call(std::string api, json11::Json payload, int t
|
|||||||
fprintf(stderr, "etcd_address is missing in Vitastor configuration\n");
|
fprintf(stderr, "etcd_address is missing in Vitastor configuration\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
// FIXME: Prefer local etcd
|
||||||
std::string etcd_address = etcd_addresses[rand() % etcd_addresses.size()];
|
std::string etcd_address = etcd_addresses[rand() % etcd_addresses.size()];
|
||||||
std::string etcd_api_path;
|
std::string etcd_api_path;
|
||||||
int pos = etcd_address.find('/');
|
int pos = etcd_address.find('/');
|
||||||
|
|||||||
Reference in New Issue
Block a user