Retirement tax questions

That is correct.  If you withdrew the 2017 contribution before the due date of the return and the earnings then there is not penalty and no 5329 is filed.  You can either wait until next year and when you get the the 1099-R and then amend the 2017 tax return or report it now with a "dummy" 1099-R as I explained in the answer box.   The earnings must be reported on line 15b, not line 21.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**