[SERVER-36169] Resmoke: bare raise outside except in the stepdown hook Created: 17/Jul/18  Updated: 29/Oct/23  Resolved: 27/Aug/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.3

Type: Bug Priority: Major - P3
Reporter: Yves Duhem Assignee: Jonathan Abrahams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-34555 Migrate concurrency_sharded_with_step... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: TIG 2018-09-10
Participants:
Story Points: 1

 Description   

The stepdown hook code contains three misplaced bare raise statement, outside an except block: herehere and here.



 Comments   
Comment by Githook User [ 28/Aug/18 ]

Author:

{'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com', 'username': 'hptabster'}

Message: SERVER-36169 Fix bare raise in stepdown.py hook

(cherry picked from commit 2749a04cc4de675a3490d996cd546867b32577d8)
Branch: v4.0
https://github.com/mongodb/mongo/commit/8b3db7682b453b422e2086e7e80a8edd7004207e

Comment by Githook User [ 27/Aug/18 ]

Author:

{'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com', 'username': 'hptabster'}

Message: SERVER-36169 Fix bare raise in stepdown.py hook
Branch: master
https://github.com/mongodb/mongo/commit/2749a04cc4de675a3490d996cd546867b32577d8

Comment by Max Hirschhorn [ 02/Aug/18 ]

In all of these locations it looks like we should be raising an appropriate exception type ourselves. There is no active exception to reraise.

$ python -c 'raise'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

is the output we'd see if we were actually hitting any of those lines.

Generated at Thu Feb 08 04:42:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.