Created attachment 777762 [details] logs have a fedora 19 and ovirt-engine 3.3 beta1 reproduce: 1: run engine-setup 2: run engine-cleanup (approve cleanup of the database) 3: run engine-setup The setup will fail with: "TypeError: argument of type 'NoneType' is not iterable" logs attached.
Have you approved only database or all? 2013-07-24 07:50:49 DEBUG otopi.plugins.ovirt_engine_setup.legacy.config config._customization:72 Upgrading from 3.3.z legacy 2013-07-24 07:50:49 DEBUG otopi.context context._executeMethod:132 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 122, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/legacy/config.py", line 95, in _customization 'ssl=true' in config.get('ENGINE_DB_URL') TypeError: argument of type 'NoneType' is not iterable 2013-07-24 07:50:49 ERROR otopi.context context._executeMethod:141 Failed to execute stage 'Environment customization': argument of type 'NoneType' is not iterable
Tried twice. First time I have let it to delete the DB but did not let it to delete the certificates and the keys, second time (on a different machine) I let it delete the DB and the certificates but not the keys. Same result.
Sandro, The legacy config should deal with that state... or we should fail setup if environment is insane... the question is why the setup thought it is legacy, this I will investigate. Alon
Tomas, For now you can just remove the /etc/pki/ovirt-engine/ca.pem to be able to continue.
(In reply to Alon Bar-Lev from comment #3) > Sandro, > > The legacy config should deal with that state... or we should fail setup if > environment is insane... > > the question is why the setup thought it is legacy, this I will investigate. > > Alon I think that running engine-cleanup post-install files was cleaned up as always and pki files were not removed by user choice. In this configuration running engine-setup from otopi will lead to finding the pki certs and not the post install file so it assumes it's upgrade from legacy. This is a bit tricky because running otopi engine-cleanup we can have pki files not cleaned (user choose to not remove them), database still there (user choose to preserve it), and so on. We can be sure we're upgrading from otopi if we find the post install config file. But determining if we're upgrading from legacy is not trivial. I don't think we can assume we're upgrading from legacy if pki is configured and the database is in place right? I think the only way for detecting upgrade from legacy is using these conditions: - post install config is not there - database is in place - pki is configured - versionlock.list is configured (engine-cleanup always cleans versionlock.list)
I have no problem with any solution that works. I also think that the clean should not delete core if one of the options were skipped... need to confirm.
Still issues with ovirt-engine-setup-3.3.0-0.3.beta1.fc19.noarch # engine-cleanup [ INFO ] Stage: Initializing [ INFO ] Stage: Environment setup Log file: /tmp/ovirt-engine-remove-20130731165838.log Version: otopi-1.1.0_master Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-aio.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf'] [ INFO ] Stage: Environment packages setup [ INFO ] Stage: Programs detection [ INFO ] Stage: Environment customization Do you want to remove Engine DB content? All data will be lost (Yes, No) [No]: Yes [ INFO ] Stage: Setup validation During execution engine service will be stopped (OK, Cancel) [OK]: ovirt-engine is about to be removed, data will be lost (OK, Cancel) [Cancel]: OK [ INFO ] Stage: Transaction setup [ INFO ] Stopping engine service [ INFO ] Stage: Package installation [ INFO ] Stage: Misc configuration [ INFO ] Removing added lines [ INFO ] Removing files [ INFO ] Stage: Transaction commit [ INFO ] Stage: Closing up --== SUMMARY ==-- Engine setup successfully cleaned up --== END OF SUMMARY ==-- [ INFO ] Stage: Clean up Log file is located at /tmp/ovirt-engine-remove-20130731165838.log [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination # engine-setup [ INFO ] Stage: Initializing [ INFO ] Stage: Environment setup Log file: /tmp/ovirt-engine-setup-20130731223213.log Version: otopi-1.1.0_master Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-aio.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf'] [ INFO ] Hardware supports virtualization [ ERROR ] Failed to execute stage 'Environment setup': Unexpected empty database during upgrade [ INFO ] Stage: Clean up Log file is located at /tmp/ovirt-engine-setup-20130731223213.log [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination relevant excerpt from the log: 2013-07-31 22:32:14 DEBUG otopi.context context._executeMethod:118 Stage setup METHOD otopi.plugins.ovirt_engine_setup.legacy.database.Plugin._setup 2013-07-31 22:32:14 DEBUG otopi.plugins.ovirt_engine_setup.legacy.database database._setup:55 Existing database pgpass found 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:123 Database: 'engine', Statement: ' select 1 ', args: {} 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:128 Creating own connection 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:181 Result: [{'?column?': 1}] 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.tryDatabaseConnect:289 Connection succeeded 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:123 Database: 'engine', Statement: ' select count(*) as count from information_schema.tables where table_name=%(table)s ', args: {'table': 'schema_version'} 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:128 Creating own connection 2013-07-31 22:32:14 DEBUG otopi.ovirt_engine_setup.database database.execute:181 Result: [{'count': 0L}] 2013-07-31 22:32:14 DEBUG otopi.context context._executeMethod:132 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 122, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/legacy/database.py", line 84, in _setup 'Unexpected empty database ' RuntimeError: Unexpected empty database during upgrade
(In reply to Sandro Bonazzola from comment #5) > (In reply to Alon Bar-Lev from comment #3) > > Sandro, > > > > The legacy config should deal with that state... or we should fail setup if > > environment is insane... > > > > the question is why the setup thought it is legacy, this I will investigate. > > > > Alon > > > I think that running engine-cleanup post-install files was cleaned up as > always and pki files were not removed by user choice. > In this configuration running engine-setup from otopi will lead to finding > the pki certs and not the post install file so it assumes it's upgrade from > legacy. > > This is a bit tricky because running otopi engine-cleanup we can have pki > files not cleaned (user choose to not remove them), database still there > (user choose to preserve it), and so on. > We can be sure we're upgrading from otopi if we find the post install > config file. But determining if we're upgrading from legacy is not trivial. > I don't think we can assume we're upgrading from legacy if pki is > configured and the database is in place right? > > I think the only way for detecting upgrade from legacy is using these > conditions: > - post install config is not there > - database is in place > - pki is configured > - versionlock.list is configured (engine-cleanup always cleans > versionlock.list) I think that if we manage to connect to a working database, we should check inside it to see the exact version we are using, then decide what we have and what we need to do. Otherwise, it's not an upgrade. We might use existing files if found (might need to ask the user if we should), but I would not call it an upgrade if we create a new database.
removing from 3.3 blocker list, partial remove is not in the critical path.
Included in 3.3.1 beta
oVirt 3.3.1 has been released