Bug 1314079 - Temporary removal of Redhat and Miq Domain in automate when using command line restore
Temporary removal of Redhat and Miq Domain in automate when using command lin...
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
Unspecified Unspecified
high Severity high
: GA
: 5.6.0
Assigned To: mkanoor
Milan Falešník
: ZStream
Depends On:
Blocks: 1314532
  Show dependency treegraph
Reported: 2016-03-02 15:49 EST by ldomb
Modified: 2016-08-10 10:49 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1314532 (view as bug list)
Last Closed: 2016-03-23 09:42:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Automate out of order (44.76 KB, image/png)
2016-03-02 15:49 EST, ldomb
no flags Details

  None (edit)
Description ldomb 2016-03-02 15:49:09 EST
Created attachment 1132532 [details]
Automate out of order

Description of problem:

When using 

script/rails runner script/rake evm:automate:backup BACKUP_ZIP_FILE=#{BASE}/backup_exported.zip OVERWRITE=true"

script/rails runner script/rake evm:automate:restore BACKUP_ZIP_FILE=#{BASE}/backup_imported.zip

The Redhat as well as MIQ domain disappears from the GUI until a reset or reboot is done. 

The Domains are out of order after a reboot as well as restore and the priority cannot be set from the gui nor from the command line. After a reset the order is


Version-Release number of selected component (if applicable):


How reproducible:

Follow marcos github repo


Steps to Reproduce:
1. See above 

Actual results:
Locked datastores are not visible anymore. After a reboot or reset they become visible but are out of order and the order cant be changed 

Expected results:
Adds the CloudFormsPoc domain(mydomain) before Redhat and ManagIQ

Additional info:
Comment 2 mkanoor 2016-03-14 15:27:59 EDT
I tested this with the same version of an CFME appliance and didn't see a problem with the restore.
In your ticket you mention that during the backup the file name was #{BASE}/backup_exported.zip
But during the restore the file name was 

I just want to check if the filenames are correct.

Also are there any error messages in the evm.log.

Can we get a copy of the backup_imported.zip to see what it contains.

I can recreate your issue if I have a ZIP file that just contains a single domain and not all the domains (Redhat, ManageIQ) like we see with the Backup. When you do a BACKUP all the domains are Backed up into the ZIP file, When we call restore all the domains are deleted and restored from the backup file. If the backup only has one domain that is the only one that will get restored. When you restart the server or reboot the machine we see the missing ManageIQ and Redhat domains and seed it from the db/fixtures/ae_datastore.
Comment 3 ldomb 2016-03-15 10:01:19 EDT
I used it with an untouched appliance and just added the



So to reproduce

1. Download the latest appliance for Openstack. 
2. Configure it so it runs. 
3. Go to marcos github repo and follow the steps to configure
4. Create a git repo with the CloudFormsPOC domain or any other domain
5. point the automate.yaml git repo to yours
6. Do a automate git-pull

This was braking on my appliance. 

I do not have the appliance anymore so I can't test it. 

Comment 4 mkanoor 2016-03-15 10:16:48 EDT
The behavior suggested in this ticket will happen if your backup zip file only contains your domain and doesn't contain the ManageIQ and REDHAT domains. If ones doing a restore you need all the domains in the backup zip file. If you just want to import a single domain use the evm:automate:import.

Laurent in your steps to reproduce you don't mention backup/restore but the automate git-pull so is this an issue in automate git-pull or in backup/restore.
Comment 5 ldomb 2016-03-15 10:26:47 EDT
It's in backup restore I guess. There should be no use case where the redhat and managiq domain disappear. 

I can rebuild the environment I've had and see If I can reproduce and do a remote session with you.
Comment 6 mkanoor 2016-03-15 14:20:24 EDT
Yes please, can you recreate it and we can do a remote session.
The backup/restore logic is for all domains it is not for a single domain. If you want to work with a single domain you would have to use export/import. You can't take an export deck of a single domain and pass it to restore.
I would agree that there is an issue that we are not checking for the presence of Redhat/ManageIQ domain in the backup zip before we delete the domains. That I think is a bug.

Is that the issue here?
Comment 8 ldomb 2016-03-22 11:25:22 EDT
Can be closed. the removal of datastores happened because of the wrong application of evm:automate:restore. 

For a single datastore evm:automate:import should be used.

Note You need to log in before you can comment on or make changes to this bug.