]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agoceph-volume: Using --readonly for {vg|pv|lv}s commands 21519/head
Erwan Velu [Fri, 13 Apr 2018 08:16:44 +0000 (10:16 +0200)]
ceph-volume: Using --readonly for {vg|pv|lv}s commands

The actual code is detecting {vg|pv|lv}s by running the usual {vg|pv|lv}s commands.
Those calls expect lvmetad to be aware of the actual state of them.
This works actually pretty well in most of the cases.

When ceph-volume is run from a container,
this code also works from the container itself but don't on the host.

On the host side, running {vg|pv|lv}s commands reports nothing,
making ceph-volume reporting "No valid Ceph devices found"
The root cause is lvmetad not receiving the udev notification and so,
{vg|pv|lv}s commands reports the 'known' state instead of the 'real' state.

This is a major issue as it means that it exists cases or maybe races where
ceph-volume reports "No valid Ceph devices found" while the disk
actually have some Ceph data & metadata on them.
This could be interpreted like disks are free/available while they are not.
This will mislead users or configuration tools trying to understand the
current state of a node.

In July 2015, as per https://www.redhat.com/archives/lvm-devel/2015-July/msg00086.html,
a new option called "--readonly" have been added to lvm2.
One of the most interesting part of it is : "disable using lvmetad so VGs are read from disk"

In our case, that feature is really interesting as it means that
everytime ceph-volume calls a {vg|pv|lv}s command, it will read the
metadata from the disks instead of considering the lvmetad status.

This patch change all the {vg|pv|lv}s call to use --readonly.
It solves the bug exposed here and doesn't affect the traditional use-case.
The main benefit of this patch is to avoid a false report of a disk not having metadata.

(cherry picked from commit 7be00cd19297ec80b4a629e2fc1e79c64205402c)
Fixes: https://tracker.ceph.com/issues/23693
Signed-off-by: Erwan Velu <erwan@redhat.com>
7 years agoMerge pull request #21426 from ivancich/wip-fix-existing-mclock-cost-luminous
Eric Ivancich [Wed, 18 Apr 2018 14:16:41 +0000 (10:16 -0400)]
Merge pull request #21426 from ivancich/wip-fix-existing-mclock-cost-luminous

osd: remove cost from mclock op queues; cost not handled well in dmcl…

7 years agoMerge pull request #21397 from dzafman/wip-23654
David Zafman [Wed, 18 Apr 2018 00:29:12 +0000 (17:29 -0700)]
Merge pull request #21397 from dzafman/wip-23654

luminous: Special scrub handling of hinfo_key errors

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoosd: Change shard digests to hex like object info digests 21397/head
David Zafman [Fri, 13 Apr 2018 22:01:52 +0000 (15:01 -0700)]
osd: Change shard digests to hex like object info digests

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 22ddc6da5fd03e65a7baf96748a8893cc258d977)

7 years agotest: Luminous backport specific changes
David Zafman [Wed, 11 Apr 2018 15:43:56 +0000 (08:43 -0700)]
test: Luminous backport specific changes

osd-scrub-repair.sh:
    Remove legacy_snaps and redirect_target to keep test more in sync with master
    We don't have omap_digest bluestore handling
        Additional cases of omap_digest_mismatch_oi changes
        omap_digest still set
        ROBJ10 output still applies
osd-scrub-snaps.sh:
    Add head_exists in snapset
    Add snapset for object with head_mismatch

Signed-off-by: David Zafman <dzafman@redhat.com>
7 years agoMerge pull request #21216 from smithfarm/wip-23545-luminous 21894/head
Yuri Weinstein [Tue, 17 Apr 2018 15:11:37 +0000 (08:11 -0700)]
Merge pull request #21216 from smithfarm/wip-23545-luminous

luminous: journal: Message too long error when appending journal

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #21471 from liewegas/wip-librbd-upgrade-luminous
Jason Dillaman [Tue, 17 Apr 2018 13:03:42 +0000 (09:03 -0400)]
Merge pull request #21471 from liewegas/wip-librbd-upgrade-luminous

test/pybind/test_rbd: allow v1 images for testing

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agotest/pybind/test_rbd: allow v1 images for testing 21471/head
Sage Weil [Tue, 17 Apr 2018 12:53:14 +0000 (07:53 -0500)]
test/pybind/test_rbd: allow v1 images for testing

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #21452 from yuriw/wip-fix-p2p-luminous
Josh Durgin [Tue, 17 Apr 2018 00:04:30 +0000 (17:04 -0700)]
Merge pull request #21452 from yuriw/wip-fix-p2p-luminous

qa/tests - added tag: v12.2.2 to be used by client.1 ...

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoqa/tests - added tag: v12.2.2 to be used by client.1 under workload_luminous to avoid... 21452/head
Yuri Weinstein [Mon, 16 Apr 2018 19:28:27 +0000 (12:28 -0700)]
qa/tests - added tag: v12.2.2 to be used by client.1 under workload_luminous to avoid failures.

added workunits/rados/test-upgrade-to-mimic.sh, and add --gtest_filter=-CReadOpsTest.Exec to api_c_read_operations

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
7 years agoMerge pull request #21328 from tchaikov/wip-11332-luminous
Yuri Weinstein [Mon, 16 Apr 2018 16:22:48 +0000 (09:22 -0700)]
Merge pull request #21328 from tchaikov/wip-11332-luminous

