Fix deployment failure detection

Closes-Bug: #1364370
Change-Id: If242d815aca565909a6ed747e41eeab66f2cc2b0
Merge "Fix deployment failure detection"