Yaniv Dary has posted comments on this change.
Change subject: packging: fixed remote install setup
......................................................................
Patch Set 2:
(6 comments)
....................................................
File packaging/legacy-setup/ovirt-engine-dwh-setup.py
Line 232: default=userdefault,
Line 233: )
Line 234:
Line 235: userInput = getpass.getpass(
Line 236: 'Password for the remote DB user: '
ok this is a fix for a bug currently on z stream
Line 237: )
Line 238:
Line 239: return (dbuser, userInput)
Line 240:
Line 364: output, rc = utils.runPostgresSuQuery(sql_query)
Line 365: return '1' in output
Line 366:
Line 367: def isOvirtEngineInstalled():
Line 368: return
os.path.exists(os.path.join(OVIRT_SETUP_POST_INSTALL_CONFIG))
no
Line 369:
Line 370: def main(options):
Line 371: '''
Line 372: main
Line 391:
Line 392: # Check that oVirt-Engine is installed, otherwise exit
gracefully with an informative message
Line 393: if not isOvirtEngineInstalled():
Line 394: logging.debug("ovirt-engine is not set up, cannot
continue")
Line 395: print "Please install & setup oVirt engine by executing
\"engine-setup\" prior to setting up the data warehouse."
what changed here?
Line 396: return 0
Line 397:
Line 398: db_dict = getDbDictFromOptions()
Line 399: PGPASS_TEMP = utils.createTempPgpass(db_dict)
Line 498: dbExists, owned, hasData, working_db_dict =
getDBStatus(db_dict, PGPASS_TEMP)
Line 499: if not dbExists:
Line 500: print 'Could not connect to remote
database - please try again.\n'
Line 501: else:
Line 502: # Why do we allow host/port options? If they are
different from engine db, we won't be able to connect to it
I don't think this should be. But I don't think it's a necessary change.
Line 503: db_dict['host'] = options['REMOTE_DB_HOST']
Line 504: db_dict['port'] = options['REMOTE_DB_PORT']
Line 505: db_dict['username'] = options['REMOTE_DB_USER']
Line 506: db_dict['password'] =
options['REMOTE_DB_PASSWORD']
Line 569: if doBackup:
Line 570: print DB_FILE.format(
Line 571: dbfile=backupFile
Line 572: )
Line 573: print DB_RESTORE
This will happen twice now, no?
Line 574:
Line 575: if utils.localHost(db_dict['host']) and not owned:
Line 576: if not userExists(db_dict['username']):
Line 577: utils.createUser(
Line 654: logging.debug("user chose not to stop engine")
Line 655: print "Installation stopped, Goodbye."
Line 656:
Line 657: logging.debug("main() ended")
Line 658: except:
What about adding message on backup restore?
Line 659: logging.error("Exception caught!")
Line 660: logging.error(traceback.format_exc())
Line 661: print "Error encountered while installing %s, please consult
the log file: %s" % (DWH_PACKAGE_NAME,log_file)
Line 662: rc = 1
--
To view, visit http://gerrit.ovirt.org/22701
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic315856f91c60f240c6830fb90e5b259774e9745
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-dwh
Gerrit-Branch: master
Gerrit-Owner: Yaniv Dary <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yaniv Dary <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches