expiration += duration;
}
+ // make all addrs of type legacy, because v2 clients speak v2 or v1,
+ // even depending on which OSD they are talking to, and the type
+ // isn't what uniquely identifies them. also, storing a v1 addr
+ // here means that old clients who get this locker_info won't see an
+ // old "msgr2:" prefix.
+ inst.addr.set_type(entity_addr_t::TYPE_LEGACY);
+
struct locker_info_t info(expiration, inst.addr, description);
linfo.lockers[id] = info;
f->dump_string("description", info.description);
f->dump_string("cookie", id.cookie);
f->dump_stream("expiration") << info.expiration;
- f->dump_stream("addr") << info.addr;
+ f->dump_string("addr", info.addr.get_legacy_str());
f->close_section();
}
f->close_section();
void locker_info_t::dump(Formatter *f) const
{
f->dump_stream("expiration") << expiration;
- f->dump_stream("addr") << addr;
+ f->dump_string("addr", addr.get_legacy_str());
f->dump_string("description", description);
}