AMBARI-6351 Remove synchronous calls with commands to server, second patch. (Max Shepel via atkach)