]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[BZ-1302675] Disable timeout for pkg install/remove procedures 384/head
authorBoris Ranto <branto@redhat.com>
Tue, 2 Feb 2016 00:35:04 +0000 (01:35 +0100)
committerBoris Ranto <branto@redhat.com>
Wed, 3 Feb 2016 21:34:40 +0000 (22:34 +0100)
Do not timeout too early, here. If we use the pkg command to install
e.g. ceph-selinux or some other package with long post script we can
easily timeout in 5 minutes, disabling the timeout completely for the
pkg install procedure makes this much more safe.

The same holds for pkg removal.

Signed-off-by: Boris Ranto <branto@redhat.com>
ceph_deploy/pkg.py

index 54b4b84b9de4cd53e59aa7a651eef509a41fb0e2..e40c17baa85547893eacebe0504671bd31003884 100644 (file)
@@ -17,6 +17,12 @@ def install(args):
         )
         rlogger = logging.getLogger(hostname)
         rlogger.info('installing packages on %s' % hostname)
+        # Do not timeout on package install. If you we this command to install
+        # e.g. ceph-selinux or some other package with long post script we can
+        # easily timeout in the 5 minutes that we use as a default timeout,
+        # turning off the timeout completely for the time we run the command
+        # should make this much more safe.
+        distro.conn.global_timeout = None
         distro.packager.install(packages)
         distro.conn.exit()
 
@@ -34,6 +40,12 @@ def remove(args):
 
         rlogger = logging.getLogger(hostname)
         rlogger.info('removing packages from %s' % hostname)
+        # Do not timeout on package removal. If we use this command to remove
+        # e.g. ceph-selinux or some other package with long post script we can
+        # easily timeout in the 5 minutes that we use as a default timeout,
+        # turning off the timeout completely for the time we run the command
+        # should make this much more safe.
+        distro.conn.global_timeout = None
         distro.packager.remove(packages)
         distro.conn.exit()