Retry dist upgrade on failure

http://paste.openstack.org/show/113213/