Bug 1314079 - Temporary removal of Redhat and Miq Domain in automate when using command line restore
Summary: Temporary removal of Redhat and Miq Domain in automate when using command lin...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.6.0
Assignee: mkanoor
QA Contact: Milan Falešník
URL:
Whiteboard: automate
Depends On:
Blocks: 1314532
TreeView+ depends on / blocked
 
Reported: 2016-03-02 20:49 UTC by ldomb
Modified: 2016-08-10 14:49 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1314532 (view as bug list)
Environment:
Last Closed: 2016-03-23 13:42:59 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


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

Description ldomb 2016-03-02 20:49:09 UTC
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"

and 
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

Redhat
Mydomain
ManagIQ

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

cfme-5.5.2.4-1.el7cf.x86_64

How reproducible:

Follow marcos github repo

https://github.com/mberube9/cfme-cmd-tools

Steps to Reproduce:
1. See above 
2.
3.

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 19:27:59 UTC
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 
#{BASE}/backup_imported.zip

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 14:01:19 UTC
I used it with an untouched appliance and just added the

https://github.com/ramrexx/CloudFormsPOC/tree/master/Automate/CloudFormsPOC

Domain. 

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
https://github.com/mberube9/cfme-cmd-tools
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. 

Laurent

Comment 4 mkanoor 2016-03-15 14:16:48 UTC
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 14:26:47 UTC
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 18:20:24 UTC
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 15:25:22 UTC
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.