Description of problem: When importing a datastore with 2 domains from Git one of the domains is marked as Git repo domain, the other is imported as regular domain in disabled state but not locked. Version-Release number of selected component (if applicable): 5.8.1.5 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: https://github.com/ManageIQ/manageiq-automation_engine/issues/45
Madhu - Please review and reassign if needed. Is this something Patrik can work on?
When we import from a Git Repo we should check if there is a single __domain__.yaml file. The current approach allows us to import all domains in the repository and it dependent on the users creating one Automate Domain per GIT Repository. We should enforce this in the importer and reject repositories that have multiple domains. During the pre_import step we should check the number of domains in the repository if more than one we can reject it here https://github.com/ManageIQ/manageiq-automation_engine/blob/7d0268ff22fc9be260d4a07677bc941ac2776e14/app/models/miq_ae_git_import.rb#L25
Ryan - The work-around for this is to only create git repos with a single domain. The suggest code fix will be enforcing this requirement.
Hi, i need to give my intention on this behaviour. My customer manage its appliance with more than 3 domains in a single GIT repo. It will be usefull if, as for file import, we can choose which domain we want to use instead of rejecting all unless we will not import all the domains. This way, we have a coherent working maner on importing from file and importing from GIT.
We have been trying to follow the One Domain One Repository rule. It keeps it simpler. If you have multiple domains in a single repo there is lot of book keeping that would have to be done. Domain A -> Branch X or Tag X Domain B -> Branch Y or Tag Y The multiple file export/import was meant for Backup/Restore it was not meant for importing/exporting multiple domains.
It is no more allowed to import multiple domains from a single git repository. PR: https://github.com/ManageIQ/manageiq-automation_engine/pull/124