diff --git a/src/cli_alloc_osd.cpp b/src/cli_alloc_osd.cpp index 90b51106..58dc60a4 100644 --- a/src/cli_alloc_osd.cpp +++ b/src/cli_alloc_osd.cpp @@ -124,7 +124,7 @@ std::function 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()) diff --git a/src/etcd_state_client.cpp b/src/etcd_state_client.cpp index 9db1251c..7180cce0 100644 --- a/src/etcd_state_client.cpp +++ b/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('/');