Cherry picked patches from OpenStack Compute (Nova)