Jan Fajerski [Tue, 30 Jul 2019 15:32:06 +0000 (17:32 +0200)]
ceph-volume: fall back to PARTTYPE if PARTLABEL is empty
In some cases ceph-disk does not populate PARTLABEL for wal and db
partitions. This commit adds the assumption that the empty string is a
valid label and falls back to identifying those disks by PARTTYPE.
Fixes: https://tracker.ceph.com/issues/40917 Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Jan Fajerski [Tue, 30 Jul 2019 15:29:09 +0000 (17:29 +0200)]
ceph-volume: adjust tests for empty PARTLABEL fields
It seems like ceph-disk sometimes creates OSDs where the wal and db
partitions have no PARTLABEL set. This commit alters tests so that the
empty string is considered a valid label.
Jan Fajerski [Tue, 30 Jul 2019 11:29:22 +0000 (13:29 +0200)]
ceph-volume: refactor ceph-disk_member unittests
This adds a parameterized fixture as input to the tests. Should make
writing new tests easier since only fixture parameters need to be added.
In the future we should be able to reuse the fixtures to build other
fixtures and reuse the parametrization.
Sebastian Wagner [Tue, 30 Jul 2019 07:31:34 +0000 (09:31 +0200)]
Merge pull request #28915 from sebastian-philipp/python-common-package-2
python-common: Python common package
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Tim Serong <tserong@suse.com>
Andrew Schoen [Mon, 29 Jul 2019 20:25:19 +0000 (15:25 -0500)]
ceph-volume: when testing disable the dashboard
ceph-ansible has started enabling the dashboard by
default as of https://github.com/ceph/ceph-ansible/pull/4268
Disabling the dashboard gets us around needing to run
the grafana_server role which is required for the dashboard
and not needed for ceph-volume functional tests.
Patrick Donnelly [Mon, 29 Jul 2019 17:37:15 +0000 (10:37 -0700)]
Merge PR #29374 into master
* refs/pull/29374/head:
cephfs-shell: Fix flake8 line too long error
cephfs-shell: Fix flake8 line break after binary operator error
cephfs-shell: Fix flake8 continuation line over-indented for hanging indent error
cephfs-shell: Fix flake8 missing whitespace around arithmetic operator error
cephfs-shell: Fix multiple spaces after ':' flake8 error
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
test/librados: avoid residual crush rule after test case execution Fixes: http://tracker.ceph.com/issues/40970 Signed-off-by: Bingyi Zhang <zhangbingyi@umcloud.com>
Sage Weil [Sat, 27 Jul 2019 12:59:30 +0000 (07:59 -0500)]
Merge PR #29316 into master
* refs/pull/29316/head:
common,tools: make sure the destination buffer can handle the size of the string
src/tools: initialize variables before the goto statement
src/mount: check before dereference buf
src/crush: check before dereference out2
src/test: s/strcpy/strncpy
Patrick Donnelly [Fri, 26 Jul 2019 22:18:13 +0000 (15:18 -0700)]
Merge PR #28685 into master
* refs/pull/28685/head:
client: more precise CEPH_CLIENT_CAPS_PENDING_CAPSNAP
client: unify kicking cap flushes and kicking snapcap flushes
client: define helper function that sends flushsnap message
client: cleanup tracking of early kicked flushing caps
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Fri, 26 Jul 2019 22:15:19 +0000 (15:15 -0700)]
Merge PR #28793 into master
* refs/pull/28793/head:
qa/cephfs: make run_shell() accept args as str too
qa/vstart_runner.py: ignores when source and destination are same
test_cephfs_shell: add a test for cd with arguments
test_cephfs_shell: add a test for cd with no arguments
test_cephfs_shell: group test methods
test_cephfs_shell: add a new method to return script output
test_cephfs_shell: allow running CephFS shell script
cephfs-shell: cd with no args shouldn't print an error message
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Fri, 26 Jul 2019 15:17:22 +0000 (10:17 -0500)]
mgr/telemetry: salt osd ids too
Better to fully obfuscate here.
This has a nice side-effect of assigning entity names that are *globally*
unique across the full telemetry data set, since the salts are unique and
sha1 is (sufficiently) collision-free.
rpm: fdupes in SUSE builds to conform with packaging guidelines
Quoting from https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
"%fdupes is generally safe for use on /bin, /lib*, /usr (= %_prefix) and /sbin.
Do note however that files with same content but different ownership, when
hardlinked, will get the ownership of any of its content siblings."
cmake/modules/Distutils: do not add ${name}-clone if already added
if `distutils_install_module("foo" ...)` is called mutiple times with
different python version, `foo-clone` will be added multiple times as a
custom target. which is not allowed:
add_custom_target cannot create target "foo-clone" because another
target with the same name already exists.
Jeff Layton [Thu, 25 Jul 2019 19:54:58 +0000 (15:54 -0400)]
client: don't report any vxattrs to listxattr
The convention with kernel filesystems is to not report vxattrs when
listxattr is called. Doing this can throw a wrench to archiving tools
that will attempt to restore files with xattrs intact, only to find
that some of them can't be stored.
Remove the code that prints out vxattrs in listxattr. With this we
also don't need the "hidden" flag in the vxattr definitions.
Also fix up the existing testcases to account for the change in
behavior.
Fixes: https://tracker.ceph.com/issues/40965 Signed-off-by: Jeff Layton <jlayton@redhat.com>
mgr/dashboard: Various UI issues related to CephFS
* Check if data is accessible, otherwise set grafanaId to undefined.
* Catch errors in 'Clients' tab and stop loading spinner. Display ViewCacheStatus Exception.
* Render the 'Enabled' column using the checkIcon cell template as other lists do.
common,tools: make sure the destination buffer can handle the size of the string
fix klocwork issues:
Width is not specified for 's' conversion specifier.
This can result in an overflow of the buffer
provided in argument 3 of a call to 'sscanf'
src/tools: initialize variables before the goto statement
CID 172143 (#15 of 15): Branch past initialization (PW.BRANCH_PAST_INITIALIZATION)
1. branch_past_initialization:
2. name_at_decl_position: variable "oid" (declared at line 220)
3. name_at_decl_position: variable "exkeys" (declared at line 241)
4. name_at_decl_position: variable "exvals" (declared at line 242)
5. name_at_decl_position: variable "safe" (declared at line 278)
mds: delay exporting directory whose pin value exceeds max rank id
Currently we allow to set ceph.dir.pin value to any number. If it is
larger than current max id, this dir will stay in export_pin_queue all
the time and every tick migrator will try to handle it but never export
it successfully.
when client get notification from MDS that a file has been deleted(via
getting CEPH_CAP_LINK_SHARED cap for inode with nlink = 0), if the client
hasnt touch the inode in the past, the ll_ref will be zero.
In previous code, we only call Client::unlink when ll_ref > 0, which is wrong
and will leave the dn in cache, keeping the caps and resulting the inode stays
in stray till the dn cache is dropped by kernel.
Under certain workload(write intensive and rotate intensive), this issue can cause
stray stacking to 100k+ and causeing huge space "leaking".
Sage Weil [Fri, 26 Jul 2019 01:15:17 +0000 (20:15 -0500)]
Merge PR #28847 into master
* refs/pull/28847/head:
doc/mgr/telemetry: update
mgr/telemetry: move contact info to an 'ident' channel
mgr/telemetry: accept channel list to 'telemetry show'
mgr/telemetry: always generate new report for 'telemetry show'
mgr/telemetry: add 'device' channel and call out to devicehealth module
mgr/telemetry: add telemetry channel 'device'
mgr/telemetry: add separate channels
Sage Weil [Fri, 26 Jul 2019 01:14:46 +0000 (20:14 -0500)]
Merge PR #29221 into master
* refs/pull/29221/head:
mon/OSDMonitor: do not clobber pending xinfo during boot
osd/OSDMap: add is_dead() helper
mon/OSDMonitor: 'osd down ... --definitely-dead'
osd: send MOSDMarkMeDead when we are marked down
mon/OSDMonitor: implement MOSDMarkMeDead handling
mon/OSDMonitor: set dead_epoch for immediate failure (ECONNREFUSED)
osd/OSDMap: add dead_epoch to xinfo