You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/07/08 06:09:42 UTC

[GitHub] [cloudstack] harikrishna-patnala commented on a change in pull request #5187: Added ability to create schemas only when using cloudstack-setup-data…

harikrishna-patnala commented on a change in pull request #5187:
URL: https://github.com/apache/cloudstack/pull/5187#discussion_r665895030



##########
File path: setup/bindir/cloud-setup-databases.in
##########
@@ -188,7 +188,7 @@ for full help
         sys.exit(1)
 
     def setupDBSchema(self):
-        if not self.rootuser:
+        if not self.options.createschema and not self.rootuser:

Review comment:
       options.createschemaonly makes it more readable, can you please change that.

##########
File path: setup/bindir/cloud-setup-databases.in
##########
@@ -576,7 +580,11 @@ for example:
         self.parser.add_option("-j", "--encryption-jar-path", action="store", dest="encryptionJarPath", help="The path to the jasypt library to be used to encrypt the values in db.properties")
         self.parser.add_option("-n", "--encryption-key-file", action="store", dest="encryptionKeyFile", help="The name of the file in which encryption key to be generated")
         self.parser.add_option("-b", "--mysql-bin-path", action="store", dest="mysqlbinpath", help="The mysql installed bin path")
-
+        self.parser.add_option("-s", "--create-schema-only", action="store_true", dest="createschema", default=False,
+                          help="Creates the db schema without having to pass root credentials - "\

Review comment:
       any specific reason why we don't need to provide root credentials here ? I agree if we might not need it to create schema but in general, for running these kind of scripts I think it is good to ask the credentials. Correct me if anything else needs to consider. @Spaceman1984 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org