Bug 880120 - [rhevm-upgrade] Upgrade fails because engine role exist in the DB
[rhevm-upgrade] Upgrade fails because engine role exist in the DB
Status: CLOSED DUPLICATE of bug 879936
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.1.0
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Moran Goldboim
Pavel Stehlik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-26 05:11 EST by Kiril Nesenko
Modified: 2014-07-10 20:09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-26 16:13:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log (46.23 KB, text/x-log)
2012-11-26 05:11 EST, Kiril Nesenko
no flags Details

  None (edit)
Description Kiril Nesenko 2012-11-26 05:11:51 EST
Created attachment 651868 [details]
log

Description of problem:
Tried to upgrade from 3.0 to 3.1 - failed.
Followed the presented steps to restore 3.0

After 3.0 was restored, attempted to retry the upgrade.

The upgrade failed and the following was in the logs:

2012-11-26 11:51:05::DEBUG::common_utils::341::root:: stderr = 
2012-11-26 11:51:05::DEBUG::common_utils::342::root:: retcode = 0
2012-11-26 11:51:05::DEBUG::common_utils::473::root:: Found IP Address: 10.35.16.97
2012-11-26 11:51:05::DEBUG::common_utils::302::root:: Executing command --> '/usr/bin/psql -U postgres -c ALTER DATABASE rhevm RENAME TO engine;'
2012-11-26 11:51:05::DEBUG::common_utils::340::root:: output = ALTER DATABASE

2012-11-26 11:51:05::DEBUG::common_utils::341::root:: stderr = 
2012-11-26 11:51:05::DEBUG::common_utils::342::root:: retcode = 0
2012-11-26 11:51:05::DEBUG::common_utils::302::root:: Executing command --> '/usr/bin/psql -U postgres -c ALTER ROLE rhevm RENAME TO engine;'
2012-11-26 11:51:05::DEBUG::common_utils::340::root:: output = 
2012-11-26 11:51:05::DEBUG::common_utils::341::root:: stderr = ERROR:  role "engine" already exists

2012-11-26 11:51:05::DEBUG::common_utils::342::root:: retcode = 1
2012-11-26 11:51:05::ERROR::rhevm-upgrade::1323::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-upgrade", line 1316, in <module>
    main(options)
  File "/usr/bin/rhevm-upgrade", line 1224, in main
    MSG_INFO_PRE_30_UPGRADE)
  File "/usr/bin/rhevm-upgrade", line 661, in runFunc
    func[0](*func[1:])
  File "/usr/share/ovirt-engine/scripts/upgrade_utils30.py", line 98, in modifyDb
    utils.execCmd(cmdList=cmd, failOnError=True, msg="Error: couldn't rename DB ROLE 'rhevm' to '%s'" % basedefs.DB_USER, envDict=env)
  File "/usr/share/ovirt-engine/scripts/common_utils.py", line 345, in execCmd
    raise Exception(msg)
Exception: Error: couldn't rename DB ROLE 'rhevm' to 'engine'


Version-Release number of selected component (if applicable):
rhevm-3.1.0-31.el6ev.noarch.rpm

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:
1. upgrade flow need to check if there is no engine role and engine db before upgrade starts

Additional info:
Comment 1 Moran Goldboim 2012-11-26 16:13:47 EST

*** This bug has been marked as a duplicate of bug 879936 ***

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