]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agodoc/dev: add context note to dev guide config 46818/head
Zac Dover [Tue, 21 Jun 2022 14:09:05 +0000 (00:09 +1000)]
doc/dev: add context note to dev guide config

This PR adds a note directing first-time cloners of
their Ceph git forks to make sure to cd into the ceph/
directory before trying to run the "git config" commands.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 3e6bcd7f0be2d0f896146c563a3381c9b7ea0e83)

3 years agoMerge pull request #46686 from rhcs-dashboard/wip-55942-quincy
Ernesto Puerta [Wed, 22 Jun 2022 11:23:49 +0000 (13:23 +0200)]
Merge pull request #46686 from rhcs-dashboard/wip-55942-quincy

quincy: mgr/dashboard: Feature 54330 osd creation workflow

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
3 years agoMerge pull request #46361 from adk3798/build-wip-quincy
Adam King [Tue, 21 Jun 2022 22:04:57 +0000 (18:04 -0400)]
Merge pull request #46361 from adk3798/build-wip-quincy

quincy: script/build-integration-branch: add quincy to the list of releases

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
3 years agoMerge pull request #46763 from idryomov/wip-wnbd-main-branch-quincy
Ilya Dryomov [Tue, 21 Jun 2022 10:28:25 +0000 (12:28 +0200)]
Merge pull request #46763 from idryomov/wip-wnbd-main-branch-quincy

quincy: win32_deps_build.sh: master -> main for wnbd

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
3 years agowin32_deps_build.sh: master -> main for wnbd 46763/head
Ilya Dryomov [Mon, 20 Jun 2022 20:23:27 +0000 (22:23 +0200)]
win32_deps_build.sh: master -> main for wnbd

wnbd is switching, see https://github.com/cloudbase/wnbd/pull/67.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 27048bf2b29a7060958a2b6dda8247cfad8a0334)

3 years agoMerge pull request #46706 from rzarzynski/wip-pglog-trim-dups-quincy
Yuri Weinstein [Fri, 17 Jun 2022 20:38:16 +0000 (13:38 -0700)]
Merge pull request #46706 from rzarzynski/wip-pglog-trim-dups-quincy

quincy: tools: ceph-objectstore-tool is able to trim pg log dups' entries.

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46719 from dang/wip-dang-56029
Daniel Gryniewicz [Fri, 17 Jun 2022 15:33:59 +0000 (11:33 -0400)]
Merge pull request #46719 from dang/wip-dang-56029

RGW - Swift retarget needs bucket set on object

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46721 from zdover23/wip-doc-2022-06-15-backport-46712-quincy...
zdover23 [Fri, 17 Jun 2022 03:23:32 +0000 (13:23 +1000)]
Merge pull request #46721 from zdover23/wip-doc-2022-06-15-backport-46712-quincy-master-to-main-dev-guide-basic-workflow

quincy: doc/dev: s/master/main/ in title

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev: s/master/main/ in title 46721/head
Zac Dover [Thu, 16 Jun 2022 05:57:16 +0000 (15:57 +1000)]
doc/dev: s/master/main/ in title

This changes "master" to "main" in a title. If we lived in an
ideal world, this would have been a part of PR#46678.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit f5fd158bea2a54b83c7f75cd806885de44045ad6)

3 years agoRGW - Swift retarget needs bucket set on object 46719/head
Daniel Gryniewicz [Thu, 16 Jun 2022 15:46:24 +0000 (11:46 -0400)]
RGW - Swift retarget needs bucket set on object

When a bucket list is retargeted to an object get, then the object may
not yet have it's bucket set.  Ensure the bucket is set on the object.

Fixes: https://tracker.ceph.com/issues/56029
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoMerge pull request #46709 from zdover23/wip-doc-2022-06-15-backport-quincy-46705...
zdover23 [Thu, 16 Jun 2022 06:04:08 +0000 (16:04 +1000)]
Merge pull request #46709 from zdover23/wip-doc-2022-06-15-backport-quincy-46705-master-to-main-dev-guide-merging

quincy: doc/dev_guide: s/master/main in merging.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev_guide: s/master/main in merging.rst 46709/head
Zac Dover [Wed, 15 Jun 2022 21:54:31 +0000 (07:54 +1000)]
doc/dev_guide: s/master/main in merging.rst

This changes the branch name "master" to the branch name
"main" in merging.rst.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 52da71f0ab0a4606a73be749b3d983969bd34972)

3 years agoMerge pull request #46703 from zdover23/wip-doc-2022-06-15-backport-quincy-46678...
zdover23 [Thu, 16 Jun 2022 01:13:35 +0000 (11:13 +1000)]
Merge pull request #46703 from zdover23/wip-doc-2022-06-15-backport-quincy-46678-master-to-main-dev-guide-basic-workflow

quincy: doc/dev: s/master/main/ in basic workflow

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agotools: ceph-objectstore-tool is able to trim pg log dups' entries. 46706/head
Radosław Zarzyński [Sat, 11 Jun 2022 19:29:29 +0000 (21:29 +0200)]
tools: ceph-objectstore-tool is able to trim pg log dups' entries.

The main assumption is trimming just dups doesn't need any update
to the corresponding pg_info_t.

Testing:

1. cluster without the autoscaler
```
rzarz@ubulap:~/dev/ceph/build$ MON=1 MGR=1 OSD=3 MGR=1 MDS=0 ../src/vstart.sh -l -b -n -o "osd_pg_log_dups_tracked=3000000" -o "osd_pool_default_pg_autoscale_mode=off"
```

2. 8 PGs in the testing pool.
```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph osd pool create test-pool 8 8
```

