You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/04/22 08:08:10 UTC

[incubator-datalab] 01/01: [DATALAB-2361]: added warn_only True to luarocks install

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2361
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit a4af6a9566b496e6cf05e6694f0c3d5507dc7922
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Apr 22 11:07:53 2021 +0300

    [DATALAB-2361]: added warn_only True to luarocks install
---
 infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
index 2a4cb9f..3ab9232 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
@@ -135,7 +135,8 @@ def install_nginx_lua(edge_ip, nginx_version, keycloak_auth_server_url, keycloak
                         if counter > 5:
                             sys.exit(1)
                         else:
-                            if 'Could not fetch' in sudo('luarocks install lua-resty-jwt 0.2.2 --tree /usr/local/openresty/lualib/resty/ 2>&1') or 'Could not fetch' in sudo('luarocks install lua-resty-openidc --tree /usr/local/openresty/lualib/resty/ 2>&1'):
+                            if 'Could not fetch' in sudo('luarocks install lua-resty-jwt 0.2.2 --tree /usr/local/openresty/lualib/resty/ 2>&1', warn_only=True) \
+                                    or 'Could not fetch' in sudo('luarocks install lua-resty-openidc --tree /usr/local/openresty/lualib/resty/ 2>&1', warn_only=True):
                                 counter += 1
                                 time.sleep(10)
                             else:
@@ -150,7 +151,8 @@ def install_nginx_lua(edge_ip, nginx_version, keycloak_auth_server_url, keycloak
                     if counter > 5:
                         sys.exit(1)
                     else:
-                        if 'Could not fetch' in sudo('luarocks install lua-resty-jwt 0.2.2 2>&1') or 'Could not fetch' in sudo('luarocks install lua-resty-openidc 2>&1'):
+                        if 'Could not fetch' in sudo('luarocks install lua-resty-jwt 0.2.2 2>&1', warn_only=True) \
+                                or 'Could not fetch' in sudo('luarocks install lua-resty-openidc 2>&1', warn_only=True):
                             counter += 1
                             time.sleep(10)
                         else:

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org