You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/10 13:57:40 UTC

[incubator-dlab] branch DLAB-1974 updated (f7de3ab -> d22cd36)

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

lfrolov pushed a change to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


    from f7de3ab  Merge branch 'DLAB-1974' of https://github.com/apache/incubator-dlab into DLAB-1974
     new 81c9938  [DLAB-1974]: fixed error
     new 9aa747e  [DLAB-1974]: fixed some bugs
     new 2070e05  [DLAB-1974]: fixed some bugs
     new b8e77dd  [DLAB-1974]: fixed some bugs
     new d22cd36  [DLAB-1974]: fixed some bugs

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 infrastructure-provisioning/src/general/lib/os/fab.py | 19 ++++++++++---------
 .../src/general/lib/os/redhat/notebook_lib.py         |  4 +++-
 2 files changed, 13 insertions(+), 10 deletions(-)


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


[incubator-dlab] 01/05: [DLAB-1974]: fixed error

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 81c99381b199f11b099960c7ea8a81df273cab45
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Aug 7 16:29:40 2020 +0300

    [DLAB-1974]: fixed error
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 1b57861..b394671 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -72,7 +72,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
                 version = pip_pkg[1]
                 pip_pkg = "{}=={}".format(pip_pkg[0], pip_pkg[1])
             sudo('{0} install -U {1} --no-cache-dir 2>&1 | tee /tmp/tee.tmp; if ! grep -w -i -E  "({2})" /tmp/tee.tmp > '
-                 ' /tmp/{0}install_{2}.log; then  echo "" > /tmp/{0}install_{2}.log;fi'.format(pip_version, pip_pkg, error_parser, name))
+                 ' /tmp/{0}install_{3}.log; then  echo "" > /tmp/{0}install_{3}.log;fi'.format(pip_version, pip_pkg, error_parser, name))
             err = sudo('cat /tmp/{0}install_{1}.log'.format(pip_version, pip_pkg.split("==")[0])).replace('"', "'")
             sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, name))
             res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, name))


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


[incubator-dlab] 05/05: [DLAB-1974]: fixed some bugs

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit d22cd369ce2363e50e9a5edd1b5ff74b01b0d70d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Aug 10 16:17:57 2020 +0300

    [DLAB-1974]: fixed some bugs
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index cc0f940..795e546 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -443,10 +443,10 @@ def install_r_pkg(requisites):
             else:
                 vers = '"{}"'.format(vers)
             if name == 'sparklyr':
-                run('sudo -i R -e \'devtools::install_version("{0}", version = {1}, repos = "http://cran.us.r-project.org", dep=TRUE)\' 2>&1 | '
+                run('sudo -i R -e \'devtools::install_version("{0}", version = {1}, repos = "http://cran.us.r-project.org", dependencies = NA)\' 2>&1 | '
                         'tee /tmp/tee.tmp; if ! grep -w -E  "({2})" /tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > /tmp/install_{0}.log;fi'.format(name, vers, error_parser))
             else:
-                sudo('R -e \'devtools::install_version("{0}", version = {1}, repos = "https://cloud.r-project.org", dep=TRUE)\' 2>&1 | '
+                sudo('R -e \'devtools::install_version("{0}", version = {1}, repos = "https://cloud.r-project.org", dependencies = NA)\' 2>&1 | '
                          'tee /tmp/tee.tmp; if ! grep -w -E  "({2})" /tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > /tmp/install_{0}.log;fi'.format(name, vers, error_parser))
             dep = sudo('grep "(NA.*->". /tmp/tee.tmp | awk \'{print $1}\'').replace('\r\n', ' ')
             dep_ver = sudo('grep "(NA.*->". /tmp/tee.tmp | awk \'{print $4}\'').replace('\r\n', ' ').replace(')', '').split(' ')


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


[incubator-dlab] 04/05: [DLAB-1974]: fixed some bugs

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit b8e77dd9ed3d088b155a6f29cd27167dd4c3768d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Aug 10 15:29:06 2020 +0300

    [DLAB-1974]: fixed some bugs
---
 infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
index 62bc386..6fbb306 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
@@ -377,8 +377,10 @@ def install_os_pkg(requisites):
                 dep = [i for i in dep if i]
             versions = []
             res = sudo(
-                'python -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); print [pkg.vr for pkg in pl.installed if pkg.name == \'{0}\'][0]"'.format(
+                'python -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); print [pkg.vr for pkg in pl.installed if pkg.name == \'{0}\']"'.format(
                     name))
+            if res != []:
+                res = res[0]
             if err:
                 status_msg = 'installation_error'
             elif res:


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


[incubator-dlab] 02/05: [DLAB-1974]: fixed some bugs

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 9aa747ee834771505683fdf4884736b5fd3b1df2
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Aug 10 10:56:42 2020 +0300

    [DLAB-1974]: fixed some bugs
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index b394671..a200a88 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -98,7 +98,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
             versions = []
             if 'Could not find a version that satisfies the requirement' in err:
                 versions = err[err.find("(from versions: ") + 16: err.find(")\r\n")]
-                if versions != '':
+                if versions != '' and versions != 'none':
                     versions = versions.split(', ')
                     status_msg = 'invalid_version'
                 else:
@@ -447,8 +447,8 @@ def install_r_pkg(requisites):
             else:
                 sudo('R -e \'devtools::install_version("{0}", version = {1}, repos = "https://cloud.r-project.org", dep=TRUE)\' 2>&1 | '
                          'tee /tmp/tee.tmp; if ! grep -w -E  "({2})" /tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > /tmp/install_{0}.log;fi'.format(name, vers, error_parser))
-            dep = sudo('grep "(NA" /tmp/tee.tmp | awk \'{print $1}\'').replace('\r\n', ' ')
-            dep_ver = sudo('grep "(NA" /tmp/tee.tmp | awk \'{print $4}\'').replace('\r\n', ' ').replace(')', '').split(' ')
+            dep = sudo('grep "(NA.*->". /tmp/tee.tmp | awk \'{print $1}\'').replace('\r\n', ' ')
+            dep_ver = sudo('grep "(NA.*->". /tmp/tee.tmp | awk \'{print $4}\'').replace('\r\n', ' ').replace(')', '').split(' ')
             if dep == '':
                 dep = []
             else:


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


[incubator-dlab] 03/05: [DLAB-1974]: fixed some bugs

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 2070e05bc83f489581d5698d3dfb0d4e62afcc31
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Aug 10 15:01:06 2020 +0300

    [DLAB-1974]: fixed some bugs
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index a200a88..cc0f940 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -74,16 +74,17 @@ def install_pip_pkg(requisites, pip_version, lib_group):
             sudo('{0} install -U {1} --no-cache-dir 2>&1 | tee /tmp/tee.tmp; if ! grep -w -i -E  "({2})" /tmp/tee.tmp > '
                  ' /tmp/{0}install_{3}.log; then  echo "" > /tmp/{0}install_{3}.log;fi'.format(pip_version, pip_pkg, error_parser, name))
             err = sudo('cat /tmp/{0}install_{1}.log'.format(pip_version, pip_pkg.split("==")[0])).replace('"', "'")
-            sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, name))
+            sudo('{0} freeze --all | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, name))
             res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, name))
+            installed_out = sudo('cat /tmp/tee.tmp | grep "Successfully installed"')
             changed_pip_pkg = False
             if res == '':
                 changed_pip_pkg = pip_pkg.split("==")[0].replace("_", "-").split('-')
                 changed_pip_pkg = changed_pip_pkg[0]
-                sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > '
+                sudo('{0} freeze --all | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > '
                      '/tmp/{0}install_{1}.list;fi'.format(pip_version, changed_pip_pkg))
                 res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, changed_pip_pkg))
-            if err:
+            if err and name not in installed_out:
                 status_msg = 'installation_error'
             elif res:
                 res = res.lower()


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