Repository navigation
osd: add pg-upmap-primary to clean_pg_upmaps - #62067
Conversation
c4487f1 to
21dba99
Compare
|
jenkins test api |
rzarzynski
left a comment
There was a problem hiding this comment.
LGTM. Just a nit. definitely not a blocking one.
| ldout(cct, 10) << __func__ << " cancel invalid pg_upmap_primaries entry " | ||
| << l->first << "->" << l->second | ||
| << dendl; | ||
| pending_inc->old_pg_upmap_primary.insert(pg); |
| set_up_map(); | ||
|
|
||
| // Build a CRUSH rule of type host | ||
| const int expected_host_num = 3; |
| nextmap.apply_incremental(cleanup_inc); | ||
|
|
||
| // Ensure stale pg_upmap_primary entries are removed | ||
| ASSERT_EQ(nextmap.get_num_pg_upmap_primaries(), 8); |
| nextmap.apply_incremental(cleanup_inc); | ||
|
|
||
| // Ensure stale pg_upmap_primary entries are removed | ||
| ASSERT_EQ(nextmap.get_num_pg_upmap_primaries(), 8); |
There was a problem hiding this comment.
This is OK. The only thing is that you create illegal pg_upmap_prims (where the prim is not in the acting set of the pg, which is blocked in the code). The clean command should also remove such records.
The "normal" path would in line 1423 take the secondary and not (primary + 1) % num_osds.
In addition I would add a test that creates illegal pg_primaries on purpose (where the primary is not in the PG) and see that the clean removes them (this can be done without changing the pg_num in te test process).
There was a problem hiding this comment.
Fixed now with reworked test
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
| @@ -114,6 +114,11 @@ void print_inc_upmaps(const OSDMap::Incremental& pending_inc, int fd, bool vstar | |||
| ss << prefix; | |||
| ss << cmd + " osd pg-upmap-primary " << i.first << " " << i.second << std::endl; | |||
| } | |||
| for (auto& i : pending_inc.old_pg_upmap_primary) { | |||
There was a problem hiding this comment.
Should you be removing the old pg-upmap-primary entries before adding the new ones? I'm guessing a pg could be on both lists? The code above for upmap-items and pg-upmap do deletes then adds.
There was a problem hiding this comment.
Correct, this is fixed!
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
21dba99 to
ec25029
Compare
This commit adds handling of pg_upmap_primary to `clean_pg_upmaps` so invalid mappings are properly removed. Invalid mappings occur when pools are deleted, the PG size is decreased, or an OSD is marked down/out. Test cases cover cases where: 1. PG num is reduced (all pg_upmap_primary mappings should be canceled) 2. An OSD outside of the up set has been mapped as the primary 3. An OSD is marked "out" 4. A mapping is redundant 5. A pool is deleted Run the unit test with: $ ninja unittest_osdmap $ ./bin/unittest_osdmap --gtest_filter=*CleanPGUpmapPrimaries* --debug_osd=10 Fixes: https://tracker.ceph.com/issues/67265 Signed-off-by: Laura Flores <[email protected]>
ec25029 to
e37d02a
Compare
|
jenkins test api |
| << "pg_upmap_primaries entry " | ||
| << k->first << "->" << k->second | ||
| << dendl; | ||
| pending_inc->new_pg_upmap_primary.erase(k); |
There was a problem hiding this comment.
My understanding: "To not add a new mapping".
| ldout(cct, 10) << __func__ << " cancel invalid pg_upmap_primaries entry " | ||
| << l->first << "->" << l->second | ||
| << dendl; | ||
| pending_inc->old_pg_upmap_primary.insert(pg); |
There was a problem hiding this comment.
"Te remove if already present".
|
|
||
| // Get the pool from the provided pool id | ||
| const pg_pool_t* pool = get_pg_pool(pid); | ||
| if (!pool) { |
There was a problem hiding this comment.
Yeah, no pool -> do not iterate over its PGs.
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
osd: add pg-upmap-primary to clean_pg_upmaps
This commit adds handling of pg_upmap_primary to
clean_pg_upmapsso invalid mappings are properly removed. Invalid mappings occur
when pools are deleted, the PG size is decreased, or an OSD is
marked down/out.
Test cases cover cases where:
Run the unit test with:
Fixes: https://tracker.ceph.com/issues/67265
Signed-off-by: Laura Flores [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition