Tesla is recalling more than 1.8 million vehicles because of a hood issue that could increase the risk of a crash.