CSNAPC-11099: For SC retention triggers even if the backup operation fails causing deletion of older backup when retention period is set by days.
Issue
During a backup operation, if the target host is in maintenance mode and the required SnapCenter plug-in services are unavailable, the backup request fails to connect to the host, resulting in the backup operation failing before creating a valid snapshot. After the failure, SnapCenter registers the failed backup job and applies the configured retention policy. The retention logic incorrectly treats the failed backup as the most recent backup without verifying its success, leading to the deletion of older successful backups. This issue stems from the retention mechanism being triggered even when the latest backup has failed.. As a result, if the backup fails immediately after being scheduled, especially after suspending, and retention is set by days, customers might lose older backups.
