Small refactoring of update_cluster_status [PRD-1034]

unit-tests