CS-14703 fixed

This commit is contained in:
Edison Su 2012-05-17 13:53:45 -07:00
parent b74156dba3
commit 89cb26c4ea
2 changed files with 9 additions and 2 deletions

View File

@ -3,8 +3,8 @@ SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI';
DROP DATABASE IF EXISTS cloudbridge;
CREATE DATABASE cloudbridge;
GRANT ALL ON cloudbridge.* to `cloud`@`localhost`;
GRANT ALL ON cloudbridge.* to `cloud`@`%`;
GRANT ALL ON cloudbridge.* to cloud@`localhost` identified by 'cloud';
GRANT ALL ON cloudbridge.* to cloud@`%` identified by 'cloud';
GRANT process ON *.* TO `cloud`@`localhost`;
GRANT process ON *.* TO `cloud`@`%`;

View File

@ -242,6 +242,13 @@ for full help
self.info(None, True)
awsApiDbDir = '/usr/share/cloud/setup/bridge/db'
for f in ["cloudbridge_db"]:
p = os.path.join(awsApiDbDir,"%s.sql"%f)
if not os.path.exists(p): continue
text = file(p).read()
for t, r in replacements: text = text.replace(t,r)
file(p, 'w').write(text)
awsApiCmds = ['cd %s;'%awsApiDbDir, 'sh deploy-db-bridge.sh %s;'%self.rootpassword, 'cd -']
runCmd(awsApiCmds)