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