luminous: mon: update PaxosService::cached_first_committed in PaxosService::may…

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #21365 from k0ste/luminous_backports
Yuri Weinstein [Mon, 16 Apr 2018 16:22:11 +0000 (09:22 -0700)]
Merge pull request #21365 from k0ste/luminous_backports

luminous: mgr: prometheus: fix PG state names

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
7 years agoMerge pull request #21394 from ifed01/wip-ifed-backport2
Yuri Weinstein [Mon, 16 Apr 2018 16:21:22 +0000 (09:21 -0700)]
Merge pull request #21394 from ifed01/wip-ifed-backport2

luminous:  BlueStore.cc: _balance_bluefs_freespace: assert(0 == "allocate failed, wtf");

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agotest: Use jq in a compatible way and for easier diff analysis
David Zafman [Mon, 16 Apr 2018 04:49:48 +0000 (21:49 -0700)]
test: Use jq in a compatible way and for easier diff analysis

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 458babe7ee2e5fc0c4519a94249cbc1bd7cec9b6)

7 years agoosd: remove cost from mclock op queues; cost not handled well in dmclock library 21426/head
J. Eric Ivancich [Fri, 13 Apr 2018 22:27:25 +0000 (18:27 -0400)]
osd: remove cost from mclock op queues; cost not handled well in dmclock library

The current version of the dmclock library does not handle operation
cost well. Therefore cost should not be passed into the library when
enqueuing operations; instead 0 should be passed in.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
7 years agoMerge pull request #21388 from theanalyst/wip-luminous-usage-log
Yuri Weinstein [Fri, 13 Apr 2018 15:27:26 +0000 (08:27 -0700)]
Merge pull request #21388 from theanalyst/wip-luminous-usage-log

luminous: usage log fixes

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #21389 from theanalyst/wip-luminous-23687
Yuri Weinstein [Fri, 13 Apr 2018 15:27:07 +0000 (08:27 -0700)]
Merge pull request #21389 from theanalyst/wip-luminous-23687

Wip luminous 23687

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #21393 from theanalyst/wip-luminous-recalc
Yuri Weinstein [Fri, 13 Apr 2018 15:26:18 +0000 (08:26 -0700)]
Merge pull request #21393 from theanalyst/wip-luminous-recalc

luminous: rgw recalculate stats option added

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #21390 from theanalyst/wip-luminous-23690
Yuri Weinstein [Fri, 13 Apr 2018 15:24:57 +0000 (08:24 -0700)]
Merge pull request #21390 from theanalyst/wip-luminous-23690

rgw: fix mutlisite read-write issues

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #21233 from smithfarm/wip-jinja-mgr-luminous
Yuri Weinstein [Thu, 12 Apr 2018 21:32:46 +0000 (14:32 -0700)]
Merge pull request #21233 from smithfarm/wip-jinja-mgr-luminous

luminous: build/ops: deb: move python-jinja2 dependency to mgr

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: James Page <james.page@ubuntu.com>
7 years agoMerge pull request #21283 from liewegas/wip-pgpool-enc-luminous
Yuri Weinstein [Thu, 12 Apr 2018 21:30:51 +0000 (14:30 -0700)]
Merge pull request #21283 from liewegas/wip-pgpool-enc-luminous

luminous: osd/osd_types: fix pg_pool_t encoding for hammer

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #21307 from smithfarm/wip-23606-luminous
Yuri Weinstein [Thu, 12 Apr 2018 21:29:27 +0000 (14:29 -0700)]
Merge pull request #21307 from smithfarm/wip-23606-luminous

luminous: tests: ENGINE Error in 'start' listener <bound  in rados

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
7 years agoMerge pull request #21330 from tchaikov/wip-23610-luminous
Yuri Weinstein [Thu, 12 Apr 2018 21:28:16 +0000 (14:28 -0700)]
Merge pull request #21330 from tchaikov/wip-23610-luminous

luminous: osd: resend osd_pgtemp if it's not acked

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #21352 from pdvian/wip-23634-luminous
Yuri Weinstein [Thu, 12 Apr 2018 19:27:41 +0000 (12:27 -0700)]
Merge pull request #21352 from pdvian/wip-23634-luminous

luminous: doc: outline upgrade procedure for mds cluster

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoos/bluestore: do not assert on insufficient allocation during bluefs 21394/head
Igor Fedotov [Tue, 6 Feb 2018 17:45:24 +0000 (20:45 +0300)]
os/bluestore: do not assert on insufficient allocation during bluefs
rebalance

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 64abc7ba39fab57cc9e19463219e8a70d284eda0)

7 years agotest/store_test: add test case to for excessive fragmentation
Igor Fedotov [Tue, 6 Feb 2018 16:50:40 +0000 (19:50 +0300)]
test/store_test: add test case to for excessive fragmentation

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit eb0443a1034b42d006d2a1d2bd5cb91881f07df7)

7 years agoos/bluestore: fix lack of extent demotion in StupidAllocator::init_rm_free
Igor Fedotov [Mon, 23 Oct 2017 16:32:23 +0000 (09:32 -0700)]
os/bluestore: fix lack of extent demotion in StupidAllocator::init_rm_free

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 89aeea84f9ad24b2f9ca5ea3ee1dd9146e7eb664)

