Sandro Bonazzola has posted comments on this change.

Change subject: packaging: Added backup DB functionality to setup
......................................................................


Patch Set 7: (3 inline comments)

....................................................
File packaging/common_utils.py
Line 639:     logging.debug("Checking available space on %s" % (path))
Line 640:     stat = os.statvfs(path)
Line 641:     #block size * available blocks = available space in bytes, we 
devide by
Line 642:     #1024 ^ 2 in order to get the size in megabytes
Line 643:     availableSpace = (stat.f_bsize * stat.f_bavail) / pow(1024, 2)
I don't mind using 1024^2 or 2^20, it was just a suggestion
Line 644:     logging.debug("Available space on %s is %s" % (path, 
availableSpace))
Line 645:     return int(availableSpace)
Line 646: 
Line 647: def getDbSize(db_dict):


Line 657:         failOnError=True,
Line 658:         errMsg=ERR_DB_GET_SPACE % db_dict['name']
Line 659:     )
Line 660:     size = int(out[0]['pg_database_size'])
Line 661:     size = size / 1024 / 1024 # Get size in MB
ok, however I think that size / 1024 / 1024 is really ugly, you can use 
/pow(1024, 2) if you prefer.
Line 662:     return size
Line 663: 
Line 664: def performBackup(db_dict, backupPath):
Line 665:     # Check abvailable space


Line 732:         '--format=p',
Line 733:         '-U', db_dict['username'],
Line 734:         '-h', db_dict['host'],
Line 735:         '-p', db_dict['port'],
Line 736:         '-Fc',
I'm sorry, it was not clear from the commit message that the reason of the 
patch was having compressed backups and not just a backup. I asked because we 
had a discussion about dump format with log collector ended keeping -Ft as 
format.
Line 737:         '-f', backup_file,
Line 738:         db_dict['name'],
Line 739:     ]
Line 740:     execCmd(


-- 
To view, visit http://gerrit.ovirt.org/15772
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ccf8938099207b4e73bb947d1bb5fd673605071
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-dwh
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yaniv Dary <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to