Re: RGWUserInfo encode/decode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 13, 2015 at 11:50 AM, Pete Zaitcev <zaitcev@xxxxxxxxxx> wrote:
> Hi,
>
> I stumpbled upon a code like this in src/rgw/rgw_common.h:
>
> struct RGWUserInfo {
>   map<string, RGWAccessKey> swift_keys;  // not one swift_key, a whole map
>   void decode(bufferlist::iterator& bl) {
>     string swift_key;
>     if (struct_v >= 4) ::decode(swift_key, bl);
>     // that's all, folks
>   }
> }
>
> Looks like swift_key is never set when RGWUserInfo is deserialized.
> It looks like a bug on the surface, but nobody cared thus far, so maybe
> it's not actually a problem.

It's a backward compatibility issue, we used to keep a single key as a
string, later changed it into a map (decoded later). What I'd expect
to see here is populating the map with the string we read here (if not
empty), however, I'm pretty sure no one will hit this issue as it'd
require a *real* old structure (circa 2009) that no one would have.
>
> Do you happen to recall where this is used... Does radosgw-admin send
> a whole RGWUserInfo to RADOS, ever? It appears to go the other way, in
> show_user_info(), but strangely enough the tool shows Swift keys just fine.
>

Whenever we read user's info (e.g., when authenticating user) this is
getting decoded.

Yehuda
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux