discovery: handle 503 reply code from server for directories

503 for directories means that the dir is a mounted directory from an
external mount which currently is not available. The directory is
ignored and not traversed into during discovery phase.
Merge remote-tracking branch 'origin/fix_service_unavailable' into 1.7