Add race condition for keystone.log

Change-Id: Icb8e01d3228f67dec5c61998b1bea7578fb79651
(cherry picked from commit 9424937c13d8bfed9686fb77ab4a4f865d020d13)