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/06/09 07:24:27 UTC

[incubator-dlab] branch DLAB-1825 created (now 5d80f34)

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

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


      at 5d80f34  [DLAB-1825]: added possibility to enable warn_only for manage_pkg

This branch includes the following new commits:

     new 5d80f34  [DLAB-1825]: added possibility to enable warn_only for manage_pkg

The 1 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.



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


[incubator-dlab] 01/01: [DLAB-1825]: added possibility to enable warn_only for manage_pkg

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

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

commit 5d80f341927497e0210cea0b374179da75fbbd60
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Jun 9 10:23:45 2020 +0300

    [DLAB-1825]: added possibility to enable warn_only for manage_pkg
---
 infrastructure-provisioning/src/general/lib/os/debian/common_lib.py | 4 ++--
 infrastructure-provisioning/src/general/lib/os/fab.py               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index d7e129b..0c96260 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -28,7 +28,7 @@ import os
 import time
 
 
-def manage_pkg(command, environment, requisites):
+def manage_pkg(command, environment, requisites, warn='False'):
     try:
         allow = False
         counter = 0
@@ -47,7 +47,7 @@ def manage_pkg(command, environment, requisites):
                         sudo('sudo dpkg --configure -a')
                         sudo('sudo apt update')
                         try:
-                            sudo('apt-get {0} {1}'.format(command, requisites))
+                            sudo('apt-get {0} {1}'.format(command, requisites), warn_only=warn)
                         except:
                             sudo('lsof /var/lib/dpkg/lock')
                             sudo('lsof /var/lib/apt/lists/lock')
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 54cfe1c..33d68a7 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -212,7 +212,7 @@ def configure_docker(os_user):
                   stable"')
             manage_pkg('update', 'remote', '')
             sudo('apt-cache policy docker-ce')
-            manage_pkg('-y install', 'remote', 'docker-ce={}~ce~3-0~ubuntu'.format(docker_version))
+            manage_pkg('-y install', 'remote', 'docker-ce={}~ce~3-0~ubuntu'.format(docker_version), 'True')
             sudo('touch /home/{}/.ensure_dir/docker_ensured'.format(os_user))
     except Exception as err:
         print('Failed to configure Docker:', str(err))


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