Allow metadata attempts to be retried

Note that this does not plumb anything into the session via
config vars.  I think that should be a separate pull request.