Bug 1415984

Summary: Save the generated gdeploy config files with timestamp under the persistent location
Product: [oVirt] cockpit-ovirt Reporter: SATHEESARAN <sasundar>
Component: GdeployAssignee: Gobinda Das <godas>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bugs, godas, knarra, phbailey, sabose
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: planning_ack+
rule-engine: devel_ack+
sasundar: testing_ack+
Target Release: 0.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:31:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1462006    

Description SATHEESARAN 2017-01-24 10:07:32 UTC
Description of problem:
-----------------------
The generated gdeploy config files should be persisted,  ( maybe under /var/log/vdsm.) This serves helpful for debugging purposes and reusing the same conf file for different deployment.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7rhgs

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Use gluster deployment using cockpit-ovirt

Actual results:
---------------
1. gdeploy config file is generated under /tmp. /tmp is the location of temporary files only
2. Not all attempts of gdeploy config file creations are saved

Expected results:
-----------------
1. gdeploy config file should be generated and saved under proper location. say /var/log/vdsm/
2. gdeploy config file should get named with timestamps, so older config files are never overwritten

Comment 1 Sahina Bose 2017-11-21 10:58:18 UTC
Gobinda, to address Bug 1462006 , are we saving the generated gdeploy conf in a specific location?

Comment 2 Gobinda Das 2017-11-22 06:18:49 UTC
Sahina, Bug 1462006 has been addressed by Phillip and I saw the patch, looks like it's still in default location. I will take it up and change the file location.

Comment 3 Gobinda Das 2017-11-24 10:45:02 UTC
gdeploy conf file location changed to /var/lib/ovirt-hosted-engine-setup/gdeploy/gdeployConfig.conf

he-answer file location changed to /var/lib/ovirt-hosted-engine-setup/answers/he-answer.conf

And taking each file backup with timestamp for each deployment.

Comment 4 Phillip Bailey 2017-12-01 14:16:38 UTC
Gobinda, when I run the gluster wizard, the he-answer.conf and gdeployConfig.conf files aren't written to their respective directories. The output from the developer console is below.

Failed to read file /var/lib/ovirt-hosted-engine-setup/answers/he-answer.conf. Check that the file exists and is not empty
File /var/lib/ovirt-hosted-engine-setup/answers/he-answer-1512137352027.conf backup failed.
/var/lib/ovirt-hosted-engine-setup/gdeploy/gdeployConfig.conf: couldn't open unique file: No such file or directory
Directory /var/lib/ovirt-hosted-engine-setup/gdeploy already exist.
File /var/lib/ovirt-hosted-engine-setup/gdeploy/gdeployConfig-1512137352039.conf backup failed.
File /var/lib/ovirt-hosted-engine-setup/answers/he-answer-1512137357727.conf backup failed.
/var/lib/ovirt-hosted-engine-setup/gdeploy/gdeployConfig.conf: couldn't open unique file: No such file or directory
Directory /var/lib/ovirt-hosted-engine-setup/gdeploy already exist.
File /var/lib/ovirt-hosted-engine-setup/gdeploy/gdeployConfig-1512137357746.conf backup failed.

Comment 5 Gobinda Das 2017-12-03 14:07:30 UTC
Hi Phillip,
 I have change code from async call to synchronous and patch has been pushed.
https://gerrit.ovirt.org/#/c/85008/
Please check and let me know if any issue.

Comment 6 SATHEESARAN 2018-05-08 07:39:20 UTC
Tested with cockpit-ovirt-dashboard-0.11.24

The generated gdeploy configuration files are saved under /var/lib/ovirt-hosted-engine-setup/gdeploy/

Comment 7 Sandro Bonazzola 2018-05-10 06:31:13 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.