7 years agounittest_interval_set: test with flat_map<> too
Sage Weil [Sat, 28 Oct 2017 21:24:30 +0000 (16:24 -0500)]
unittest_interval_set: test with flat_map<> too

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 70ddb0c18b2969c26dbe855e1573f3f028d9f113)

7 years agoinclude/interval_set: cbegin/cend -> begin/end
Sage Weil [Sat, 28 Oct 2017 21:21:15 +0000 (16:21 -0500)]
include/interval_set: cbegin/cend -> begin/end

c{begin,end} don't exist for btree_map<>.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 7bbb7958df45b36556a0e469fe55f9236d036972)

7 years agoinclude/btree_interval_set: remove it!
Sage Weil [Sat, 28 Oct 2017 21:20:53 +0000 (16:20 -0500)]
include/btree_interval_set: remove it!

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 3dafe9d33eaadf8fbd3bed6cca5a4b2519b33a3f)

7 years agoos/bluestore: use interval_set<...,btree_map<...>>
Sage Weil [Sat, 28 Oct 2017 21:20:43 +0000 (16:20 -0500)]
os/bluestore: use interval_set<...,btree_map<...>>

This avoid the code duplication, yay!

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 762dd42971a9ced62ea5617f7cd6b0e0fd2ef74c)

7 years agoinclude/btree_map: clean up wrapper header around btree_map
Sage Weil [Sat, 28 Oct 2017 20:56:35 +0000 (15:56 -0500)]
include/btree_map: clean up wrapper header around btree_map

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 78d5afde4334e422cb8b915148ca3fc9f819570a)

7 years agoos/bluestore/BitMapAllocator: drop useless include
Sage Weil [Sat, 28 Oct 2017 20:50:30 +0000 (15:50 -0500)]
os/bluestore/BitMapAllocator: drop useless include

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 79f9c86dfde7356915ec790f0cffca77579552e6)

7 years agoinclude/interval_set: tolerate maps that invalidate iterator on change
Sage Weil [Sat, 28 Oct 2017 20:37:03 +0000 (15:37 -0500)]
include/interval_set: tolerate maps that invalidate iterator on change

These changes picked out of the diff between the original
btree_interval_set.h and interval_set.h (sadly I had it rolled into the
initial commit so it was tedious to identify these).

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 87aed2026a8f689540a92eeeea6b4054b6c69acd)

7 years agoinclude/interval_set: templating map used
Sage Weil [Sat, 28 Oct 2017 20:27:47 +0000 (15:27 -0500)]
include/interval_set: templating map used

Default to std::map for backward compat.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d254259059c47c714526976a6144eec3b52e9bcd)

7 years agocommon/interval_set: override subset_of for given range
xie xingguo [Thu, 21 Sep 2017 05:40:40 +0000 (13:40 +0800)]
common/interval_set: override subset_of for given range

E.g.:
subset_of([5~10,20~5], 0, 100)  -> [5~10,20~5]
subset_of([5~10,20~5], 5, 25)   -> [5~10,20~5]
subset_of([5~10,20~5], 1, 10)   -> [5~5]
subset_of([5~10,20~5], 8, 24)   -> [8~7, 20~4]

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit f90bd4b957938c1ce050b3f5783ead37b297ddc2)

7 years agoinverval_set: optimize subset_of with sequential search
Zac Medico [Tue, 26 Sep 2017 06:13:57 +0000 (23:13 -0700)]
inverval_set: optimize subset_of with sequential search

Optimize subset_of to use sequential search when it
performs better than the lower_bound method, for set
size ratios smaller than 10. This is analogous to
intersection_of behavior since commit 825470fcf919.

The subset_of method can be used in some cases as a
less-expensive alternative to the intersection_of
method, since subset_of can return early if any element
of the smaller set is not contained in the larger set,
and intersection_of has the added burden of storing
the intersecting elements.

Signed-off-by: Zac Medico <zmedico@gmail.com>
(cherry picked from commit 5c3775815a433a028618b239f5a4bebacff3dc4b)

7 years agointerval_set: optimize intersection_of
Zac Medico [Thu, 31 Aug 2017 03:59:32 +0000 (20:59 -0700)]
interval_set: optimize intersection_of

Iterate over all elements of the smaller set, and use find_inc to
locate elements from the larger set in logarithmic time. This greatly
improves performance when one set is much larger than the other:

     2 +-+--+----+----+----+----+----+----+----+----+--+-+
P      +*                                                +
E      |*                                                |
R  1.8 +*                                                +
F      | *                                               |
O      | *                                               |
R  1.6 + *                                               +
M      | *                                               |
A      | *                                               |
N  1.4 + *                                               +
C      |  *                                              |
E      |  *                                              |
   1.2 +   *                                             +
R      |    *                                            |
A      |     *                                           |
T    1 +      ***                                        +
I      |         ******                                  |
O      +               ***********************************
   0.8 +-+--+----+----+----+----+----+----+----+----+--+-+
       0   0.1  0.2  0.3  0.4  0.5  0.6  0.7  0.8  0.9   1

                          SET SIZE RATIO

The above plot compares performance of the new intersection_size_asym
function to the existing intersection_of function. The performance of
intersection_size_asym gets worse as the set size ratio approaches 1.
For set size ratios where the performance ratio is greater than 1, the
performance of intersection_size_asym is superior. Therefore, this
patch only uses intersection_size_asym when the set size ratio is less
than or equal to 0.1 (code uses the reciprocal which is 10).

