Handle CDB errors more gracefully in cdb.php maintenance script

Change-Id: I9be42c909c85cd454fdd10921c8d50d6273252f8
Merge "Handle CDB errors more gracefully in cdb.php maintenance script"