CID 731943 (#1 of 1): Uninitialized scalar variable (UNINIT)
At (5): Using uninitialized element of array "buf" when calling "pwrite(int, void const *, size_t, __off64_t)".
Signed-off-by: Sage Weil <sage@inktank.com>
Using part of a block device doesn't make much sense. This makes the
common case, where you partition a disk to act as several journals,
easier to configure.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Fixes: #3114
Instead of having a few hard coded attrs that are
special cased, make it more generic. This allows supporting
more header fields, such as cache-control, expires, etc.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
When we do a check_disk_state() on an object that is not complete,
we need to also update etag, content_type, owner, and display_name.
Otherwise, we'd end up missing that from the bucket index. In
practice this only affects swift, as only there we're actually
looking at that info (when listing a container).
Fixes: #3234
Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This reverts commit c65ffe9f7f.
oneiric, where the doc gitbuilder runs, doesn't have the
--system-site-packages option; let's get docs back and sort this out
offline. (virtualenv 1.6.4-0ubuntu1 on oneiric, 1.7.1.2-1 on precise)
Removed special casing of virtual bucket handling
and just prepending it to the URI. So now virtual
bucket also affects admin and swift* protocols.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We didn't update buffer size according to read data.
Also, didn't update the total obj_size (was doing it only
for the second chunk being put, but for chunked input that
only had a single piece we ended up with zero obj_size). Also
remove assertion that second call to handle_data() means that
ofs > chunk size. This isn't true for chunked input.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The formatter might not have been initialized, as we
abort early (e.g., when protocol handler wasn't found)
so we need to initialize it in order to dump error
status.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We can now specify which set of apis the gateway supports. Also,
passed resource should not start with a slash, we prepend that
automatically.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
User info now holds caps map, which contains a mapping between
a freestyle cap name string to permissions bitfield (read, write).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Use json formatter by default for new usage stuff. Also
make it configurable.
We use the JSON formatter for the swift auth.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
New RESTMgr* classes to handle a specific uri entry
point. Actions are handled by RGWHandler*.
Changing init order, newly instantiated RGWHandler
for every op.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Don't translate RESTful operations into a more meaningful
callback name. The handlers themselves should do that
translation. This way we can later register different
handlers with different meanings for the operations.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The mds gets an open session request and immediately sets the session
stale timer. If logging the session and sending the reply takes longer
than the timer, the client sees a stale session message before getting
the open session reply. This fix resets the session stale timer on
completion of the mds logging operation to reduce the likelihood of
the session getting marked stale before the client can receive the
open session reply and start sending renewcaps messages.
We reset the session timer for renewcaps and force_open_sessions right
before returning the SESSION_OPEN reply to the client. This avoids stale
sessions in the cases where the mds is highly loaded and the session_open
reply back to the client is delayed.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
This lets a $osd_data/journal symlink point to
/dev/disk/by-partuuid/UUID and the osd will not attempt to start until
that disk is available.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
This way, it won't need -i ID and it won't access the osd_data_dir.
That makes it useful for locating the right osd to use with an
external journal partition.
Signed-off-by: Tommi Virtanen <tv@inktank.com>