The plot was generated using benchmark results produced by the
following program:

#include <iostream>
#include <sys/timeb.h>
#include "include/interval_set.h"

int main()
{
  const int interval_count = 100000;
  const int interval_distance = 4;
  const int interval_size = 2;
  const int sample_count = 8;
  const int max_offset = interval_count * interval_distance;
  interval_set<int> a, b, intersection;

  for (int i = 0; i < max_offset; i+=interval_distance) {
    a.insert(i, interval_size);
  }

  for (int m = 1; m < 100; m++) {
    float ratio = 1 / float(m);

    for (int i = 0; i < max_offset; i+=interval_distance*m) {
      b.insert(i, interval_size);
    }

    struct timeb start, end;
    int ms = 0;
    for (int i = 0; i < sample_count; i++) {
      ftime(&start);
      intersection.intersection_of(a, b);
      ftime(&end);
      ms += (int) (1000.0 * (end.time - start.time)
        + (end.millitm - start.millitm));
      intersection.clear();
    }
    b.clear();

    std::cout << ratio << "\t" << ms << std::endl << std::flush;
  }
}

Signed-off-by: Zac Medico <zmedico@gmail.com>
(cherry picked from commit 825470fcf9190c94422716454dbf11b24350a748)

7 years agorgw: rgw-rados, rgw-admin add an option to recalculate user stats 21393/head
Abhishek Lekshmanan [Mon, 12 Mar 2018 18:14:46 +0000 (19:14 +0100)]
rgw: rgw-rados, rgw-admin add an option to recalculate user stats

Adds a method in rgw-rados to reset user stats calling the earlier implemented
cls user reset stats.
In rgw-admin we add an option called --reset-stats that invokes this method.

Fixes: http://tracker.ceph.com/issues/23335
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 0b72dd7d3beea47b5c479eeb979b73c4cd70f7bc)
(cherry picked from commit 0bd635b2133c7536f0f3e561579e4aab9cf72d59)

7 years agocls/user: implement reset user stats
Abhishek Lekshmanan [Mon, 12 Mar 2018 19:17:36 +0000 (20:17 +0100)]
cls/user: implement reset user stats

This is an implementation of reset user stats, that recalculates the user stats
purely based on the values of bucket entries in user.buckets object. This is
helpful in cases when user stats has been improperly set in case of manual
resharding etc.

Luminous only additions:
use global scope for encode in cls_user_ops

Fixes: http://tracker.ceph.com/issues/23335
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 63f9127dd685890d938a612739320c942a96f910)

7 years agorgw: radosgw-admin abort early for user stats for empty uids
Abhishek Lekshmanan [Mon, 12 Mar 2018 13:14:22 +0000 (14:14 +0100)]
rgw: radosgw-admin abort early for user stats for empty uids

Otherwise we'll call sync stats with an empty argument which results in creation
of an empty ".buckets" object

Fixes: http://tracker.ceph.com/issues/23322
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit aa3a408d4a66296cbf273551920f8ac9b381b2dd)
(cherry picked from commit 99dec6115bb6d8ef1cdaf658fc359a301d31017d)

7 years agorgw: Fix multisite Synchronization failed when read and write delete at the same... 21390/head
Niu Pengju [Sun, 8 Apr 2018 03:08:04 +0000 (11:08 +0800)]
rgw: Fix multisite Synchronization failed when read and write delete at the same time

This case is first write objA,then write and delete objA at the same
time,write early than delete.
When del objA, use information which stat  of first write objA, so the
op should del the first write data.However when try to del objA, objA
header is second write, so osd "do_xattr_cmp_str" has found idtag change
and return -125(canceled),after rgw client receive the ret -125 , it
will still do "complete_del", then do cls_obj_complete_del to write
bilog。"complete_op" in cls_rgw module  will  write bilog with second
write mtime and second ".ver.epoch". Finally, del op append behind the
second write in bilog. And the slave rgw will merge write op and del op
as del op, and del data,but master rgw complete second write and cancel
del.
This logic is problematic,  so bilog recording the del op should use
cancel op. And squash_map should skip the cancel op.

Fixes: http://tracker.ceph.com/issues/22804
Signed-off-by: Niu Pengju <pengju.niu@xtaotech.com>
(cherry picked from commit a8fd508915a0acf7768fe6ba7f7414e71813f1d7)

7 years agorgw: warn user about on going resharding when canceling it 21389/head
Orit Wasserman [Thu, 29 Mar 2018 10:57:28 +0000 (13:57 +0300)]
rgw: warn user about on going resharding when canceling it

Fixes: http://tracker.ceph.com/issues/21619
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit f4dae60d4cc1ae4099c8d5da785f32a7c39f5a79)

7 years agorgw: no need to RGWReshard::get before remove
Orit Wasserman [Thu, 29 Mar 2018 10:34:50 +0000 (13:34 +0300)]
rgw: no need to RGWReshard::get before remove

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit 2a68224aa4381d9d7d0285fac278dcead953fa3a)

7 years agorgw: reshard cancel command should clear the resharding flag
Orit Wasserman [Tue, 27 Mar 2018 15:26:01 +0000 (18:26 +0300)]
rgw: reshard cancel command should clear the resharding flag

Fixes: http://tracker.ceph.com/issues/21619
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit 2c882b52e5a5b2c21ac63406aa95f8e7850c0fd3)

7 years agocls/rgw: usage_iterate_range truncated should never be NULL 21388/head
Robin H. Johnson [Mon, 12 Mar 2018 21:38:57 +0000 (14:38 -0700)]
cls/rgw: usage_iterate_range truncated should never be NULL

Ensuring truncated is non-NULL improves code clarity.

Suggested-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit f9eb79bbbf30f24135165a2a33aa2a80916b4005)

7 years agocls/rgw: usage_iterate_range end conditions
Robin H. Johnson [Mon, 12 Mar 2018 21:42:00 +0000 (14:42 -0700)]
cls/rgw: usage_iterate_range end conditions

If both end & start conditions are passed, we need to signal that there
are no more results when returning because the end condition is
satisifed.

Suggested-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit 163c49fd1da8e819a0ff8c7c7aaa550b01b8012a)

7 years agocls/rgw: if trimmed any entries don't return -ENODATA
Yehuda Sadeh [Fri, 9 Mar 2018 19:32:42 +0000 (11:32 -0800)]
cls/rgw: if trimmed any entries don't return -ENODATA

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 3ca24749fa1db6bf35773e9095329a2ca4ee4072)

7 years agocls/rgw: make usage_iterate_range()'s "truncated" parameter trustworthy
Greg Farnum [Tue, 6 Mar 2018 00:40:41 +0000 (16:40 -0800)]
cls/rgw: make usage_iterate_range()'s "truncated" parameter trustworthy

Set it to false whenever we identify that we've reached the end of our
range, even if the underlying OSD op says it could have given us more
results. Then rely on that instead of weird iter-based logic to tell
our client that it doesn't need to do more work.

Fixes: https://tracker.ceph.com/issues/22963
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 7ea8ca81f7c5ec9d3a6fc627be4f024a17397497)

7 years agoMerge pull request #19883 from pdvian/wip-22635-luminous
Yuri Weinstein [Thu, 12 Apr 2018 16:30:49 +0000 (09:30 -0700)]
Merge pull request #19883 from pdvian/wip-22635-luminous

luminous: rgw: add xml output header in RGWCopyObj_ObjStore_S3 response msg

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agomgr/prometheus: fix and complete PG state names 21365/head
John Spray [Sun, 8 Apr 2018 14:21:27 +0000 (15:21 +0100)]
mgr/prometheus: fix and complete PG state names

...and reformat into a flat list in the same
order as found in osd_types.cc so that it's
easy to cross check.

Fixes: https://tracker.ceph.com/issues/23584
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 48acc6c7981ef6cbb962883cd36e2666a16d9c23)

7 years agoosd: make PG "deep" state name consistent
John Spray [Mon, 9 Apr 2018 12:22:29 +0000 (13:22 +0100)]
osd: make PG "deep" state name consistent

Previously the state-to-string path called
deep scrubbing "deep", but the string-to-state
path called it "deep_scrub".  Confusing!  Also
meant that the "pg ls" help output was wrong
because it uses the state-to-string path.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit a8b4d20b700dc905d95f7de9564cb085e067e51b)

7 years agoMerge pull request #20829 from xiexingguo/backport-pr-20653
Yuri Weinstein [Wed, 11 Apr 2018 19:52:23 +0000 (12:52 -0700)]
Merge pull request #20829 from xiexingguo/backport-pr-20653

luminous: mon, osd: fix potential collided *Up Set* after PG remapping

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20840 from xiexingguo/backport-pr-20655
Yuri Weinstein [Wed, 11 Apr 2018 19:51:09 +0000 (12:51 -0700)]
Merge pull request #20840 from xiexingguo/backport-pr-20655

luminous: osd/OSDMap: skip out/crush-out osds

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20674 from rzarzynski/wip-bs-drop-std_function-luminous
Sage Weil [Wed, 11 Apr 2018 19:50:23 +0000 (14:50 -0500)]
Merge pull request #20674 from rzarzynski/wip-bs-drop-std_function-luminous

luminous: os/bluestore: avoid overhead of std::function in blob_t.

7 years agoMerge pull request #20907 from pdvian/wip-23315-luminous
Yuri Weinstein [Wed, 11 Apr 2018 19:48:57 +0000 (12:48 -0700)]
Merge pull request #20907 from pdvian/wip-23315-luminous

luminous: mon/OSDMonitor.cc: fix expected_num_objects interpret error

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agodoc: Add release notes for the output format changes
David Zafman [Tue, 10 Apr 2018 18:07:48 +0000 (11:07 -0700)]
doc: Add release notes for the output format changes

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit da0f5887a49363d2d7f2f0a5aac34f5992648b06)

Conflicts:
PendingReleaseNotes (trivial)

7 years agotest: Be smarter about when jsonschema can be used
David Zafman [Mon, 9 Apr 2018 22:09:38 +0000 (15:09 -0700)]
test: Be smarter about when jsonschema can be used

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 9c5ef19f93d999c50641b8bf464b462e0ef5e8f2)

7 years agoosd rados command: Show snapset in list-inconsistent-snapset
David Zafman [Wed, 4 Apr 2018 23:09:39 +0000 (16:09 -0700)]
osd rados command: Show snapset in list-inconsistent-snapset

Add SnapSet bufferlist to inconsistent_snapset_t

Partial fix for http://tracker.ceph.com/issues/23428

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 60ae2b8eb3ef73e9eb175340340681f48beae48d)

Conflicts:
src/common/scrub_types.cc (uses ::decode and ::encode)
src/osd/PrimaryLogPG.cc (trivial)

7 years agoosd: SnapSet::dump() handle snapid_t not in clone_overlap or clone_size
David Zafman [Wed, 4 Apr 2018 23:07:09 +0000 (16:07 -0700)]
osd: SnapSet::dump() handle snapid_t not in clone_overlap or clone_size

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 866a52e5673e296a66dfa9407dcf9375f80b7f73)

7 years agotest: Add getjson variable to save output
David Zafman [Wed, 4 Apr 2018 23:04:41 +0000 (16:04 -0700)]
test: Add getjson variable to save output

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 1b1d45bf517237b5221581c3dfb1a7e5fccf712f)

7 years agoosd rados command: Change error name snapset_mismatch to snapset_error
David Zafman [Wed, 4 Apr 2018 22:58:57 +0000 (15:58 -0700)]
osd rados command: Change error name snapset_mismatch to snapset_error

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 007cb45fe5c8fd1ffb8db2422a11d67d74bbf5b5)

Conflicts:
doc/rados/command/list-inconsistent-snap.json (trivial)
src/common/scrub_types.h (trivial)
src/include/rados/rados_types.hpp (trivial)
src/tools/rados/rados.cc (trivial)

7 years agotest: Clean-up test and use local values for number of objects and osds
David Zafman [Tue, 20 Mar 2018 23:07:49 +0000 (16:07 -0700)]
test: Clean-up test and use local values for number of objects and osds

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 0c7ac9db3bbb07eaa781f2cea1206ea9a8724cc5)

7 years agoMerge pull request #21231 from pdvian/wip-23544-luminous
Yuri Weinstein [Wed, 11 Apr 2018 15:51:27 +0000 (08:51 -0700)]
Merge pull request #21231 from pdvian/wip-23544-luminous

luminous: os/bluestore: change the type of aio_t:res to long

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20973 from pdvian/wip-23409-luminous
Yuri Weinstein [Wed, 11 Apr 2018 15:49:20 +0000 (08:49 -0700)]
Merge pull request #20973 from pdvian/wip-23409-luminous

luminous: mgr: fix MSG_MGR_MAP handling

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #21229 from liewegas/wip-release-reserved-luminous
Yuri Weinstein [Wed, 11 Apr 2018 15:48:39 +0000 (08:48 -0700)]
Merge pull request #21229 from liewegas/wip-release-reserved-luminous

luminous: osd: do not release_reserved_pushes when requeuing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoosd rados command: list-inconsistent-obj attribute improvements
David Zafman [Fri, 16 Mar 2018 06:59:52 +0000 (23:59 -0700)]
osd rados command: list-inconsistent-obj attribute improvements

System attributes shown as "object_info", "snapset" and "hashinfo"
Only output user attributes as "attrs"
Drop leading undescore "_" for user attribute keys
Improve logic as to when to show user attributes or specific system attributes

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 982509514c0c990dcdf7f35725dece61714bfa59)

Conflicts:
qa/standalone/scrub/osd-scrub-repair.sh (trivial)
src/osd/osd_types.cc (trivial)
src/tools/rados/rados.cc (uses ::decode())

7 years agoosd rados command: Change "oi" to "info" in scrub handling errors
David Zafman [Fri, 16 Mar 2018 04:50:30 +0000 (21:50 -0700)]
osd rados command: Change "oi" to "info" in scrub handling errors

data_digest_mismatch_oi -> data_digest_mismatch_info
omap_digest_mismatch_oi -> omap_digest_mismatch_info
size_mismatch_oi -> size_mismatch_info
obj_size_oi_mismatch -> obj_size_info_mismatch

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 01687b052fdeec6dd2a4798b1e637fc8d15702c7)

7 years agoosd rados command: Change "oi_attr" to "info" in scrub handling errors
David Zafman [Fri, 16 Mar 2018 00:09:43 +0000 (17:09 -0700)]
osd rados command: Change "oi_attr" to "info" in scrub handling errors

oi_attr_missing -> info_missing
oi_attr_corrupted -> info_corrupted

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 273f6213ea9f637de896f4244622d0e8e4847bad)

7 years agoosd rados command: Rename ss_attr_missing/ss_attr_corrupted to snapset_missing/snapse...
David Zafman [Thu, 15 Mar 2018 21:29:54 +0000 (14:29 -0700)]
osd rados command: Rename ss_attr_missing/ss_attr_corrupted to snapset_missing/snapset_corrupted

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit bec67e3d4095484970ad3376a9b2613d07a6606f)

Conflicts:
qa/standalone/scrub/osd-scrub-snaps.sh (still have head_mismatch due to snapdir)

7 years agoosd rados command: Improve scrub handling of HashInfo (hinfo_key xattr)
David Zafman [Wed, 14 Mar 2018 23:07:01 +0000 (16:07 -0700)]
osd rados command: Improve scrub handling of HashInfo (hinfo_key xattr)

Fixes: http://tracker.ceph.com/issues/23364
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit d713c7dad0adf8605c14cd8181c1b2c09b20fb8c)

7 years agoosd: Don't crash in get_hash_info() with a corrupt HashInfo
David Zafman [Wed, 14 Mar 2018 23:29:18 +0000 (16:29 -0700)]
osd: Don't crash in get_hash_info() with a corrupt HashInfo

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 0d4acc55ffd7f0f45324d1c933a2a5d0d47b84ec)

Conflicts:
src/osd/ECBackend.cc (Uses ::decode())

7 years agotest: Remove check that masks differences (let diff fail)
David Zafman [Wed, 4 Apr 2018 23:05:08 +0000 (16:05 -0700)]
test: Remove check that masks differences (let diff fail)

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit be815f9b2b9ded0a0dad19f88488d79ce5efff07)

Conflicts:
qa/standalone/scrub/osd-scrub-snaps.sh (trivial)

7 years agoMerge pull request #21103 from dzafman/wip-23267-luminous
David Zafman [Wed, 11 Apr 2018 14:50:12 +0000 (07:50 -0700)]
Merge pull request #21103 from dzafman/wip-23267-luminous

luminous: scrub errors not cleared on replicas can cause inconsistent pg state when replica takes over primary

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #21335 from ceph/backport-rm23644
Andrew Schoen [Wed, 11 Apr 2018 14:47:44 +0000 (16:47 +0200)]
Merge pull request #21335 from ceph/backport-rm23644

luminous: ceph-volume lvm.activate error if no bluestore OSDs are found

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
7 years agodoc: outline upgrade procedure for mds cluster 21352/head
Patrick Donnelly [Thu, 5 Apr 2018 22:49:32 +0000 (15:49 -0700)]
doc: outline upgrade procedure for mds cluster

Fixes: http://tracker.ceph.com/issues/23568
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit baa59f3821febaac869e3a8d1f16e775b4b855c3)

7 years agoosd: Fix stale scrub stats when a primary takes over 21103/head
David Zafman [Wed, 28 Mar 2018 17:21:39 +0000 (10:21 -0700)]
osd: Fix stale scrub stats when a primary takes over

Fixes: http://tracker.ceph.com/issues/23267
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 5cfb8241f482ed53c63bb97262425b2acb733d7d)

7 years agotest: Eliminate use of bc (use awk) in get_timeout_delays()
David Zafman [Tue, 27 Mar 2018 00:27:19 +0000 (17:27 -0700)]
test: Eliminate use of bc (use awk) in get_timeout_delays()

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit ce9c029858d8deb249afe8effd5d80ae623f69a2)

7 years agoosd: Improve object_stat_sum_t handling
David Zafman [Fri, 23 Mar 2018 00:17:42 +0000 (17:17 -0700)]
osd: Improve object_stat_sum_t handling

Keep post split PGs as inconsistent from original
Keep num_scrub_errors as total of other 2

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 39adde2655ebb40ad5c010fa77509acc35b25b91)

Conflicts:
src/osd/osd_types.h (trivial)

7 years agoMerge pull request #21124 from smithfarm/wip-23507-luminous
Yuri Weinstein [Tue, 10 Apr 2018 19:56:37 +0000 (12:56 -0700)]
Merge pull request #21124 from smithfarm/wip-23507-luminous

luminous: test_admin_socket.sh may fail on wait_for_clean

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
7 years agoMerge pull request #21192 from pdvian/wip-23524-luminous
Yuri Weinstein [Tue, 10 Apr 2018 19:55:56 +0000 (12:55 -0700)]
Merge pull request #21192 from pdvian/wip-23524-luminous

luminous: is_qemu_running in qemu_rebuild_object_map.sh and qemu_dynamic_features.sh may return false positive

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #21230 from pdvian/wip-23542-luminous
Yuri Weinstein [Tue, 10 Apr 2018 19:55:26 +0000 (12:55 -0700)]
Merge pull request #21230 from pdvian/wip-23542-luminous

luminous: rbd-nbd: fix ebusy when do map

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoceph-volume lvm.activate error if no bluestore OSDs are found 21335/head
Alfredo Deza [Tue, 10 Apr 2018 00:00:27 +0000 (20:00 -0400)]
ceph-volume lvm.activate error if no bluestore OSDs are found

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit b1920d6e731f194c4829810d849dba6b087ce3a4)

7 years agoosd: resend osd_pgtemp if it's not acked 21330/head
Kefu Chai [Mon, 9 Apr 2018 16:56:05 +0000 (00:56 +0800)]
osd: resend osd_pgtemp if it's not acked

if the osd_pgtemp message is dropped before monitor receives it, we need
to resend it. otherwise a pg could be stuck in activating state if the
pg creation was withheld by the max-pg-per-osd on the replica, and then
the replica osd removes some existing pg.

Fixes: http://tracker.ceph.com/issues/23610
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9c5cb4ea620da4ef14345ebc8018f9ed008c4345)

Conflicts:
src/osd/OSD.cc: structured binding is a feature introduced in
C++17. while we are using C++11 in luminous. so implement it with C++11
syntax.
src/osd/OSD.h: trivial resolution

7 years agomon: update PaxosService::cached_first_committed in PaxosService::maybe_trim() 21328/head
Xuehan Xu [Wed, 10 Jan 2018 03:17:16 +0000 (11:17 +0800)]
mon: update PaxosService::cached_first_committed in PaxosService::maybe_trim()

This should be able to avoid interleaving execution of Paxos::commit_finish() and
check_sub(), which could lead to unexpected failure of ceph-mon.

