Bug 1753586
Summary: | Imported System Domains can not be deleted in CloudForms | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Khushbu Borole <kborole> | ||||
Component: | Automate | Assignee: | Patrik Kománek <pkomanek> | ||||
Status: | CLOSED ERRATA | QA Contact: | Devidas Gaikwad <dgaikwad> | ||||
Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||
Priority: | high | ||||||
Version: | 5.10.5 | CC: | dmetzger, ghubale, gmccullo, lavenel, mkanoor, mshriver, obarenbo, pkomanek, simaishi, tfitzger | ||||
Target Milestone: | GA | Keywords: | ZStream | ||||
Target Release: | 5.11.7 | Flags: | simaishi:
cfme-5.11.z+
|
||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | 5.11.7.0 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-08-06 14:32:52 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | Bug | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Khushbu Borole
2019-09-19 11:09:34 UTC
Hi Khushbu,
>> Is there any other way to forcefully delete the Core/Base Domain ?
We can delete locked domains via rails:
ssh to appliance and perform:
[root@vm253-117 vmdb]# bin/rails c
irb(main):001:0> MiqAeDomain.first (check output this command and see if you want to delete that domain or try second, third etc options to get particular domain)
irb(main):002:0> MiqAeDomain.first.delete
[root@vm253-117 vmdb]# bin/rake evm:automate:reset
Resetting the default domains in the automation model
The default domains in the automation model have been reset.
Please let me know, if it works or not.
Thanks,
Ganesh
Hello Ganesh, Thank you so much for the prompt reply. This works and I have updated the CU about the same. Thank you so very much !! Regards, Khushbu Hi Khushbu, Can you write a KB article to explain how to manually delete a 'system' domain added by mistake, and can we close this ticket? Let me know if you have any questions. Thanks, Tina Hi Patrik, Can you investigate how difficult it would be to issue a warning message if the domain being imported is a 'system' domain? Thanks, Tina Hi Patrik, As we discussed earlier this week, we should prevent a system domain (other than our system domains) from being imported. Can you look into the code that is used to "Reset all components in the following domains: RedHat, ManageIQ" to determine if the system domain is ours? Let me know if you have any questions. Thanks, Tina Hi Tina. This is the logic you were asking for: https://github.com/ManageIQ/manageiq-automation_engine/blob/master/app/models/miq_ae_datastore.rb#L176-L209. So if you add some new system domain, it wont be added into the result of `MiqAeDatastore.default_domain_names` method. I am not sure what is the best way here. We can validate the imported domains by name and keep system domain import only for domains with name from `MiqAeDatastore.default_domain_names`. Is this validation enough? What do you think? Hi Patrik, Yes, checking the domain name against MiqAeDatastore.default_domain_names is validation enough when trying to import a system domain. Let me know if you have any questions. Thanks, Tina New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/2fe6402c889b028e532c439a03d2e3e6859e1449 commit 2fe6402c889b028e532c439a03d2e3e6859e1449 Author: tina <tfitzger> AuthorDate: Wed Dec 18 16:19:57 2019 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Thu Jul 2 17:34:37 2020 +0000 Merge pull request #395 from pkomanek/reworking_automate_datastore_import_validation Changing the automate datastore import validation. (cherry picked from commit 8c1497c4142656643340cd0f1ec2b7232b24bda3) https://bugzilla.redhat.com/show_bug.cgi?id=1753586 app/models/miq_ae_git_import.rb | 5 +- app/models/miq_ae_yaml_import.rb | 29 +- spec/models/miq_ae_git_import_spec.rb | 2 +- spec/models/miq_ae_yaml_import_spec.rb | 133 +- 4 files changed, 162 insertions(+), 7 deletions(-) New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk: https://github.com/ManageIQ/manageiq-ui-classic/commit/75d94a0adb8c7be8568325fde15aef1d42c93b1e commit 75d94a0adb8c7be8568325fde15aef1d42c93b1e Author: Martin Povolny <mpovolny> AuthorDate: Fri Jan 10 09:10:34 2020 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Thu Jul 2 17:42:38 2020 +0000 Merge pull request #6434 from pkomanek/refactoring_automate_import_error_messages Refactoring automate import error messages. (cherry picked from commit 298b657bb0827fc8c72eec8bd47e9b0be6e09da1) https://bugzilla.redhat.com/show_bug.cgi?id=1753586 app/controllers/miq_ae_tools_controller.rb | 6 +- app/services/git_based_domain_import_service.rb | 12 +- spec/controllers/miq_ae_tools_controller_spec.rb | 4 +- spec/services/git_based_domain_import_service_spec.rb | 8 +- 4 files changed, 11 insertions(+), 19 deletions(-) After discussing with Tina, I've also backported https://github.com/ManageIQ/manageiq-automation_engine/pull/355 as a PR needed for this BZ depends on it. When testing this BZ, please make sure PR355 is also tested. Thank you! Verified on 5.11.7.0.20200714215453_0da8a4a Performed below steps to Verification: - Exported domain by navigating Automation>Automate>(Import/Export) - On completion of downloading, untar fail and edited ManageIQ domain by changing name - made zip file only for ManageIQ domain by giving on_qa-zip - upload on-qa.zip file by navigating Automation>Automate>(Import/Export) - Once upload done selected all available namespaces and clicked on commit button. After performing all above steps got expected error that is system domain is not supported. Created attachment 1701350 [details]
Adding screenshot of verification
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Critical: CloudForms 5.0.7 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:3358 |