As @jaimin indicated, it is safe to cascade delete the offending record. At the end of the day, the repository_version_id values should be singular across the cluster_version and host_version tables. Since you will have two records with the same version string, the id-lookup is what matters.
I found that there was problem in repo_version table, version column value should be "18.104.22.168-1245". I had only "22.214.171.124"
Beacuse of that all services failed start or restart, with this error:
ambari-python-wrap /usr/bin/conf-select set-conf-dir --package hadoop --stack-version 126.96.36.199 --conf-version 0' returned 1. 188.8.131.52 Incorrect stack version
I still don't know how this situation happend.
I updated version column to "184.108.40.206-1245" in database repo_version table