GitHub user remibergsma opened a pull request:
https://github.com/apache/cloudstack/pull/678
Improve cloud-install-sys-tmplt to work in dev environment again
The script that you run to initially setup secondary storage, had some
errors. As it now depends on /etc/cloudstack/management/db.properties, it did
not work any more on my development environment.
I defined some defaults that work in development environments (those are
sane defaults anyway), then check if the
/etc/cloudstack/management/db.properties file exists. If so, it reads from
there and gets the vars just like before. If not, it keeps the defaults unless
of course someone overrides them on the command line.
While working on the script, I also fixed the indentation and found a query
that was not yet using the -P mysql port variable.
I tested it both on my development environment as well as in an environment
installed from RPM (where you'd have /etc/cloudstack/management/db.properties
and that both worked.
PS @snuf please check if it also works again for you.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/remibergsma/cloudstack
sec-stor-script-mysql-default-port
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/678.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #678
----
commit 8a1e79f518eadd772913d01c66a98414867fc8a6
Author: Remi Bergsma <[email protected]>
Date: 2015-08-11T11:37:24Z
make sane defaults for MySQL settings
In dev environments, there is no /etc/cloudstack/management/db.properties
file
That forces you to specify all parameters on the command line. This commit
sets some defaults, like port 3306, user root and localhost.
When available, it will still get settings from the config file and it will
also allow you to override it on the command line. So it is fully backwards
compatible.
commit ee9b644e28f8c1bab6afb94311054f2cd2f2e3d9
Author: Remi Bergsma <[email protected]>
Date: 2015-08-11T12:43:17Z
this query had no -P port specified so did not work
commit 2f858a7d088f4a41c35bf1c0577f922a51fc3ca2
Author: Remi Bergsma <[email protected]>
Date: 2015-08-11T12:55:16Z
clean-ups in the file
- replace tabs with 4 spaces
- removed trailing spaces
- fixed indenting
- made if; then look the same
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---