What Brand & Model WH???? That info always helps due to the various changes/designs used.
It is NOT the high temp cutoff......Nothing would work if it was that.
Lighting off, running for 30 sec.......that is a main flame proving issue.
Main flame when lit generates a milivolt signal that goes back to circuit board 'proving' main flame lit. Circuit board then holds DC voltage on gas valve until temp reached.
The spark electrode is what signal uses to get to circuit board.
Spark electrode needs to be>
Clean
Directly engulfed in main flame
Have a good clean/tight ground
Good connection at circuit board
No cracked ceramic insulator.
On Atwood all of this can be easily checked in outside compartment.
On Suburban circuit board connection is on backside.
IF it is a pilot flame type WH....then thermocouple is used to prove flame