summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* client: Properly set ctime on writewip-mtime-incrSam Lang2012-11-271-1/+9
| | | | Signed-off-by: Sam Lang <sam.lang@inktank.com>
* client: Always increment mtimeSam Lang2012-11-271-1/+7
| | | | | | | | | | | | | Cases where the mds clock was a few seconds ahead of the client would cause the mtime of files to be set backward, because the mtime set on create is from the mds, and updates on writes are from the client. This patch prevents mtime from going backward by comparing the current mtime with the client's time, and incrementing by one nanosecond if the mtime > client. Signed-off-by: Sam Lang <sam.lang@inktank.com>
* Merge branch 'wip-rbd-cmdparse'Dan Mick2012-11-262-12/+78
|\ | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd workunit: Add tests for clones across poolsDan Mick2012-11-261-0/+25
| | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd workunit: Make "remove_images" silentDan Mick2012-11-261-2/+2
| | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd workunit: Add tests for cross-pool renameDan Mick2012-11-261-0/+10
| | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd: tests for copy with explicit/implicit pool namesDan Mick2012-11-261-0/+14
| | | | | | | | | | | | | | Validate change to not assume dest pool == src pool Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd: fix import pool assumptionsDan Mick2012-11-261-0/+14
| | | | | | | | | | | | | | | | | | | | import allows specifying one image, implicitly or explicitly the "source" image, even though it's really the destination. Fix up the reassignment of 'source' to 'dest', and check for and complain about specifying two different pools or images for import. Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd: change destpool assumptions.Dan Mick2012-11-261-1/+2
| | | | | | | | | | | | | | | | | | Don't default destpool to srcpool; it's surprising, and not useful/helpful enough to violate the convention that "default pool is rbd" Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd: --size fixesDan Mick2012-11-261-6/+11
| | | | | | | | | | | | | | | | * require --size/-s for both create *and* resize * explicitly permit create with size 0. Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rbd: allow parsing image@snap even if --pool givenDan Mick2012-11-261-3/+0
| | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
* | osdc/ObjectCacher: touch Objects in lruSage Weil2012-11-262-0/+5
| | | | | | | | | | | | | | Touch the object when we touch one of it's bh's, and when we touch it during readx (possibly because it is negative). Signed-off-by: Sage Weil <sage@inktank.com>
* | Merge branch 'next'Sage Weil2012-11-2619-34/+237
|\ \ | |/ |/|
| * osdc/ObjectCacher: remove unused waitfor_{rd,wr}Sage Weil2012-11-261-4/+0
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * osdc/ObjectCacher: *do* pin object during writeSage Weil2012-11-262-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hopefully resolves #3431. We originally did this in 46897fd4ffc2fe2fc2cc0c39b5d4c510df1e6c25, and then reverted in caed0e917f8044d389d01de5ee5ecbf0d16ff349. The current conundrum: - commit_set() will issue a write and queue a waiter on a tid - discard will discard all BufferHeads and unpin the object - trim will try to close and fail assert(ob->can_close()) But: - we can't wake the waiter on discard because we don't know what range(s) it is waiting for; discard needn't be the whole object. So: pin the object so it doesn't get trimmed, and unpin when we write. Adjust can_close() so that it is based on the lru pin status, and assert that pinned implies the previous conditions are all true. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Sam Lang <sam.lang@inktank.com>
| * rgw: document ops logging setupYehuda Sadeh2012-11-262-0/+46
| | | | | | | | | | | | Fixes: #3530 Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * rgw: usage REST api handles cateogoriesYehuda Sadeh2012-11-261-0/+14
| | | | | | | | | | | | | | Fixes: #3528 The usage REST api was missing the categories filter. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * logrotate on systems without invoke-rc.dAlexandre Oliva2012-11-261-3/+3
| | | | | | | | | | | | | | | | | | The which command doesn't output anything to stdout when it can't find the given program name, and then [ -x ] passes. Use the exit status of which to tell whether the command exists, before testing whether it's executable, to fix it. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
| * Search for srcdir/.git in check_versionAlexandre Oliva2012-11-261-4/+5
| | | | | | | | | | | | | | Support srcdir != . looking for .git in srcdir when computing the ceph release and git tag. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
| * rgw: POST requests not default to init multipart uploadYehuda Sadeh2012-11-263-13/+5
| | | | | | | | | | | | | | | | | | | | Fixes: #3516 We don't default to init multipart upload request when getting S3 POST. This way when the request is not really init multipart upload we'd end up sending a 405 response instead of 500. Also, it's cleaner this way. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * java: add ceph_open_layout interfaceNoah Watkins2012-11-264-0/+87
| | | | | | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
| * client: add ceph_open_layout interfaceNoah Watkins2012-11-265-6/+69
| | | | | | | | | | | | | | | | Adds an interface identical to ceph_open() that takes additional parameters specifying a file layout to use on new files. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | Removing ceph dirs while scrubbing ceph off the systemtamil2012-11-261-1/+6
| | | | | | | | Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
* | Merge branch 'next'Josh Durgin2012-11-2618-19/+87
|\ \ | |/
| * qa: add script to run objectcacher testsJosh Durgin2012-11-261-0/+26
| | | | | | | | Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
| * Merge remote-tracking branch 'gh/wip-upstart' into nextSage Weil2012-11-2613-13/+44
| |\
| | * upstart: fix limit linesSage Weil2012-11-163-3/+3
| | | | | | | | | | | | | | | | | | Two arguments. Signed-off-by: Sage Weil <sage@inktank.com>
| | * upstart: add ceph-osd-all-starter.confSage Weil2012-11-162-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starter helper will start all osds that appear in /var/lib/ceph/osd/*, as we do with the mons and mdss. This will only proceed if the 'ready' file is there, which is currently only touched by ceph-disk-activate. Signed-off-by: Sage Weil <sage@inktank.com>
| | * upstart: make ceph-osd-all, ceph jobsSage Weil2012-11-1610-10/+20
| | | | | | | | | | | | | | | | | | This will let you start/stop all daemons. Signed-off-by: Sage Weil <sage@inktank.com>
| * | init-ceph: do not make noise about missing devsSage Weil2012-11-261-2/+0
| | | | | | | | | | | | | | | | | | | | | It is pretty normal not to include the devs line in the ceph.conf. Do not print/warn about it. Signed-off-by: Sage Weil <sage@inktank.com>
| * | syncfs: check for __NR_syncfs tooSage Weil2012-11-252-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | Also make the filestore startup tell us *all* variants that are supported, not just the first one. Tested-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Sage Weil <sage@inktank.com>
| * | monmap: fix crash from dup initial seed monsSage Weil2012-11-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug reproduced by -m hostname,ip_that_hosthname_resolves_to Backport: argonaut Reported-by: Drunkard Zhang <gongfan193@gmail.com> Signed-off-by: Sage Weil <sage@inktank.com>
* | | Merge remote-tracking branch 'gh/next'Sage Weil2012-11-2546-246/+1096
|\ \ \ | |/ /
| * | osdc/ObjectCacher: fix BufferHead leak on ENOENTSage Weil2012-11-241-0/+1
| | | | | | | | | | | | | | | | | | This was detected by fsstress over ceph-fuse under valgrind. Signed-off-by: Sage Weil <sage@inktank.com>
| * | Merge remote-tracking branch 'gh/wip-mon-misc-fixes' into nextSage Weil2012-11-247-20/+50
| |\ \
| | * | mon: Monitor: wake up contexts based on paxos machine's stateJoao Eduardo Luis2012-11-231-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When recovering the leader, only wake up a paxos machine's contexts if the paxos machine is in a state that can handle said contexts. Fixes: #3495 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | mon: AuthMonitor: increase log levels when logging secretsJoao Eduardo Luis2012-11-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #3361 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | auth: Keyring: increase log levels when logging secretsJoao Eduardo Luis2012-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #3361 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | auth: cephx: increase log levels when logging secretsJoao Eduardo Luis2012-11-232-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We understand that logging secrets may be useful when debugging the root causes for auth issues. However, logging secrets is far from a good idea. Therefore, just increase the log levels to a high enough value so that most other debug infos can be obtained without even logging the secrets. If one really wants to log the secrets, then setting --debug-auth 30 should do the trick. Fixes: #3361 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | crush: CrushWrapper: don't add item to a bucket with != type than wantedJoao Eduardo Luis2012-11-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We take little consideration about the type of the bucket we are adding an item to. Although this works for the vast majority of cases, it was also leaving room for silly little mistakes to become problematic and leading a monitor to crash. For instance, say that we ran: 'ceph osd crush set 0 osd.0 1 root=foo row=foo' If root 'foo' exists, then this will work and 'row=foo' will be ignored. However, if there is no bucket named 'foo', then we would (in order) create a bucket for row 'foo', adding osd.0 to it, and would then add osd.0 to bucket 'foo' again -- remember, little consideration regarding the bucket type was given. This would trigger a monitor crash due to the recursion done in 'adjust_item_weight'. A solution to this problem is to make sure that we do not allow specifying multiple buckets with the same name when adding an item to crush. Not only solves our crash problem, but will also render invalid any mistake when specifying the wrong bucket type (say, using 'row=bar' when in fact 'bar' is a rack). Fixes: #3515 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | mon: PGMonitor: check if pg exists when handling 'pg map <PG>'Joao Eduardo Luis2012-11-231-6/+11
| | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | make mkcephfs and init-ceph osd filesystem handling more flexibleDanny Al-Gaaf2012-11-237-79/+150
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove btrfs specific keys and replace them by more generic keys to be able to replace btrfs with e.g. xfs or ext4 easily. Add new key to define the osd fs type: 'osd mkfs type', which can get defined in the [osd] section for all OSDs. Replaced config keys: - 'btrfs devs' -> 'devs' - 'btrfs path' -> 'fs path' - 'btrfs options' -> 'osd mount options $fstype' New config key: - 'osd mkfs options $fstype': file system specific options for mkfs - 'osd mkfs type': to define the filesystem for mkfs and also mount Replaced in mkcephfs: --mkbtrfs with --mkfs Replaced in init-ceph: - --btrfs with --fsmount - --nobtrfs with --nofsmount - --btrfsumount with --fsumount NOTE: old options from mkcephfs and init-ceph will still work, but get may removed in the future from the scripts. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | Merge remote-tracking branch 'origin/next' into nextYehuda Sadeh2012-11-221-1/+1
| |\ \
| | * | mds: child directory inherits SGID bitSage Weil2012-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the inode, not the local variable. Reported-by: Giorgos Kappes <geokapp@gmail.com> Signed-off-by: Sage Weil <sage@inktank.com>
| * | | Merge remote-tracking branch 'origin/next' into nextYehuda Sadeh2012-11-224-0/+50
| |\ \ \ | | |/ /
| | * | crush: prevent loops from insert_itemSage Weil2012-11-222-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the insertion would create a loop, return -EINVAL. Fixes: #3515 Signed-off-by: Sage Weil <sage@inktank.com>
| | * | Try using syscall() for syncfs if not supported directly by glibcDan Mick2012-11-222-0/+16
| | | | | | | | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | | Merge branch 'wip-opslog-socket2' into nextYehuda Sadeh2012-11-228-35/+611
| |\ \ \ | | |/ / | |/| | | | | | | | | | Conflicts: src/rgw/rgw_main.cc
| | * | rgw: ops log can also go to socketYehuda Sadeh2012-11-168-35/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a new ops log output (into a unix domain socket). Configuration: rgw_enable_usage_log : master switch for ops log rgw ops log socket path : set socket path rgw ops log rados : whether ops should be logged in the rados cluster rgw ops log data backlog : max size in MB to be accumulated without flushing Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: fix usage accountingYehuda Sadeh2012-11-215-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bytes_sent and bytes_received are no longer accounted in the req_state, needed to get them out of the ClientIO object. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>