3. Provisioning dups with rados bench
```
bin/rados bench -p test-pool 300 write -b 4096  --no-cleanup
...
Total time run:         300.034
Total writes made:      103413
Write size:             4096
Object size:            4096
Bandwidth (MB/sec):     1.34637
Stddev Bandwidth:       0.589071
Max bandwidth (MB/sec): 2.4375
Min bandwidth (MB/sec): 0.902344
Average IOPS:           344
Stddev IOPS:            150.802
Max IOPS:               624
Min IOPS:               231
Average Latency(s):     0.0464151
Stddev Latency(s):      0.0183627
Max latency(s):         0.0928424
Min latency(s):         0.0131932
```

4. Killing osd.0
```
rzarz@ubulap:~/dev/ceph/build$ kill 2572129 # pid of osd.0
```

5. Listing PGs on osd.0 and calculating number of pg log's entries and
dups:

```
rzarz@ubulap:~/dev/ceph/build$ bin/ceph-objectstore-tool --data-path dev/osd0 --op list-pgs --pgid 2.c > osd0_pgs.txt
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
3100
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

6. Trimming dups
```
rzarz@ubulap:~/dev/ceph/build$ CEPH_ARGS="--osd_pg_log_dups_tracked 2500 --osd_pg_log_trim_max=100" bin/ceph-objectstore-tool --data-path dev/osd0 --op trim-pg-log-dups --pgid 2.7
max_dup_entries=2500 max_chunk_size=100
Removing keys dup_0000000020.00000000000000000001 - dup_0000000020.00000000000000000100
Removing keys dup_0000000020.00000000000000000101 - dup_0000000020.00000000000000000200
Removing keys dup_0000000020.00000000000000000201 - dup_0000000020.00000000000000000300
Removing keys dup_0000000020.00000000000000000301 - dup_0000000020.00000000000000000400
Removing keys dup_0000000020.00000000000000000401 - dup_0000000020.00000000000000000500
Removing keys dup_0000000020.00000000000000000501 - dup_0000000020.00000000000000000600
Finished trimming, now compacting...
Finished trimming pg log dups
```

7. Checking number of pg log's entries and dups
```
rzarz@ubulap:~/dev/ceph/build$ for pgid in `cat osd0_pgs.txt`; do echo $pgid; bin/ceph-objectstore-tool --data-path dev/osd0 --op log --pgid $pgid | jq '(.pg_log_t.log|length),(.pg_log_t.dups|length)'; done
2.7
10020
2500
2.6
10100
3000
2.3
10012
2800
2.1
10049
2900
2.2
10057
2700
2.0
10027
2900
2.5
10077
2700
2.4
10072
2900
1.0
97
0
```

Fixes: https://tracker.ceph.com/issues/53729
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit a2190f901abf2fed20c65e59f53b38c10545cb5a)

3 years agoMerge pull request #46661 from zdover23/wip-doc-2022-06-13-backport-quincy-46651...
zdover23 [Wed, 15 Jun 2022 21:47:28 +0000 (07:47 +1000)]
Merge pull request #46661 from zdover23/wip-doc-2022-06-13-backport-quincy-46651-master-to-main

quincy: doc/dev: s/master/main/ essentials.rst dev guide

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46665 from zdover23/wip-doc-2022-06-13-backport-quincy-46659...
zdover23 [Wed, 15 Jun 2022 21:43:57 +0000 (07:43 +1000)]
Merge pull request #46665 from zdover23/wip-doc-2022-06-13-backport-quincy-46659-hardware-recs-polish

quincy: doc/start: Polish network section of hardware-recommendations.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/dev: s/master/main/ in basic workflow 46703/head
Zac Dover [Tue, 14 Jun 2022 22:15:33 +0000 (08:15 +1000)]
doc/dev: s/master/main/ in basic workflow

This PR changes "master" to "main" in the
basic_workflow.rst file. I have even changed
"master" to "main" in some terminal output from
several years ago. This isn't historically ac-
curate, of course, but my hope is that this change
will prevent someone in the future from being con-
fused about why an antiquated branch name is ref-
erred to.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit f5cfc22445a3e454e572873cdcfbc1852a38aa17)

3 years agomgr/dashboard: test througput deployment option 46686/head
Pere Diaz Bou [Fri, 6 May 2022 08:48:32 +0000 (10:48 +0200)]
mgr/dashboard: test througput deployment option

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit d58b9499208cd611897518009495f9e80515349d)

3 years agomgr/dashboard: throughput optimized option enabled
Pere Diaz Bou [Tue, 3 May 2022 12:28:22 +0000 (14:28 +0200)]
mgr/dashboard: throughput optimized option enabled

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit f2474bcb767893dc750b8f1231b4583925f9bfb1)

3 years agomgr/dashboard: OSD Creation Workflow initial works
Nizamudeen A [Tue, 22 Feb 2022 10:21:03 +0000 (15:51 +0530)]
mgr/dashboard: OSD Creation Workflow initial works

Introducing the Cost/Capacity Optimized deployment option
Used bootstrap accordion
Adapted the e2e but not written new tests for the deployment option

Fixes: https://tracker.ceph.com/issues/54340
Fixes: https://tracker.ceph.com/issues/54563
Signed-off-by: Nizamudeen A <nia@redhat.com>
Signed-off-by: Sarthak0702 <sarthak.0702@gmail.com>
(cherry picked from commit 6c2dcb740efb793a3f6ef593793151a34c19ca01)

3 years agomgr/dashboard: retrieve disk status
Pere Diaz Bou [Fri, 4 Mar 2022 08:58:36 +0000 (09:58 +0100)]
mgr/dashboard: retrieve disk status

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit a1d1c853a5e4ff9a317591b99b75e005ccc862c9)

3 years agodoc/start: Polish network section of hardware-recommendations.rst 46665/head
Anthony D'Atri [Mon, 13 Jun 2022 23:06:12 +0000 (16:06 -0700)]
doc/start: Polish network section of hardware-recommendations.rst

Harmonize network throughput notation, minor tweaks to wording.
Followup to #46637

Signed-off-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
(cherry picked from commit 2eb173fef9dc9ff34078b0ae13e9fcc398cdbaa3)

3 years agodoc/dev: s/master/main/ essentials.rst dev guide 46661/head
Zac Dover [Mon, 13 Jun 2022 21:48:46 +0000 (07:48 +1000)]
doc/dev: s/master/main/ essentials.rst dev guide

This PR changes all reference to the "master" branch
to references to the "main" branch (because we renamed
"master" to main", and the docs now need to reflect that).

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 728b8f26746c733988302d52cce4c46ebc607f63)

3 years agoMerge pull request #46652 from zdover23/wip-doc-2022-06-13-backport-46637-quincy...
zdover23 [Tue, 14 Jun 2022 06:23:36 +0000 (16:23 +1000)]
Merge pull request #46652 from zdover23/wip-doc-2022-06-13-backport-46637-quincy-hardware-recs-network

quincy: backport doc/start: rewrite hardware-recs networks section

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46655 from zdover23/wip-doc-2022-06-13-backport-46583-quincy...
zdover23 [Tue, 14 Jun 2022 06:18:13 +0000 (16:18 +1000)]
Merge pull request #46655 from zdover23/wip-doc-2022-06-13-backport-46583-quincy-hardware-recs-osd-and-mds-acros

quincy: doc/start: make OSD and MDS structures parallel

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46658 from zdover23/wip-doc-2022-06-13-backport-46633-quincy...
zdover23 [Tue, 14 Jun 2022 06:15:23 +0000 (16:15 +1000)]
Merge pull request #46658 from zdover23/wip-doc-2022-06-13-backport-46633-quincy-start-intro-crush-para-rewrite

quincy: doc/start: rewrite CRUSH para

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/start: rewrite CRUSH para 46658/head
Zac Dover [Sun, 12 Jun 2022 23:41:28 +0000 (09:41 +1000)]
doc/start: rewrite CRUSH para

This PR supersedes https://github.com/ceph/ceph/pull/46584
and makes changes suggested by Anthony D'Atri that improve
the coherence and consistency of the paragraph that explains
the basics of the CRUSH algorithm.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit ba1a85b292fcd30020897a486cb452381c998690)

3 years agodoc/start: make OSD and MDS structures parallel 46655/head
Zac Dover [Wed, 8 Jun 2022 19:19:16 +0000 (05:19 +1000)]
doc/start: make OSD and MDS structures parallel

This PR makes the "Ceph OSDs" and "MDSs" bullet points
parallel by naming "object storage daemon" before referring
to the (admittedly more common and colloquial, but surely
unknown to people who genuinely require a document called
'Intro') acronym "OSD".

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 4f6edb92b9c4b7c47354d8ad66fdee6c06389541)

3 years agodoc/start: rewrite hardware-recs networks section 46652/head
Zac Dover [Mon, 13 Jun 2022 04:34:36 +0000 (14:34 +1000)]
doc/start: rewrite hardware-recs networks section

This rewrites the first two-thirds of the "Networks"
section of the Hardware Recommendations page in the
Intro to Ceph document. I have tried to divide the
techincal content in this section into subsections
that foreground the various subjects covered.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 778d3c0b59148e2a3b6bb662437778692b1988e3)

3 years agoMerge pull request #46577 from cbodley/wip-quincy-qa-smoke-s3tests
Yuri Weinstein [Mon, 13 Jun 2022 16:01:03 +0000 (09:01 -0700)]
Merge pull request #46577 from cbodley/wip-quincy-qa-smoke-s3tests

qa/smoke: use ceph-quincy branch of s3tests

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
3 years agoMerge pull request #46607 from rzarzynski/wip-55982-quincy
Yuri Weinstein [Fri, 10 Jun 2022 17:20:42 +0000 (10:20 -0700)]
Merge pull request #46607 from rzarzynski/wip-55982-quincy

quincy: osd: log the number of 'dups' entries in a PG Log

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46605 from rzarzynski/wip-55981-quincy
Yuri Weinstein [Fri, 10 Jun 2022 17:20:03 +0000 (10:20 -0700)]
Merge pull request #46605 from rzarzynski/wip-55981-quincy

quincy: revert backport of #45529

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoosd: log the number of 'dups' entries in a PG Log 46607/head
Radoslaw Zarzynski [Thu, 9 Jun 2022 18:44:10 +0000 (18:44 +0000)]
osd: log the number of 'dups' entries in a PG Log

We really want to have the ability to know how many
entries `PGLog::IndexedLog::dups` has inside.
The current ways are either invasive (stopping an OSD)
or indirect (examination of `dump_mempools`).

The code comes from Nitzan Mordechai (part of
ede37edd79a9d5560dfb417ec176327edfc0e4a3).

Fixes: https://tracker.ceph.com/issues/55982
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit 8f1c8a7309976098644bb978d2c1095089522846)

3 years agoRevert "tools/ceph_objectstore_took: Add duplicate entry trimming" 46605/head
Radoslaw Zarzynski [Thu, 9 Jun 2022 20:10:31 +0000 (20:10 +0000)]
Revert "tools/ceph_objectstore_took: Add duplicate entry trimming"

This reverts commit 5245fb33dd02e53cf0ef5d2f7be5904b6fbe63ce.

Although the chunking in off-line `dups` trimming (via COT) seems
fine, the `ceph-objectstore-tool` is a client of `trim()` of
`PGLog::IndexedLog` which means than a partial revert is not
possible without extensive changes.

The backport ticket is: https://tracker.ceph.com/issues/55981

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoRevert "osd/PGLog.cc: Trim duplicates by number of entries"
Radoslaw Zarzynski [Thu, 9 Jun 2022 18:22:45 +0000 (18:22 +0000)]
Revert "osd/PGLog.cc: Trim duplicates by number of entries"

This reverts commit 3ff0df6a28a1d9e197bdba40be7126fed8a14ae9
which is the in-OSD part of the fix for accumulation of `dup`
entries in a PG Log. Brainstorming it has brought questions
on the OSD's behaviour during an upgrade if there are tons of
dups in the log. What must be double-checked before bringing
it back is ensuring we chunk the deletions properly to not
impose OOMs / stalls in, to exemplify, RocksDB.

The backport ticket is: https://tracker.ceph.com/issues/55981

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoqa/smoke: use ceph-quincy branch of s3tests 46577/head
Casey Bodley [Wed, 8 Jun 2022 18:46:57 +0000 (14:46 -0400)]
qa/smoke: use ceph-quincy branch of s3tests

Signed-off-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46544 from yaarith/rook-telemetry-release-notes-quincy
Neha Ojha [Wed, 8 Jun 2022 14:34:09 +0000 (07:34 -0700)]
Merge pull request #46544 from yaarith/rook-telemetry-release-notes-quincy

quincy: PendingReleaseNotes: add a note about Rook telemetry

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46508 from nmshelke/wip-55797-quincy
Yuri Weinstein [Wed, 8 Jun 2022 14:08:40 +0000 (07:08 -0700)]
Merge pull request #46508 from nmshelke/wip-55797-quincy

quincy: mgr/volumes: set, get, list and remove metadata of snapshot

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46449 from zdover23/wip-doc-2022-05-31-backport-46430-quincy
zdover23 [Tue, 7 Jun 2022 18:19:17 +0000 (04:19 +1000)]
Merge pull request #46449 from zdover23/wip-doc-2022-05-31-backport-46430-quincy

quincy: doc/start: update "memory" in hardware-recs.rst

Reviewed-by: Mark Nelson <mnelson@redhat.com>
3 years agoMerge pull request #46492 from kalebskeithley/wip-55810-quincy
Yuri Weinstein [Tue, 7 Jun 2022 14:55:18 +0000 (07:55 -0700)]
Merge pull request #46492 from kalebskeithley/wip-55810-quincy

quincy: rocksdb: build with rocksdb-7.y.z

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46497 from lxbsz/wip-55658
Yuri Weinstein [Tue, 7 Jun 2022 13:57:30 +0000 (06:57 -0700)]
Merge pull request #46497 from lxbsz/wip-55658

quincy: mds: trigger to flush the mdlog in handle_find_ino()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46496 from lxbsz/wip-55661
Yuri Weinstein [Tue, 7 Jun 2022 13:56:59 +0000 (06:56 -0700)]
Merge pull request #46496 from lxbsz/wip-55661

quincy: qa: add filesystem/file sync stuck test support

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46476 from lxbsz/wip-55447
Yuri Weinstein [Tue, 7 Jun 2022 13:54:30 +0000 (06:54 -0700)]
Merge pull request #46476 from lxbsz/wip-55447

quincy: client: add option to disable collecting and sending metrics

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 years agoMerge pull request #46175 from cfsnyder/wip-55441-quincy
Yuri Weinstein [Tue, 7 Jun 2022 13:53:46 +0000 (06:53 -0700)]
Merge pull request #46175 from cfsnyder/wip-55441-quincy

quincy: os/bluestore: set upper and lower bounds on rocksdb omap iterators

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #46542 from idryomov/wip-rbd-codeowners-quincy
Ilya Dryomov [Tue, 7 Jun 2022 09:49:44 +0000 (11:49 +0200)]
Merge pull request #46542 from idryomov/wip-rbd-codeowners-quincy

quincy: CODEOWNERS: add RBD team

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoPendingReleaseNotes: add a note about Rook telemetry 46544/head
Yaarit Hatuka [Mon, 6 Jun 2022 19:34:19 +0000 (19:34 +0000)]
PendingReleaseNotes: add a note about Rook telemetry

Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
(cherry picked from commit 1742d1b36555684aa7a75cbaa9f128131af9b6a7)

Conflicts:
Needed to reorder notes to appear in the 17.2.1 section.

3 years agoCODEOWNERS: add RBD team 46542/head
Ilya Dryomov [Wed, 1 Jun 2022 07:22:15 +0000 (09:22 +0200)]
CODEOWNERS: add RBD team

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 00a44f1c6b3c5270f1c9d75cf6dcac3f0d470fa9)

3 years agoMerge pull request #46519 from neha-ojha/wip-46415-quincy
Neha Ojha [Mon, 6 Jun 2022 16:38:54 +0000 (09:38 -0700)]
Merge pull request #46519 from neha-ojha/wip-46415-quincy

quincy: .github/CODEOWNERS: tag core devs on core PRs

Reviewed-by: Laura Flores lflores@redhat.com
3 years agoMerge pull request #46469 from gregsfortytwo/wip-55746-quincy
Yuri Weinstein [Mon, 6 Jun 2022 14:58:10 +0000 (07:58 -0700)]
Merge pull request #46469 from gregsfortytwo/wip-55746-quincy

quincy: Implement CIDR blocklisting

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agoMerge pull request #46468 from ljflores/wip-55811-quincy
Yuri Weinstein [Mon, 6 Jun 2022 14:56:53 +0000 (07:56 -0700)]
Merge pull request #46468 from ljflores/wip-55811-quincy

quincy: os/bluestore: turn `bluestore zero block detection` off by default

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #46418 from ronen-fr/wip-rf-46320-quincy
Yuri Weinstein [Mon, 6 Jun 2022 14:55:44 +0000 (07:55 -0700)]
Merge pull request #46418 from ronen-fr/wip-rf-46320-quincy

quincy: osd/scrub: restart snap trimming after a failed scrub

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years ago.github/CODEOWNERS: tag core devs on core PRs 46519/head
Neha Ojha [Fri, 27 May 2022 19:34:57 +0000 (19:34 +0000)]
.github/CODEOWNERS: tag core devs on core PRs

Start with everything that is present under core in .github/labeler.yml.

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 8303c6b911154ee936adb46e7c3491b174d22df8)

3 years agoMerge pull request #46486 from yaarith/wip-55816-quincy
Neha Ojha [Fri, 3 Jun 2022 20:15:12 +0000 (13:15 -0700)]
Merge pull request #46486 from yaarith/wip-55816-quincy

quincy: mgr/telemetry: add Rook data

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #46453 from rhcs-dashboard/wip-55115-quincy
Ernesto Puerta [Fri, 3 Jun 2022 14:49:02 +0000 (16:49 +0200)]
Merge pull request #46453 from rhcs-dashboard/wip-55115-quincy

quincy: mgr/dashboard:  don't log 3xx as errors

Reviewed-by: nSedrickm <NOT@FOUND>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agoqa: set, get, list and remove custom metadata for snapshot 46508/head
Nikhilkumar Shelke [Thu, 28 Apr 2022 18:38:05 +0000 (00:08 +0530)]
qa: set, get, list and remove custom metadata for snapshot

Following test are added:
1. Set custom metadata for subvolume snapshot.
2. Set custom metadata for subvolume snapshot(Idempotency).
3. Get custom metadata for specified key.
4. Get custom metadata if specified key not exist (Expecting error ENOENT).
5. Get custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
6. Update value for existing key in custom metadata.
7. List custom metadata of subvolume snapshot.
8. List custom metadata of subvolume snapshot if no any key-value is added (Expect empty json/dictionary)
9. Remove custom metadata for specified key.
10. Remove custom metadata if specified key not exist (Expecting error ENOENT).
11. Remove custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
12. Remove custom metadata with --force option.
13. Remove custom metadata with --force option if specified key not exist (Expecting command to succeed because of '--force' option)
14. Remove subvolume snapshot and verify whether metadata for snapshot is removed or not

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 6fd28cc9d67b96ba87f0dffbf41d626229e904e3)

3 years agodocs: set, get, list and remove custom metadata for snapshot
Nikhilkumar Shelke [Wed, 27 Apr 2022 16:41:07 +0000 (22:11 +0530)]
docs: set, get, list and remove custom metadata for snapshot

Set custom metadata on the snapshot as a key-value pair using
    $ ceph fs subvolume snapshot metadata set <vol_name> <subvol_name> <snap_name> <key_name> <value> [--group_name <subvol_group_name>]
    note: If the key_name already exists then the old value will get replaced by the new value.
    note: The key_name and value should be a string of ASCII characters (as specified in python's string.printable). The key_name is case-insensitive and always stored in lower case.
    note: Custom metadata on a snapshots is not preserved when snapshotting the subvolume, and hence, is also not preserved when cloning the subvolume snapshot.

Get custom metadata set on the snapshot using the metadata key::
    $ ceph fs subvolume snapshot metadata get <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>]

List custom metadata (key-value pairs) set on the snapshot using::
    $ ceph fs subvolume snapshot metadata ls <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]

Remove custom metadata set on the snapshot using the metadata key::
    $ ceph fs subvolume snapshot metadata rm <vol_name> <subvol_name> <snap_name> <key_name> [--group_name <subvol_group_name>] [--force]
    Using the '--force' flag allows the command to succeed that would otherwise fail if the metadata key did not exist.

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 59a0cbc14bf2832080e983729de5c462ddc70bb3)

3 years agomgr/volumes: set, get, list and remove custom metadata for snapshot
Nikhilkumar Shelke [Wed, 27 Apr 2022 16:20:33 +0000 (21:50 +0530)]
mgr/volumes: set, get, list and remove custom metadata for snapshot

If CephFS in ODF configured in external mode, user like to use
subvolume snapshot metadata to store some Openshift specific
information, as the PVC/PV/namespace the subvolumes/snapshot
are coming from. For RBD volumes, it's possible to add metadata
information to the images using the 'rbd image-meta' command.
However, this feature is not available for CephFS volumes.
We'd like to request this capability.

Adding following commands:
    ceph fs subvolume snapshot metadata set <vol_name> <sub_name> <snap_name> <key_name> <value> [<group_name>]
    ceph fs subvolume snapshot metadata get <vol_name> <sub_name> <snap_name> <key_name> [<group_name>]
    ceph fs subvolume snapshot metadata ls <vol_name> <sub_name> <snap_name> [<group_name>]
    ceph fs subvolume snapshot metadata rm <vol_name> <sub_name> <snap_name> <key_name> [<group_name>] [--force]

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
(cherry picked from commit 559222cfe8d552cd2d7aef7361de4140820ae74a)

3 years agoMerge pull request #46503 from rhcs-dashboard/wip-55831-quincy
Ernesto Puerta [Thu, 2 Jun 2022 17:06:51 +0000 (19:06 +0200)]
Merge pull request #46503 from rhcs-dashboard/wip-55831-quincy

quincy: qa: fix teuthology master branch ref

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
Reviewed-by: neha-ojha <NOT@FOUND>
3 years agoqa: fix teuthology master branch ref 46503/head
Ernesto Puerta [Thu, 2 Jun 2022 10:27:02 +0000 (12:27 +0200)]
qa: fix teuthology master branch ref

Fixes: https://tracker.ceph.com/issues/55826
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit e91773df68c286266a2855e69bf542b4c73379d9)

3 years agomds: trigger to flush the mdlog in handle_find_ino() 46497/head
Xiubo Li [Tue, 19 Apr 2022 06:21:49 +0000 (14:21 +0800)]
mds: trigger to flush the mdlog in handle_find_ino()

If the the CInode was just created by using openc in current
auth MDS, but the client just sends a getattr request to another
replica MDS. Then here it will make a path of '#INODE-NUMBER'
only because the CInode hasn't been linked yet, and the replica
MDS will keep retrying until the auth MDS flushes the mdlog and
the C_MDS_openc_finish and link_primary_inode are called at most
5 seconds later.

Fixes: https://tracker.ceph.com/issues/55240
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 5d6dd5d1acf94eade4a2c0f48777c95473d454ae)

3 years agoqa: add file/filesystem sync crash test case 46496/head
Xiubo Li [Thu, 14 Apr 2022 03:50:19 +0000 (11:50 +0800)]
qa: add file/filesystem sync crash test case

This is one test case for the possible kernel crash bug when doing
the file sync or filesystem sync.

Fixes: https://tracker.ceph.com/issues/55329
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit cd3e903b0c525c7946794b5fbf002da482b3b4bc)

3 years agoqa: add file sync stuck test support
Xiubo Li [Tue, 12 Apr 2022 11:40:02 +0000 (19:40 +0800)]
qa: add file sync stuck test support

This will test the file sync of a directory, which maybe stuck for
at most 5 seconds. This was because the related code will wait for
all the unsafe requests to get safe reply from MDSes, but the MDSes
just think that it's unnecessary to flush the mdlog immediately
after early reply, and the mdlog will be flushed every 5 seconds
in the tick thread.

This should have been fixed in kclient and libcephfs by triggering
mdlog flush before waiting requests' safe reply.

Fixes: https://tracker.ceph.com/issues/55283
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 3db3b4e2a4b853192c5b30c9594947ba45f96e03)

3 years agoqa: add filesystem sync stuck test support
Xiubo Li [Tue, 12 Apr 2022 04:37:13 +0000 (12:37 +0800)]
qa: add filesystem sync stuck test support

This will test the sync of the filesystem, which maybe stuck for
at most 5 seconds. This was because the related code will wait
for all the unsafe requests to get safe reply from MDSes, but the
MDSes just think that it's unnecessary to flush the mdlog immediately
after early reply, and the mdlog will be flushed every 5 seconds
in the tick thread.

This should have been fixed in kclient and libcephfs by triggering
mdlog flush before waiting requests' safe reply.

Fixes: https://tracker.ceph.com/issues/55283
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit b6fc5480f6ba6352fa72062e1376d0dd6b9074cd)

3 years agoMerge pull request #46491 from ceph/quincy-nobranch
David Galloway [Wed, 1 Jun 2022 20:19:49 +0000 (16:19 -0400)]
Merge pull request #46491 from ceph/quincy-nobranch

quincy: qa: remove .teuthology_branch file

3 years agorocksdb: build with rocksdb-7.y.z 46492/head
Kaleb S. KEITHLEY [Mon, 23 May 2022 11:41:26 +0000 (07:41 -0400)]
rocksdb: build with rocksdb-7.y.z

RocksDB 7, specifically 7.2.2 has landed in Fedora 37/rawhide.

https://tracker.ceph.com/issues/55730

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
(cherry picked from commit eea10281e6f4078f261b05b6bd9c9c9aec129201)

3 years agoqa: remove .teuthology_branch file 46491/head
Jeff Layton [Wed, 1 Jun 2022 18:26:33 +0000 (14:26 -0400)]
qa: remove .teuthology_branch file

This was originally added to help support the py2 -> py3 conversion.
That's long since complete so we should be able to just remove this file
now.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 81430de9b70be16a439bf2445f3345b83035a861)

3 years agoosd/scrub: restart snap trimming after a failed scrub 46418/head
Ronen Friedman [Tue, 17 May 2022 16:13:59 +0000 (16:13 +0000)]
osd/scrub: restart snap trimming after a failed scrub

A followup to PR#45640.
In PR#45640 snap trimming was restarted (if blocked) after all
successful scrubs, and after most scrub failures. Still, a few
failure scenarios did not handle snaptrim restart correctly.

The current PR cleans up and fixes the interaction between
scrub initiation/termination (for whatever cause) and snap
trimming.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 290e744a9b6c64f3da805056625b963f0eedaf33)

3 years agomgr/telemetry: add Rook data 46486/head
Yaarit Hatuka [Wed, 1 Jun 2022 04:46:17 +0000 (04:46 +0000)]
mgr/telemetry: add Rook data

Add the first Rook data collection to telemetry's basic channel.

We choose to nag with this collection since we wish to know the volume
of Rook deployments in the wild.

The next Rook collections should have consecutive numbers (basic_rook_v02,
basic_rook_v03, ...).

See tracker below for more details.

Fixes: https://tracker.ceph.com/issues/55740
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
(cherry picked from commit 63f5dcdb520ea4f5e0400e9c6d9f0da29998e437)

3 years agoMerge pull request #46446 from rhcs-dashboard/wip-54585-quincy
Ernesto Puerta [Wed, 1 Jun 2022 16:43:21 +0000 (18:43 +0200)]
Merge pull request #46446 from rhcs-dashboard/wip-54585-quincy

quincy: mgr/dashboard: fix columns in host table  with NaN Undefined

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: nSedrickm <NOT@FOUND>
3 years agoMerge pull request #46455 from rhcs-dashboard/wip-55589-quincy
Ernesto Puerta [Wed, 1 Jun 2022 16:35:28 +0000 (18:35 +0200)]
Merge pull request #46455 from rhcs-dashboard/wip-55589-quincy

quincy: mgr/dashboard: WDC multipath bug fixes

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
3 years agoPendingReleaseNotes: add note about `bluestore_zero_block_detection` config option 46468/head
Laura Flores [Fri, 27 May 2022 18:28:19 +0000 (13:28 -0500)]
PendingReleaseNotes: add note about `bluestore_zero_block_detection` config option

Signed-off-by: Laura Flores <lflores@redhat.com>
(cherry picked from commit fce2a7782d6bddada9258e5028e6459e72b4381e)

Conflicts:
PendingReleaseNotes
- The cherry-pick applied cleanly, but some extra release notes about >=18.0.0
          still was added that I had to remove.

3 years agoqa: drop get_blocklisted_instances in TestMirroring 46469/head
Jos Collin [Fri, 6 May 2022 10:58:23 +0000 (16:28 +0530)]
qa: drop get_blocklisted_instances in TestMirroring

drop get_blocklisted_instances in TestMirroring and use
is_addr_blocklisted instead.

Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 0e66107c89a127bec4f1a3c83894ff858919c8f3)

3 years agoqa: fix is_addr_blocklisted() to get blocklisted clients from 'osd dump'
Jos Collin [Wed, 4 May 2022 13:03:12 +0000 (18:33 +0530)]
qa: fix is_addr_blocklisted() to get blocklisted clients from 'osd dump'

By the introduction of range blocklist, the 'blocklist ls' command outputs
two lists. It's also straightforward to get the blocklisted clients directly
from 'osd dump' to avoid regression.

Fixes: https://tracker.ceph.com/issues/55516
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 47de5d79b8190458847072aae1c29db7d6a9b66b)

3 years agoclient: force send global open_files/metadata metrics 46476/head
Xiubo Li [Thu, 5 May 2022 02:22:04 +0000 (10:22 +0800)]
client: force send global open_files/metadata metrics

This change will fix two missing fixes introduce by commit
e9a26c551c763f75a403ff26f6304d5c10f2ca38.

Fixes: https://tracker.ceph.com/issues/54411
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a328d3264a0b64c03cf90c2d39f37c6962fa45cb)

Conflicts:
          src/client/Client.cc

3 years agomds, client: only send the metrices supported by MDSes
Xiubo Li [Wed, 16 Mar 2022 09:15:57 +0000 (17:15 +0800)]
mds, client: only send the metrices supported by MDSes

For the old ceph clusters the clients won't send any metrics to
them as default unless they have backported this commit, but there
has one option 'client_collect_and_send_global_metrics' still could
be used to enable it manually.

This will fix the crash bug when upgrading from old ceph clusters,
which will crash the MDSes once they receive unknown metrics.

Fixes: https://tracker.ceph.com/issues/54411
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit e9a26c551c763f75a403ff26f6304d5c10f2ca38)

Conflicts:
          src/client/Client.cc

3 years agoclient: add option to enable and force collecting and sending metrics
Xiubo Li [Mon, 14 Mar 2022 06:29:34 +0000 (14:29 +0800)]
client: add option to enable and force collecting and sending metrics

To be careful to enable this because it may crash the old MDSes while
upgrading.

Fixes: https://tracker.ceph.com/issues/54411
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit beb9f1648101bd18f3619c9fc7e972fab34dfc85)

3 years agotest: use the same address input format as output will generate
Greg Farnum [Sat, 23 Apr 2022 00:00:59 +0000 (00:00 +0000)]
test: use the same address input format as output will generate

Otherwise, our grep fails!

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

3 years agotest: osd: add a /0 cidr test for 32-bit...
Greg Farnum [Thu, 21 Apr 2022 00:16:22 +0000 (00:16 +0000)]
test: osd: add a /0 cidr test for 32-bit...

...and make the OSDMap handle it.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit c454d0d1d3f6d4ea4962a746cbed20d1aa003f6e)

3 years agotest: add a /0 cidr test that blocklists EVERYTHING
Greg Farnum [Wed, 20 Apr 2022 15:59:01 +0000 (15:59 +0000)]
test: add a /0 cidr test that blocklists EVERYTHING

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 8244586cf57426fe4f493d855ba3dd95126ae0e7)

3 years agotest: add a 128-bit range blocklist test
Greg Farnum [Wed, 20 Apr 2022 15:06:33 +0000 (15:06 +0000)]
test: add a 128-bit range blocklist test

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 138daff1dcb35510c7444f803be7a55c62532f67)

3 years agotest: add 32-bit ipv4 and 64-bit ipv6 blocklist testing
Greg Farnum [Wed, 20 Apr 2022 14:51:09 +0000 (14:51 +0000)]
test: add 32-bit ipv4 and 64-bit ipv6 blocklist testing

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 6a997da13dd40d512a903036a487c8e0c4c59148)

3 years agotest: add a 30-bit range mask to ipv6 blocklisting tests
Greg Farnum [Wed, 20 Apr 2022 01:50:46 +0000 (01:50 +0000)]
test: add a 30-bit range mask to ipv6 blocklisting tests

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit f107f2124d94c35261f752d1f04f95875a7d05da)

3 years agotest: split up ip- and range-based blocklisting tests
Greg Farnum [Wed, 20 Apr 2022 00:38:21 +0000 (00:38 +0000)]
test: split up ip- and range-based blocklisting tests

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 42910b432d8a2f77f6443c99314b8a47fd2c87db)

3 years agotest: check range blocklist in cephtool/test.sh
Greg Farnum [Wed, 1 Dec 2021 16:18:50 +0000 (16:18 +0000)]
test: check range blocklist in cephtool/test.sh

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1ca89ca76dbbae355831dc81065f22e6eb7e37ca)

3 years agotest: fix negative blocklist tests
Greg Farnum [Wed, 1 Dec 2021 16:16:18 +0000 (16:16 +0000)]
test: fix negative blocklist tests

These tests are supposed to be validating we don't accept invalid IPs,
but they left out the "add" subcommand so they're all failing on that!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 824689217248128cec67317d1410624fd94d276c)

3 years agodoc: update blocklist doc for ranges and up-to-date-ness
Greg Farnum [Wed, 1 Dec 2021 16:10:03 +0000 (16:10 +0000)]
doc: update blocklist doc for ranges and up-to-date-ness

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit e15cfa7ecded4a43df9c127abbc79a0e19c6adc6)

3 years agotest: test OSDMap::is_blocklisted in unit tests
Greg Farnum [Tue, 30 Nov 2021 18:27:54 +0000 (18:27 +0000)]
test: test OSDMap::is_blocklisted in unit tests

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 952af3388466d530c6268ff9b98bcdd725cce738)

3 years agoosd: Check range_blocklist in is_blocklisted(): we actually blocklist ranges
Greg Farnum [Tue, 30 Nov 2021 18:29:46 +0000 (18:29 +0000)]
osd: Check range_blocklist in is_blocklisted(): we actually blocklist ranges

Carry a parallel map from cidr addresses to a new
range_bits class (stored entirely as ephemeral state) so that we
don't need to re-compute masks and bit mappings too often, and to
separate out the unpleasant ipv6 bit mapping logic. Then check
against those with range_bits::matches() the same way we check
for equality on specific-entity matches. Nice and simple loops!

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

3 years agomon: dump range blocklist when dumping regular blocklist
Greg Farnum [Tue, 16 Nov 2021 18:41:08 +0000 (18:41 +0000)]
mon: dump range blocklist when dumping regular blocklist

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit dc09905f1e95201ba8257b70c60c9985eee6ffdb)

3 years agoosdmap: convert get_blocklist() to provide the entity/IP and range blocklists
Greg Farnum [Tue, 2 Nov 2021 00:38:50 +0000 (00:38 +0000)]
osdmap: convert get_blocklist() to provide the entity/IP and range blocklists

Providing a non-range-aware blocklist accessor would just be
asking for trouble, so don't.

The ugly part of this is how the Objecter is currently just
throwing the range blocklist on the end of its own list. The in-tree
callers are okay with this, and I'd like to look at removing the
blocklist events API from librados entirely -- it exposes "OSD-only"
state to clients and, as evidenced by this patch series, is not
particularly stable.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 9c5e21a685b58e4be0360279d9d22efd513edab2)

3 years agomon: take blocklist ranges as a subcommand, not implicitly from address format
Greg Farnum [Wed, 8 Dec 2021 21:32:58 +0000 (21:32 +0000)]
mon: take blocklist ranges as a subcommand, not implicitly from address format

I discovered in testing with CephFS that this tends to interpret client IPs
(which don't have ports, but do have nonces) as invalid ranges. So give it
a separate input keyword that has to be applied first.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 73a1f1b51e586ff7476ff4f4c1682abd0a317074)

3 years agomon: check 'nonce' validity for cidr ranges
Greg Farnum [Mon, 15 Nov 2021 20:06:50 +0000 (20:06 +0000)]
mon: check 'nonce' validity for cidr ranges

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 5c903e5b0a48f60dcf644f83478f97136d7dc56c)

3 years agomon: trim range_blocklist alongside the regular one
Greg Farnum [Mon, 15 Nov 2021 20:42:35 +0000 (20:42 +0000)]
mon: trim range_blocklist alongside the regular one

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 4b08448131ff63213f65ac2c2454d53158663ca2)

3 years agomon: osdmon: simplify maybe_rm_from_pending_blocklists
Greg Farnum [Thu, 28 Oct 2021 23:04:23 +0000 (23:04 +0000)]
mon: osdmon: simplify maybe_rm_from_pending_blocklists

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 871427881a60f7a203d08373a1ae1e6db9e2976b)

3 years agomon: osdmon: allow users to enter range blocklists.
Greg Farnum [Thu, 28 Oct 2021 22:34:40 +0000 (22:34 +0000)]
mon: osdmon: allow users to enter range blocklists.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 93617f7f4c6ba3463ab4c6e2df3cc2df9b00fc12)

3 years agomon: osdmon: don't overwrite type for entity_addr_t which is a cidr range
Greg Farnum [Wed, 27 Oct 2021 21:06:37 +0000 (21:06 +0000)]
mon: osdmon: don't overwrite type for entity_addr_t which is a cidr range

Doing so makes it no longer a cidr range entity_addr_t.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 9a1a01f8814df175d2d2c7a81f701d161cb4bab8)

3 years agomon: osdmon: extract blocklist manipulation functions into lambdas
Greg Farnum [Thu, 28 Oct 2021 20:44:49 +0000 (20:44 +0000)]
mon: osdmon: extract blocklist manipulation functions into lambdas

I'm about to add new range blocklists that match the existing IP/entity
ones, and don't want to have separate update logic.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 37fbf121fa6ee76387f07b766bccab5e2b82bbc1)

3 years agoosdmap: store new range_blocklist, updated as we do the existing blocklist
Greg Farnum [Thu, 28 Oct 2021 22:00:27 +0000 (22:00 +0000)]
osdmap: store new range_blocklist, updated as we do the existing blocklist

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit c0b87d9aca6f61ffe726ce3407059c527b319cbe)

3 years agomsg: common: allow entity_addr_t to store a CIDR address range
Greg Farnum [Mon, 25 Oct 2021 19:53:04 +0000 (19:53 +0000)]
msg: common: allow entity_addr_t to store a CIDR address range

This required very little change to the existing code. Use with care, because
existing code expects an IP address instead of a range, but it saves on
writing a new parser.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 8941450ff17336b0ed60947e365a8bffcc4a32b0)

3 years agomds: Server: Simplify apply_blocklist and usage of the OSDMap's blocklist
Greg Farnum [Tue, 2 Nov 2021 00:34:34 +0000 (00:34 +0000)]
mds: Server: Simplify apply_blocklist and usage of the OSDMap's blocklist

This previoulsly re-implemented a bunch of the OSDMap::is_blocklisted()
function, and wasn't actually any faster to run -- the list of new blocklists
may be smaller than the full set, but OSDMap::blocklist is an unordered_map
of constant lookup time so it shouldn't slow things down. More importantly,
this is much simpler, less likely to be buggy from duplicate code, and lets
the MDS off the hook for dealing with range blocklisting.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 79f7576401cc9d857f84396314d7476336c0e271)