Skip to content

Improve cloud-install-sys-tmplt to work in dev environment again#678

Merged
asfgit merged 3 commits intoapache:masterfrom
remibergsma:sec-stor-script-mysql-default-port
Aug 11, 2015
Merged

Improve cloud-install-sys-tmplt to work in dev environment again#678
asfgit merged 3 commits intoapache:masterfrom
remibergsma:sec-stor-script-mysql-default-port

Conversation

@remibergsma
Copy link
Contributor

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.

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.
- replace tabs with 4 spaces
- removed trailing spaces
- fixed indenting
- made if; then look the same
@asfbot
Copy link

asfbot commented Aug 11, 2015

cloudstack-pull-rats #258 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Aug 11, 2015

cloudstack-pull-requests #955 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Aug 11, 2015

cloudstack-pull-analysis #191 ABORTED

@snuf
Copy link

snuf commented Aug 11, 2015

lgtm, tested and uploads without the file there now.

@DaanHoogland
Copy link
Contributor

lgtm

@asfgit asfgit merged commit 2f858a7 into apache:master Aug 11, 2015
asfgit pushed a commit that referenced this pull request Aug 11, 2015
…t-port

Improve cloud-install-sys-tmplt to work in dev environment againThe 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.

* pr/678:
  clean-ups in the file
  this query had no -P port specified so did not work
  make sane defaults for MySQL settings

Signed-off-by: Remi Bergsma <github@remi.nl>
asfgit pushed a commit that referenced this pull request Aug 19, 2015
Backported PR #678 to 4.5

This I changed:
 ``jasypt='/usr/share/cloudstack-common/lib/jasypt-1.9.0.jar'``
in master it is 1.9.2. I changed it to 1.9.0 here, to match the original script.

Original commit IDs:
  2f858a7
  ee9b644
  8a1e79f

Signed-off-by: Remi Bergsma <github@remi.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants