Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#306] [#457] [#458] Fix regression in ydbinstall.sh that caused it t…
…o fail with YDB-E-SYSCALL errors * `ydbinstall.sh` was observed to fail with the below error when one tried to install YDB as well as at least one plugin (posix, zlib, encryption plugin). ``` + echo Error file at /tmp/ydb_env_20174_GQOTSJ is: Error file at /tmp/ydb_env_20174_GQOTSJ is: + cat /tmp/ydb_env_20174_GQOTSJ/err %YDB-E-SYSCALL, Error received from system call getcwd -- called from module sr_port/setzdir.c at line 70 %YDB-I-TEXT, No such file or directory ``` * Turns out it is a regression introduced in a prior commit (acb8b27). Before that commit, ydbinstall.sh did a `rm -rf $tmpdir` at the end of the script once it knew YottaDB was successfully installed. But as part of that commit, code was added to install the plugins (if they were specified as part of the ydbinstall.sh command line) AFTER the location where the `rm -rf $tmpdir` happened. And each plugin installation had a `ydb_env_set` invocation to start with. Because of the `rm -rf $tmpdir`, each of these `ydb_env_set` invocations happened in a non-existent directory. And this is the source of the `getcwd()` failure and the resultant `YDB-E-SYSCALL` errors. * This is now fixed by moving the `rm -rf $tmpdir` to the new end of the ydbinstall.sh script AFTER the plugin install code. Each plugin install records whether it succeeded or not. If any plugin install fails, the `rm -rf $tmpdir` is not done at the end. If all plugin installs succeed, only then is it done. * In addition, the exit status of ydbinstall.sh is now fixed to be 0 if all plugin installs succeed and 1 (a non-zero value) if at least one plugin install failed. * Fixed a sh syntax error in a `"default" = $ydb_icu_version` check. Surrounded the `$ydb_icu_version` usage in double-quotes. Or else one got a `./ydbinstall.sh: 896: [: =: argument expected` error.
- Loading branch information