From: "Demeter Tibor" <tdemeter(a)itsmart.hu>
To: "Yedidyah Bar David" <didi(a)redhat.com>
Cc: users(a)ovirt.org
Sent: Friday, June 20, 2014 10:00:43 AM
Subject: Re: [ovirt-users] Upgrade to 3.4.2 failed
Ok, I have listed my databases:
postgres-# \list
List of databases
Name | Owner | Encoding | Collation |
Ctype | Access privileges
-----------------------+-----------------------+----------+-------------+-------------+-----------------------
engine_20140130075536 | engine_20140130075536 | UTF8 | en_US.UTF-8 |
en_US.UTF-8 |
ovirt_engine_history | ovirt_engine_history | UTF8 | en_US.UTF-8 |
en_US.UTF-8 |
ovirt_engine_reports | ovirt_engine_reports | 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
... and I have used these command for engine_2014....
-bash-4.1$ psql engine_20140130075536
Password:
psql (8.4.20)
Type "help" for help.
engine_20140130075536=# select count(*), external_id from users group by
external_id having count(*)>1;
count | external_id
-------+---------------------------------------------------
2 | \031\250_\336\265\234\021\343\2168\000\032JP_\022
(1 row)
Ok, so there lies your problem...
You have two users (in the ovirt engine db) that use the same external id.
Not sure what's the best way to proceed. If you do not use them, might be
simplest to just drop them. If you use one and not the other, might be possible
to drop the unused one, but this might be a bit more delicate. If you use both,
I think you should somehow change the external id of one of them.
Also not sure if this condition is expected or a result of some bug.
Adding Yair, the owner of [1]. Yair - any idea how to proceed?
[1]
Tibor
----- Eredeti üzenet -----
> Hi,
>
> I got this:
>
> -bash-4.1$ psql engine
> Password:
> psql: FATAL: database "engine" does not exist
>
> Is this mean, my engine database does not exist?
>
> Thanks,
>
> Tibor
>
>
> ----- Eredeti üzenet -----
> > Hi,
> >
> > ----- Original Message -----
> > > From: "Demeter Tibor" <tdemeter(a)itsmart.hu>
> > > To: "Yedidyah Bar David" <didi(a)redhat.com>
> > > Cc: users(a)ovirt.org
> > > Sent: Wednesday, June 18, 2014 7:37:24 PM
> > > Subject: Re: [ovirt-users] Upgrade to 3.4.2 failed
> > >
> > > Hi,
> > >
> > > Yes, I have a FreeIPA server, but it was a running virtual server on
> > > ovirt
> > > :)
> > > Yes, I know, it was a stupid idea,
> >
> > Not necessarily, if you can also use admin@internal for maintenance.
> >
> > > but it's only a test system for testing
> > > ovirt capabilites.
> > > So, this vm (the freeipa) at this moment doesn't running and I cannot
> > > run
> > > without ovirt.
> >
> > Is ovirt down? Didn't the upgrade rollback cleanly? If not, please
> > provide
> > logs, it should have. If it did, you can simply 'service ovirt-engine
> > start'.
> >
> > >
> > > - Can I re-run this vm without ovirt?
> >
> > I guess you can, but it won't be easy.
> >
> > > - If no, then how can I remove the ipaserver from ovirt configuration ?
> >
> > Same :-)
> >
> > But I do not think that the upgrade failure was caused due to ipa being
> > down. There is something else. Did you try running the below query? Did
> > it return anything? You run it inside psql, with:
> > # su - postgres
> > $ psql engine
> > engine=# select count(*), external_id from users group by external_id
> > having
> > count(*)>1;
> > (All in one line, in case it's cut during mail processing)
> >
> > >
> > > Thank in advance.
> > >
> > >
> > > Tibor
> > >
> > > ----- Eredeti üzenet -----
> > > > ----- Original Message -----
> > > > > From: "Demeter Tibor" <tdemeter(a)itsmart.hu>
> > > > > To: users(a)ovirt.org
> > > > > Sent: Tuesday, June 17, 2014 3:11:54 PM
> > > > > Subject: [ovirt-users] Upgrade to 3.4.2 failed
> > > > >
> > > > > Hi,
> > > > >
> > > > > I just did an upgrade to my 3.4.0 box.
> > > > > I did a yum update and an engine-setup
> > > > > After the package downloading process got this:
> > > > >
> > > > >
> > > > > [ INFO ] Yum Verify: 14/14: ovirt-engine.noarch 0:3.4.0-1.el6 -
ud
> > > > > [ INFO ] Stage: Misc configuration
> > > > > [ INFO ] Backing up database localhost:engine_20140130075536 to
> > > > >
'/var/lib/ovirt-engine/backups/engine-20140617140129.QZGO9x.dump'.
> > > > > [ INFO ] Updating Engine database schema
> > > > > [ ERROR ] Failed to execute stage 'Misc configuration':
Command
> > > > > '/usr/share/ovirt-engine/dbscripts/upgrade.sh' failed to
execute
> > > > > [ INFO ] Yum Performing yum transaction rollback
> > > > > [ INFO ] Yum Status: Downloading Packages
> > > > > [ INFO ] Yum Download/Verify: ovirt-engine-3.4.0-1.el6.noarch
> > > > >
> > > > > A cut from the log file:
> > > > >
> > > > > running upgrade sql script
> > > > >
upgrade/03_04_0720_add_host_interface_high_network_use_event.sql
> > > > > ...
> > > > > Running upgrade sql script
upgrade/03_04_0730_change_group_ids.sql
> > > > > ...
> > > > > Running upgrade sql script
upgrade/03_04_0740_update_user_ids.sql
> > > > > ...
> > > > >
> > > > > 2014-06-17 14:01:41 DEBUG
> > > > > otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema
> > > > > plugin.execute:866
> > > > > execute-output:
['/usr/share/ovirt-engine/dbscripts/upgrade.sh',
> > > > > '-s',
> > > > > 'localhost',
> > > > > '-p', '5432', '-u',
'engine_20140130075536', '-d',
> > > > > 'engine_20140130075536',
> > > > > '-l',
> > > > >
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20140617135909-a7zbn6.log',
> > > > > '-g'] stderr:
> > > > > psql:upgrade/03_04_0740_update_user_ids.sql:41: ERROR:
duplicate
> > > > > key
> > > > > value
> > > > > violates unique constraint "pk_users"
> > > > > CONTEXT: SQL statement "UPDATE users SET user_id =
temp_id"
> > > > > PL/pgSQL function "__temp_update_user_ids_03_04_0740"
line 30 at
> > > > > SQL
> > > > > statement
> > > > >
> > > > > 2014-06-17 14:01:41 DEBUG otopi.context
context._executeMethod:152
> > > > > method
> > > > > exception
> > > > > Traceback (most recent call last):
> > > > > File
"/usr/lib/python2.6/site-packages/otopi/context.py", line
> > > > > 142,
> > > > > in
> > > > > _executeMethod
> > > > > method['method']()
> > > > > File
> > > > >
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py",
> > > > > line 345, in _miscUpgrade
> > > > > osetupcons.DBEnv.PGPASS_FILE
> > > > > File
"/usr/lib/python2.6/site-packages/otopi/plugin.py", line
> > > > > 871,
> > > > > in
> > > > > execute
> > > > > command=args[0],
> > > > > RuntimeError: Command
> > > > > '/usr/share/ovirt-engine/dbscripts/upgrade.sh'
> > > > > failed
> > > > > to execute
> > > > > 2014-06-17 14:01:41 ERROR otopi.context
context._executeMethod:161
> > > > > Failed
> > > > > to
> > > > > execute stage 'Misc configuration': Command
> > > > > '/usr/share/ovirt-engine/dbscripts/upgrade.sh' failed to
execute
> > > > > 2014-06-17 14:01:41 DEBUG otopi.transaction
transaction.abort:131
> > > > > aborting
> > > > > 'Yum Transaction'
> > > > > 2014-06-17 14:01:41 INFO
otopi.plugins.otopi.packagers.yumpackager
> > > > > yumpackager.info:92 Yum Performing yum transaction rollback
> > > > > 2014-06-17 14:01:41 DEBUG
otopi.plugins.otopi.packagers.yumpackager
> > > > > yumpackager.verbose:88 Yum Building transaction
> > > > > 2014-06-17 14:01:42 DEBUG
otopi.plugins.otopi.packagers.yumpackager
> > > > > yumpackager.verbose:88 Yum Transaction built
> > > > > 2014-06-17 14:01:42 DEBUG
otopi.plugins.otopi.packagers.yumpackager
> > > > > yumpackager.verbose:88 Yum Transaction Summary:
> > > > > 2014-06-17 14:01:42 DEBUG
otopi.plugins.otopi.packagers.yumpackager
> > > > > yumpackager.verbose:88 Yum install -
> > > > > ovirt-engine-3.4.0-1.el6.noarch
> > > > >
> > > > >
> > > > > Anybody help me?
> > > > >
> > > >
> > > > Is it possible that you use an external directory and have two users
> > > > pointing at the same directory user?
> > > >
> > > > Does the following query return anything?
> > > >
> > > > select count(*), external_id from users group by external_id having
> > > > count(*)>1;
> > > > --
> > > > Didi
> > > >
> > >
> >
> > --
> > Didi
> >
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
>
http://lists.ovirt.org/mailman/listinfo/users
>