Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init file overwrites configuration file #131

Closed
mehranshakeri opened this issue Dec 9, 2016 · 10 comments
Closed

init file overwrites configuration file #131

mehranshakeri opened this issue Dec 9, 2016 · 10 comments

Comments

@mehranshakeri
Copy link
Contributor

mehranshakeri commented Dec 9, 2016

Problem is that init file is overwriting some parameters which we expect to set them in configuration file. e.g. LevelDB home folder.
After setting leveldb.home = /some/where/else/data in configuration file, our Warp10 instance failed. After investigation we found out that this parameter is overwritten in init file. But since I'm not sure what is the process and order of running LevelDB, I couldn't decide what should be the general solution.

In our case we introduced another parameter in init file to have the same value as configuration there.

If only by having these kind of parameters in configuration file, Warp10 platform can work properly, then they should be not set in init file again, when the configuration file exists.

@morind
Copy link
Contributor

morind commented Dec 9, 2016

Hi Mehran,

Have you created the Warp10 config file on your own before the first start ?
If so, an error may occurs. At first start, that init file forces the leveldb home directory to ${WARP10_HOME}/data
Then, if the WARP10 config file exists it will not be overwritten.
In the same way, if ${WARP10_HOME}/data contains some files, we do not launch the leveldb init.

@mehranshakeri
Copy link
Contributor Author

Hi David,

We are trying to write a script to setup and run Warp10 standalone in our system using init file.
We did two tests. First we changed the LevelDB path in conf-standalone.template file and we assumed it will be applied when we run init file for the first time. But it failed.

Second test, I changed path to LevelDB in my existing running instance and created all the files and folders in new path and removed old folder. This way Warp10 couldn't find new path and it created that folder again and LevelDB created its own file there as well.

init output:

find: ‘/opt/warp10/data’: No such file or directory
Init leveldb

Then I added new path where /data was used in init file and it worked fine.

@morind
Copy link
Contributor

morind commented Dec 9, 2016

Patch is in progress.. :)
The Warp config file will become the reference.
If that file exists, init file will take the leveldb.home parameter.
Otherwise, at first start, it will be forced to ${WARP10_HOME}/data

@mehranshakeri
Copy link
Contributor Author

Thanks,

And what about template? If it's set in template but there is still no configuration? I would like to know to create a custom setup, should we edit init file or template?

@morind
Copy link
Contributor

morind commented Dec 9, 2016

In template, we have: leveldb.home = ${standalone.home}/data
Init file updates only the standalone.home parameter.
Thus, you can force the leveldb.home parameter in template.

@mehranshakeri
Copy link
Contributor Author

mehranshakeri commented Dec 9, 2016

Since you are working on this init file, we came up with another bug :D
Setting QUANTUM_START=false doesn't work as well.

edit: We expected to stop running Quantum by setting that parameter as false.

@morind
Copy link
Contributor

morind commented Dec 9, 2016

Yes, the name is quite ambiguous.
This parameter is only to check if Quantum has been started.
To disable Quantum, you have to comment the Quantum plugin in Warp config file. For example:
#warp10.plugins = io.warp10.plugins.quantum.QuantumPlugin

@mehranshakeri
Copy link
Contributor Author

That's actually better .

Another one :D
warp10-quantum-server doesn't exist anymore since Quantum is plugin now.

@morind
Copy link
Contributor

morind commented Dec 9, 2016

Thanks Mehran.
Fixed

morind added a commit to morind/warp10-platform-dmn that referenced this issue Dec 9, 2016
hbs added a commit that referenced this issue Dec 9, 2016
issue #131 and use of Quantum 2.1.51
@hbs hbs closed this as completed Dec 9, 2016
@morind
Copy link
Contributor

morind commented Dec 9, 2016

When you update the leveldb_home parameter, do not forget to update the LEVELDB_HOME variable in snapshot.sh.

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

No branches or pull requests

3 participants