Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1212526

Summary: [engine-backup] silently ignores db credentials options when not passing --change-*credentials
Product: [oVirt] ovirt-engine Reporter: Jiri Belka <jbelka>
Component: GeneralAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, didi, ecohen, gklein, jbelka, lsurette, rbalakri, sbonazzo, yeylon, ylavi
Target Milestone: ovirt-3.6.0-rcFlags: rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.6.0-alpha1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-04 11:33:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1212752    
Bug Blocks:    
Attachments:
Description Flags
restore.log none

Description Jiri Belka 2015-04-16 14:55:08 UTC
Created attachment 1015263 [details]
restore.log

Description of problem:

I'm the boss so I instruct engine-backup to use specific DBs I manually created :)

# engine-backup --mode=restore --file=/root/rhevm_backup.tar --scope=all --log=/root/rhevm_restore.log --db-user=newengine --db-password=xxxxxx --db-name=newengine --dwh-db-user=newdwh --dwh-db-user=newdwh --
dwh-db-password=xxxxxx
Preparing to restore:
- Unpacking file '/root/rhevm_backup.tar'
Restoring:
- Files
- Engine database 'engine'
- DWH database 'ovirt_engine_history'
You should now run engine-setup.
Done.

Listening advices, thus engine-setup...

# engine-setup
...

[ INFO  ] Cleaning stale zombie tasks and commands
         
          --== CONFIGURATION PREVIEW ==--
         
          Firewall manager                        : iptables
          Update Firewall                         : True
          Host FQDN                               : jb-ovirt36.rhev.lab.eng.brq.redhat.com
          Default SAN wipe after delete           : False
          Engine database secured connection      : False
          Engine database host                    : localhost
          Engine database user name               : engine
          Engine database name                    : engine
          Engine database port                    : 5432
          Engine database host name validation    : False
          Engine installation                     : True
          DWH installation                        : True
          DWH database secured connection         : False
          DWH database host                       : localhost
          DWH database user name                  : ovirt_engine_history
          DWH database name                       : ovirt_engine_history
          Backup DWH database                     : True
          DWH database port                       : 5432
          DWH database host name validation       : False
          Configure WebSocket Proxy               : True
          Engine Host FQDN                        : jb-ovirt36.rhev.lab.eng.brq.redhat.com
         
          Please confirm installation settings (OK, Cancel) [OK]: 
...

I'm not the boss anymore? engine, ovirt_engine_history? Pardon me?

postgres=# \l
                                             List of databases
         Name         |        Owner         | Encoding |  Collation  |    Ctype    |   Access privileges   
----------------------+----------------------+----------+-------------+-------------+-----------------------
 engine               | engine               | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 newdwh               | newdwh               | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 newengine            | newengine            | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 ovirt_engine_history | ovirt_engine_history | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres             | postgres             | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0            | postgres             | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                                    : postgres=CTc/postgres
 template1            | postgres             | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                                    : postgres=CTc/postgres
(7 rows)

postgres=# \c newengine
psql (8.4.20)
You are now connected to database "newengine".
newengine=# \dt
No relations found.


Version-Release number of selected component (if applicable):
ovirt-engine-tools-3.6.0-0.0.master.20150412172306.git55ba764.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. have all-scope backup
2. create manually 2 dbs, one for engine itself, another one for dwh
3. engine-backup --mode=restore --file=$backup_file --scope=all --log=$restore.log --db-user=$db1user --db-password=xxxxxx --db-name=$db1 ----dwh-db-name=$db2 --dwh-db-user=$db2 --dwh-db-password=xxxxxx

(OK, i did mistake in first engine-backup command, putting twice dwh-db-user instead of dwh-db-name and dwh-db-user but anyway... for engine itself it is ignored!)

Actual results:
db options ignored

Expected results:
should use explicitly written db options

Additional info:

Comment 1 Yedidyah Bar David 2015-04-16 16:47:13 UTC
Did you pass --change-db-credentials and --change-dwh-db-credentials?

Comment 2 Jiri Belka 2015-04-17 09:49:05 UTC
OK I didn't pass --change-{,dwh}-db-credentials but I can't provide more info now as there's another bug, see BZ1212752

Comment 3 Sandro Bonazzola 2015-05-14 15:13:22 UTC
Jiri, you should be able to provide more info using nightly build, bug #1212752 has been fixed there.

Comment 4 Yedidyah Bar David 2015-05-19 05:27:54 UTC
I am currently assuming that there was no actual issue except for not passing --change-db-credentials. Changed the summary accordingly. Please open another bug if you find one. Thanks.

Comment 5 Jiri Belka 2015-05-26 08:46:54 UTC
I'll wait with verification when update flow like this would work:
el6/3.3 rhevm -> el6/3.4 rhevm -> el6/3.5 rhevm -> el6/3.6 ovirt/rhevm

There are problems to start verification as fedora 19 is EOF (only OS version which has rpm for dwh/reports) and I got some issues with base OS parts.

Comment 6 Jiri Belka 2015-10-30 12:49:01 UTC
ok, rhevm-tools-3.6.0.2-0.1.el6.noarch

all scope (engine, dwh, reports) backup and restore

Comment 7 Sandro Bonazzola 2015-11-04 11:33:40 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.