Browse Source

Fix capture of out in alloc_osd

test-assert
Vitaliy Filippov 9 months ago
parent
commit
300d507026
  1. 2
      src/cli_alloc_osd.cpp
  2. 1
      src/etcd_state_client.cpp

2
src/cli_alloc_osd.cpp

@ -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();
auto alloc_osd = new alloc_osd_t();
alloc_osd->parent = this;
return [alloc_osd, &out]()
return [alloc_osd, out]()
{
alloc_osd->loop();
if (alloc_osd->is_done())

1
src/etcd_state_client.cpp

@ -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");
exit(1);
}
// FIXME: Prefer local etcd
std::string etcd_address = etcd_addresses[rand() % etcd_addresses.size()];
std::string etcd_api_path;
int pos = etcd_address.find('/');

Loading…
Cancel
Save