Fixes: http://tracker.ceph.com/issues/11332
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
Signed-off-by: yupeng chen <chenyupeng-it@360.cn>
(cherry picked from commit c3c88d84d696016d56a04f95662dc1f4f937ebec)

7 years agoMerge pull request #20431 from pdvian/wip-22967-luminous
Yuri Weinstein [Mon, 9 Apr 2018 23:17:27 +0000 (16:17 -0700)]
Merge pull request #20431 from pdvian/wip-22967-luminous

luminous: osdc/Journaler: make sure flush() writes enough data

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge pull request #21173 from smithfarm/wip-22383-luminous
Yuri Weinstein [Mon, 9 Apr 2018 23:16:54 +0000 (16:16 -0700)]
Merge pull request #21173 from smithfarm/wip-22383-luminous

luminous: qa: src/test/libcephfs/test.cc:376: Expected: (len) > (0), actual: -34 vs 0

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge pull request #21176 from smithfarm/wip-23154-luminous
Yuri Weinstein [Mon, 9 Apr 2018 23:15:58 +0000 (16:15 -0700)]
Merge pull request #21176 from smithfarm/wip-23154-luminous

luminous: mds: FAILED assert (p != active_requests.end()) in MDRequestRef MDCache::request_get(metareqid_t)

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #21267 into luminous
Patrick Donnelly [Mon, 9 Apr 2018 22:51:50 +0000 (15:51 -0700)]
Merge PR #21267 into luminous

* refs/pull/21267/head:
discard the mdsload clear after prep_rebalance in case we want to export it for debugging
make sure that MDBalancer uses heartbeat info from the same epoch

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
7 years agoMerge PR #21266 into luminous
Patrick Donnelly [Mon, 9 Apr 2018 22:51:44 +0000 (15:51 -0700)]
Merge PR #21266 into luminous

* refs/pull/21266/head:
make popular counter decay at proper rate

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
7 years agoMerge PR #21256 into luminous
Patrick Donnelly [Mon, 9 Apr 2018 22:51:38 +0000 (15:51 -0700)]
Merge PR #21256 into luminous

* refs/pull/21256/head:
mds: bump mds_log_max_segments for trim buffer

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoqa: assign prometheus ports during selftest 21307/head
John Spray [Mon, 22 Jan 2018 16:04:27 +0000 (16:04 +0000)]
qa: assign prometheus ports during selftest

This was throwing IOError("Port 9283 not free on '::'",)
when trying to serve, since merging https://github.com/ceph/ceph/pull/19744

It's because the standbys (on the same node as the active) are
now trying to listen too.

Fixes: https://tracker.ceph.com/issues/22755
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit e2c68d5e2582fe610098bc6ea4f0b44ad1df28fd)

7 years agoMerge pull request #20885 from mslovy/fix-bug-21811
Nathan Cutler [Sun, 8 Apr 2018 17:05:24 +0000 (19:05 +0200)]
Merge pull request #20885 from mslovy/fix-bug-21811

luminous: rgw: Admin API Support for bucket quota change

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #21048 from cbodley/wip-qa-swift-force-branch-luminous
Nathan Cutler [Sun, 8 Apr 2018 17:03:47 +0000 (19:03 +0200)]
Merge pull request #21048 from cbodley/wip-qa-swift-force-branch-luminous

luminous: tests: rgw: swift tests target ceph-luminous branch

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agoosd/osd_types: fix pg_pool_t encoding for hammer 21283/head
Sage Weil [Sat, 7 Apr 2018 18:36:32 +0000 (13:36 -0500)]
osd/osd_types: fix pg_pool_t encoding for hammer

If we are missing the hammer feature, we will also be missing the
luminous feature, but we should still encode like hammer.

Analogous fix to e28e0c617af8825ae92cced5d87cc4f403709e48

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 37c22b273959c6ca54808f3cb8d22a2d250d0c1b)

7 years agoMerge pull request #20890 from pdvian/wip-23312-luminous
Yuri Weinstein [Fri, 6 Apr 2018 19:28:34 +0000 (12:28 -0700)]
Merge pull request #20890 from pdvian/wip-23312-luminous

luminous: invalid JSON returned when querying pool parameters

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20998 from pdvian/wip-23412-luminous
Yuri Weinstein [Fri, 6 Apr 2018 19:28:09 +0000 (12:28 -0700)]
Merge pull request #20998 from pdvian/wip-23412-luminous

luminous: log: Fix AddressSanitizer: new-delete-type-mismatch

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
7 years agoMerge pull request #21053 from pdvian/wip-23224-luminous
Yuri Weinstein [Fri, 6 Apr 2018 19:27:29 +0000 (12:27 -0700)]
Merge pull request #21053 from pdvian/wip-23224-luminous

luminous: mgr: quieten logging on missing OSD stats

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #21059 from pdvian/wip-23226-luminous
Yuri Weinstein [Fri, 6 Apr 2018 19:26:59 +0000 (12:26 -0700)]
Merge pull request #21059 from pdvian/wip-23226-luminous

luminous: os/bluestore: trim cache every 50ms (instead of 200ms)

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #21090 from tchaikov/wip-23477-luminous
Yuri Weinstein [Fri, 6 Apr 2018 19:26:18 +0000 (12:26 -0700)]
Merge pull request #21090 from tchaikov/wip-23477-luminous

luminous: common: should not check for VERSION_ID

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>