Skip to content

nautilus: mgr/progress: make it so progress bar does not get stuck forever - #37589

Merged
yuriw merged 9 commits into
ceph:nautilusfrom
kamoltat:wip-ksirivad-nautilus-backports
Dec 14, 2020
Merged

yuriw merged 9 commits into
ceph:nautilusfrom
kamoltat:wip-ksirivad-nautilus-backports

Conversation

@kamoltat

@kamoltat kamoltat commented Oct 8, 2020 •

Copy link
Copy Markdown
Member

Fixing an issue with mgr/progress module, where the progress bar gets stuck forever, by back porting the relevant commits from master PRs:

#28368
#28498
#28695
#29111
#38107

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1826224

@kamoltat kamoltat added this to the nautilus milestone Oct 8, 2020
@kamoltat
kamoltat force-pushed the wip-ksirivad-nautilus-backports branch from 5167e32 to 5de899b Compare October 8, 2020 04:31
@neha-ojha
neha-ojha requested review from jdurgin and neha-ojha October 9, 2020 21:57

@neha-ojha neha-ojha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please use "git cherry-pick -x" to reference the original commits

@kamoltat

Copy link
Copy Markdown
Member Author

could you please use "git cherry-pick -x" to reference the original commits

Hi Neha, so I did use "git cherry-pick-x" for all the commits except the last commit 5de899b since that was changing some code to deal with merge conflicts

@smithfarm

Copy link
Copy Markdown
Contributor

@kamoltat Could you tell me which master PRs you are backporting here?

If you used git cherry-pick -x to create the commits, I don't understand why the commit messages are edited?

I guess this is your first backport... the Ceph project has so many backports, that if we allowed each backporter to prepare backporters in his/her own way, chaos would be the result.

Over years of backporting, we have developed a set of practices (we call them "cherry-picking rules"). These rules are relatively simple, but they do need to be followed to avoid the chaos. Please take a look:

https://github.com/ceph/ceph/blob/master/SubmittingPatches-backports.rst#cherry-picking-rules

Now, this particular backport appears to be cherry-picking commits from several PRs. Could you tell us the PR numbers? For example, I guess one of them must be #28368

@yuriw yuriw added nautilus-batch-1 nautilus point releases wip-yuri7-testing labels Oct 23, 2020
@yuriw

yuriw commented Oct 26, 2020

Copy link
Copy Markdown
Contributor

@smithfarm smithfarm changed the title Wip ksirivad nautilus backports nautilus: mgr/progress: make it so progress bar does not get stuck forever Oct 26, 2020
@kamoltat

Copy link
Copy Markdown
Member Author

wip-yuri7-testing-2020-10-26-0802-nautilus

@yuriw I can't access the trello board. Is there a way to invite me to the board? Thank you

@kamoltat

Copy link
Copy Markdown
Member Author

@kamoltat Could you tell me which master PRs you are backporting here?

If you used git cherry-pick -x to create the commits, I don't understand why the commit messages are edited?

I guess this is your first backport... the Ceph project has so many backports, that if we allowed each backporter to prepare backporters in his/her own way, chaos would be the result.

Over years of backporting, we have developed a set of practices (we call them "cherry-picking rules"). These rules are relatively simple, but they do need to be followed to avoid the chaos. Please take a look:

https://github.com/ceph/ceph/blob/master/SubmittingPatches-backports.rst#cherry-picking-rules

Now, this particular backport appears to be cherry-picking commits from several PRs. Could you tell us the PR numbers? For example, I guess one of them must be #28368

@smithfarm

#28368
db4596e
c612f71
9bf5bbf
#28498
fa18a71
29cb104
36af6ed
#28695
a7c9a3a

@smithfarm

Copy link
Copy Markdown
Contributor

@kamoltat Thanks! I added that information to the PR description.

@ideepika

ideepika commented Nov 11, 2020 •

Copy link
Copy Markdown
Member

@neha-ojha @kamoltat saw a failure related to progess module in teuthology tests, I suspect it might be something related, can you verify:
Thanks!

http://qa-proxy.ceph.com/teuthology/yuriw-2020-11-10_16:01:13-rados-wip-yuri7-testing-2020-11-09-0731-nautilus-distro-basic-smithi/5609289/teuthology.log
conn(0x7f42b40227d0 0x7f42b4024cd0 unknown :-1 s=CLOSED pgs=48 cs=0 l=1 rev1=1 rx=0 tx=0).stop
2020-11-10T23:57:01.390 INFO:teuthology.orchestra.run.smithi014.stderr:2020-11-10 23:57:01.392 7f42d6cfb700  1 --2- 172.21.15.14:0/1914796073 >> [v2:172.21.15.14:3301/0,v1:172.21.15.14:6790/0] conn(0x7f42d018d360 0x7f42d018b580 unknown :-1 s=CLOSED pgs=0 cs=0 l=1 rev1=1 rx=0 tx=0).stop
2020-11-10T23:57:01.390 INFO:teuthology.orchestra.run.smithi014.stderr:2020-11-10 23:57:01.392 7f42d6cfb700  1 -- 172.21.15.14:0/1914796073 >> 172.21.15.14:0/1914796073 conn(0x7f42d01981b0 msgr2=0x7f42d0180540 unknown :-1 s=STATE_NONE l=0).mark_down
2020-11-10T23:57:01.390 INFO:teuthology.orchestra.run.smithi014.stderr:2020-11-10 23:57:01.392 7f42d6cfb700  1 -- 172.21.15.14:0/1914796073 shutdown_connections
2020-11-10T23:57:01.390 INFO:teuthology.orchestra.run.smithi014.stderr:2020-11-10 23:57:01.392 7f42d6cfb700  1 -- 172.21.15.14:0/1914796073 wait complete.
2020-11-10T23:57:01.402 INFO:tasks.cephfs_test_runner:test_osd_came_back (tasks.mgr.test_progress.TestProgress) ... FAIL
2020-11-10T23:57:01.402 INFO:tasks.cephfs_test_runner:
2020-11-10T23:57:01.403 INFO:tasks.cephfs_test_runner:======================================================================
2020-11-10T23:57:01.403 INFO:tasks.cephfs_test_runner:FAIL: test_osd_came_back (tasks.mgr.test_progress.TestProgress)
2020-11-10T23:57:01.403 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-11-10T23:57:01.403 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-11-10T23:57:01.403 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri7-testing-2020-11-09-0731-nautilus/qa/tasks/mgr/test_progress.py", line 178, in test_osd_came_back
2020-11-10T23:57:01.404 INFO:tasks.cephfs_test_runner:    self.assertTrue(self._is_quiet())
2020-11-10T23:57:01.404 INFO:tasks.cephfs_test_runner:AssertionError: False is not true
2020-11-10T23:57:01.404 INFO:tasks.cephfs_test_runner:
2020-11-10T23:57:01.404 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-11-10T23:57:01.404 INFO:tasks.cephfs_test_runner:Ran 1 test in 68.711s
2020-11-10T23:57:01.405 INFO:tasks.cephfs_test_runner:
2020-11-10T23:57:01.405 INFO:tasks.cephfs_test_runner:FAILED (failures=1)
2020-11-10T23:57:01.405 INFO:tasks.cephfs_test_runner:
2020-11-10T23:57:01.405 INFO:tasks.cephfs_test_runner:======================================================================
2020-11-10T23:57:01.405 INFO:tasks.cephfs_test_runner:FAIL: test_osd_came_back (tasks.mgr.test_progress.TestProgress)
2020-11-10T23:57:01.406 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-11-10T23:57:01.406 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-11-10T23:57:01.406 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri7-testing-2020-11-09-0731-nautilus/qa/tasks/mgr/test_progress.py", line 178, in test_osd_came_back
2020-11-10T23:57:01.406 INFO:tasks.cephfs_test_runner:    self.assertTrue(self._is_quiet())
2020-11-10T23:57:01.406 INFO:tasks.cephfs_test_runner:AssertionError: False is not true
2020-11-10T23:57:01.407 INFO:tasks.cephfs_test_runner:
2020-11-10T23:57:01.407 ERROR:teuthology.run_tasks:Saw exception from tasks.
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_git_teuthology_master/teuthology/run_tasks.py", line 93, in run_tasks
    manager.__enter__()
  File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri7-testing-2020-11-09-0731-nautilus/qa/tasks/cephfs_test_runner.py", line 207, in task
    raise RuntimeError("Test failure: {0}".format(", ".join(bad_tests)))

http://qa-proxy.ceph.com/teuthology/yuriw-2020-11-10_16:01:13-rados-wip-yuri7-testing-2020-11-09-0731-nautilus-distro-basic-smithi/5609289/teuthology.log

@kamoltat

Copy link
Copy Markdown
Member Author

@ideepika Yes you're right, will investigate that right away. Thank you!

@ideepika

Copy link
Copy Markdown
Member

@kamoltat

kamoltat commented Nov 17, 2020 •

Copy link
Copy Markdown
Member Author

@kamoltat

Copy link
Copy Markdown
Member Author

jenkins test make check

@kamoltat
kamoltat force-pushed the wip-ksirivad-nautilus-backports branch from 674658e to b3b98f6 Compare November 18, 2020 12:59
@kamoltat

Copy link
Copy Markdown
Member Author

jenkins retest this please

@ideepika

Copy link
Copy Markdown
Member

@yuriw Seems like the extra cherry-pick commit fixed it, let me know if I need to run more tests
https://pulpito.ceph.com/ksirivad-2020-11-17_08:56:00-rados-wip-ksirivad-nautilus-backports-distro-basic-smithi/

This looks good! thanks @kamoltat !

add an if statement to only allow PGs to
only look at it's PG state when it's epoch
is greater than or equal to the OSDMap's
epoch.

cherry picked from commit 21e1cab

Signed-off-by: Kamoltat <[email protected]>
add a property in pg_update that gets the
(current) OSDMap when the event is
created, and compare PG epoch with
OSDMap epoch. Also made some changes
on the spacing of things.

(cherry picked from commit f618e56)

Signed-off-by: Kamoltat <[email protected]>
In the PgRecoveryEvent class created a
property call self._start_epoch, basically
the epoch of the current OSD. Then use
that propery in pg_update to only allow the
program to look at PG state only when
PG epoch >= start_epoch.

(cherry picked from commit d37e8a4)

Signed-off-by: Kamoltat <[email protected]>
Basically keeps track of affected PGs
similar to how funciton _osd_out works
but instead of tracking up+acting set
we only care about acting. Also made
a minor change on the function pg_update:
we consider pg to be complete when it
is active and clean and nothing else.
Removed the variable "unmoved" since
If the pg wasn't moved, we shouldn't
have an event for it in the first place.

(cherry picked from commit dd2c3f6)
Signed-off-by: Kamoltat <[email protected]>
Combine the functions _osd_in and _osd_out in
to a single function call _osd_in_out, which
has a parameter called marked (string) that
will indicate if the event is when an osd is
marked in or out. Consider only the 'acting'
set of an osd for both when 'in' and 'out'
event of the osd to calculate affected PGs

(cherry picked from commit 2046c25)
Signed-off-by: Kamoltat <[email protected]>
Added the check for osd_id to account for
the acting set of both the old and new maps
to cover both osd marked out and in
respectively

(cherry picked from commit 901a37f)

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
@kamoltat
kamoltat force-pushed the wip-ksirivad-nautilus-backports branch from b3b98f6 to d9b324e Compare November 21, 2020 06:50
@kamoltat

Copy link
Copy Markdown
Member Author

@yuriw @neha-ojha this PR looks good to me, let me know if I need to run any more tests or do anything further

@neha-ojha neha-ojha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swap the order of checking for complete event
when OSD is marked in and creating a
PG Recovery event so that the event
doesn't cancel itself.

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
(cherry picked from commit 93d4d9d)

Conflicts:
	src/pybind/mgr/progress/module.py - change self._events.item()
					    to list(self._events)
					  - add self.get("pg_ready")
Update the test suite to reflect a feature
change that has been merged to master in
progress module where you create an event
when an osd is marked in.

Fixes: http://tracker.ceph.com/issues/40618
with success QA run in sepia:
http://pulpito.ceph.com/kchai-2019-07-16_10:10:01-rados-master-distro-basic-mira/

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
(cherry picked from commit 5604ba4)

Conflicts:
	qa/tasks/mgr/test_progress.py - change `ev` to `new_event`
@kamoltat
kamoltat force-pushed the wip-ksirivad-nautilus-backports branch from d9b324e to 58f7f67 Compare November 26, 2020 06:08
@kamoltat

Copy link
Copy Markdown
Member Author

@neha-ojha done! and none of the commits needed to land on octopus since it already has all these commits in it.

@smithfarm
smithfarm removed their request for review November 30, 2020 14:52
@yuriw

yuriw commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

@ideepika

ideepika commented Dec 4, 2020 •

Copy link
Copy Markdown
Member

@kamoltat seeing:
http://qa-proxy.ceph.com/teuthology/yuriw-2020-12-02_16:10:23-rados-wip-yuri-testing-2020-12-01-0809-nautilus-distro-basic-smithi/5675715/teuthology.log

2020-12-02T17:34:24.526 INFO:tasks.cephfs_test_runner:
2020-12-02T17:34:24.527 INFO:tasks.cephfs_test_runner:======================================================================
2020-12-02T17:34:24.527 INFO:tasks.cephfs_test_runner:ERROR: test_osd_came_back (tasks.mgr.test_progress.TestProgress)
2020-12-02T17:34:24.527 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-12-02T17:34:24.527 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-12-02T17:34:24.528 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/mgr/test_progress.py", line 212, in test_osd_came_back
2020-12-02T17:34:24.528 INFO:tasks.cephfs_test_runner:    ev2 = self._simulate_back_in([0], ev1)
2020-12-02T17:34:24.528 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/mgr/test_progress.py", line 130, in _simulate_back_in
2020-12-02T17:34:24.529 INFO:tasks.cephfs_test_runner:    timeout=self.EVENT_CREATION_PERIOD)
2020-12-02T17:34:24.529 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/ceph_test_case.py", line 179, in wait_until_equal
2020-12-02T17:34:24.529 INFO:tasks.cephfs_test_runner:    elapsed, expect_val, val
2020-12-02T17:34:24.529 INFO:tasks.cephfs_test_runner:tasks.ceph_test_case.TestTimeoutError: Timed out after 5 seconds waiting for 1 (currently 0)
2020-12-02T17:34:24.530 INFO:tasks.cephfs_test_runner:
2020-12-02T17:34:24.530 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-12-02T17:34:24.530 INFO:tasks.cephfs_test_runner:Ran 1 test in 77.435s
2020-12-02T17:34:24.531 INFO:tasks.cephfs_test_runner:
2020-12-02T17:34:24.531 INFO:tasks.cephfs_test_runner:FAILED (errors=1)
2020-12-02T17:34:24.531 INFO:tasks.cephfs_test_runner:
2020-12-02T17:34:24.531 INFO:tasks.cephfs_test_runner:======================================================================
2020-12-02T17:34:24.532 INFO:tasks.cephfs_test_runner:ERROR: test_osd_came_back (tasks.mgr.test_progress.TestProgress)
2020-12-02T17:34:24.532 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2020-12-02T17:34:24.532 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2020-12-02T17:34:24.533 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/mgr/test_progress.py", line 212, in test_osd_came_back
2020-12-02T17:34:24.533 INFO:tasks.cephfs_test_runner:    ev2 = self._simulate_back_in([0], ev1)
2020-12-02T17:34:24.533 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/mgr/test_progress.py", line 130, in _simulate_back_in
2020-12-02T17:34:24.533 INFO:tasks.cephfs_test_runner:    timeout=self.EVENT_CREATION_PERIOD)
2020-12-02T17:34:24.534 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-yuri-testing-2020-12-01-0809-nautilus/qa/tasks/ceph_test_case.py", line 179, in wait_until_equal
2020-12-02T17:34:24.534 INFO:tasks.cephfs_test_runner:    elapsed, expect_val, val
2020-12-02T17:34:24.534 INFO:tasks.cephfs_test_runner:tasks.ceph_test_case.TestTimeoutError: Timed out after 5 seconds waiting for 1 (currently 0)

do we need 52fe9db as well?
can you take a look

@kamoltat

Copy link
Copy Markdown
Member Author

@ideepika you are right, good catch, thank you so much!

@smithfarm

Copy link
Copy Markdown
Contributor

It looks like 52fe9db might be needed in octopus as well?

Fixes a failing test case regarding osd coming back
after being marked out. The old test case wasn't accounting
for a specific event, therefore this resulted in the failure.
The fix basically accounts for a specific event of osd being
marked in/out.

Fixes: https://tracker.ceph.com/issues/48217

Signed-off-by: Kamoltat <[email protected]>
(cherry picked from commit 52fe9db)

Conflicts:
	qa/tasks/mgr/test_progress.py - trivial fix
@kamoltat

Copy link
Copy Markdown
Member Author

It looks like 52fe9db might be needed in octopus as well?

@smithfarm Yes I think you are right

@yuriw

yuriw commented Dec 14, 2020

Copy link
Copy Markdown
Contributor

@yuriw
yuriw merged commit 202c9f5 into ceph:nautilus Dec 14, 2020
@ideepika

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants