This issue is fixed in HDP 1.2.1 which was released around the first week of February time frame. The defect is mentioned here:
Basically you were able to determine the correct fully qualified domain name to use, which you found out by running the python call :
Using the fqdn returned by the above python call got you passed the registering hosts phase, but not the installation phase. The HDP 1.2.1 fix should provide the fix to allow the installation phase to go through and finish.