Bug 858625 - [RHEV-M] rhevm-upgrade from IC157 to SI18 fails because of missing dir to store .pgpass file
[RHEV-M] rhevm-upgrade from IC157 to SI18 fails because of missing dir to sto...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
x86_64 Linux
urgent Severity high
: ---
: ---
Assigned To: Alex Lourie
Pavel Stehlik
Depends On:
  Show dependency treegraph
Reported: 2012-09-19 05:01 EDT by Martin Pavlik
Modified: 2015-09-22 09 EDT (History)
12 users (show)

See Also:
Fixed In Version: si-20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 15:16:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
install logs (40.27 KB, application/x-gzip)
2012-09-19 05:01 EDT, Martin Pavlik
no flags Details

  None (edit)
Description Martin Pavlik 2012-09-19 05:01:51 EDT
Created attachment 614280 [details]
install logs

Description of problem:
rhevm-upgrade from IC157 to SI18 fails because of missing dir /etc/ovirt-engine/ to store .pgpass file

If user tries to run rhevm-upgrade follwing error appears

2012-09-18 16:25:56::ERROR::rhevm-upgrade::930::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-upgrade", line 923, in <module>
  File "/usr/bin/rhevm-upgrade", line 720, in main
    shutil.copy(basedefs.ORIG_PASS_FILE, basedefs.DB_PASS_FILE)
  File "/usr/lib64/python2.6/shutil.py", line 84, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.6/shutil.py", line 51, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/etc/ovirt-engine/.pgpass'

if the directory /etc/ovirt-engine/ is created manually, the upgrade goes through

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

How reproducible:

Steps to Reproduce:
1. register rhevm to apropriate rhn channels
rhn-channel --add --channel rhel-x86_64-rhev-agent-6-server --channel rhel-x86_64-rhev-mgmt-agent-6 --channel rhel-x86_64-server-6-rhevm-3 --channel rhel-x86_64-server-supplementary-6 --channel jbappplatform-6-x86_64-server-6-rpm 

and add repository for SI18

2. run rhevm-upgrade

Actual results:
rhevm-upgrade from IC157 to SI18 fails because of missing dir /etc/ovirt-engine/ to store .pgpass file

Expected results:
upgrade should go through

Additional info:

install logs are attached
Comment 1 Ofer Schreiber 2012-10-03 11:20:58 EDT
Posted upstream:
Comment 3 Martin Pavlik 2012-10-08 09:23:47 EDT
SI20 works as expected

[root@mp-rhevm30 ~]# rhevm-upgrade 
Loaded plugins: product-id, rhnplugin
Info: RHEV Manager 3.0 to 3.1 upgrade detected
Checking pre-upgrade conditions...(This may take several minutes)

Warning: the following packages will be removed if you proceed with the upgrade:
 * objectweb-asm
Would you like to proceed? (yes|no): yes
Checking for updates... (This may take several minutes)
13 Updates available:
 * rhevm-3.1.0-20.el6ev.noarch
 * rhevm-backend-3.1.0-20.el6ev.noarch
 * rhevm-config-3.1.0-20.el6ev.noarch
 * rhevm-dbscripts-3.1.0-20.el6ev.noarch
 * rhevm-genericapi-3.1.0-20.el6ev.noarch
 * rhevm-iso-uploader-3.1.0-5.el6ev.noarch
 * rhevm-log-collector-3.1.0-7.el6ev.noarch
 * rhevm-notification-service-3.1.0-20.el6ev.noarch
 * rhevm-restapi-3.1.0-20.el6ev.noarch
 * rhevm-tools-common-3.1.0-20.el6ev.noarch
 * rhevm-userportal-3.1.0-20.el6ev.noarch
 * rhevm-webadmin-portal-3.1.0-20.el6ev.noarch
 * vdsm-bootstrap-4.9.6-37.0.el6_3.noarch

During the upgrade process, RHEV Manager  will not be accessible.
All existing running virtual machines will continue but you will not be able to
start or stop any new virtual machines during the process.

Would you like to proceed? (yes|no): yes
Stopping ovirt-engine Service...                         [ DONE ]
Pre-upgrade validations...                               [ DONE ]
Backing Up Database...                                   [ DONE ]
Rename Database...                                       [ DONE ]
Updating rpms...                                         [ DONE ]
Updating Database...                                     [ DONE ]
Restore Database name...                                 [ DONE ]
Running post install configuration...                    [ DONE ]
Starting ovirt-engine...                                 [ DONE ]

RHEV Manager upgrade completed successfully!

* Upgrade log available at /var/log/ovirt-engine/ovirt-engine-upgrade_2012_10_08_14_36_54.log
* DB Backup available at  /var/lib/ovirt-engine/backups/ovirt-engine_db_backup_2012_10_08_14_36_54.sql
Comment 4 Simon Grinberg 2012-10-11 05:48:29 EDT
Alex, since SI19.1 is the version on RHN, could you please add here a manual workaround for this?

Meaning, what should the user do to proceed with the upgrade?
Comment 5 Martin Pavlik 2012-10-25 08:31:29 EDT

mkdir -p /etc/ovirt-engine/

on the host should solve it.

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