From: Boris Ranto Date: Tue, 2 Feb 2016 00:35:04 +0000 (+0100) Subject: [BZ-1302675] Disable timeout for pkg install/remove procedures X-Git-Tag: v1.5.32~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9fd36fdd949310b4b737f0ed698a8b09a02725f7;p=ceph-deploy.git [BZ-1302675] Disable timeout for pkg install/remove procedures 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 --- diff --git a/ceph_deploy/pkg.py b/ceph_deploy/pkg.py index 54b4b84..e40c17b 100644 --- a/ceph_deploy/pkg.py +++ b/ceph_deploy/pkg.py @@ -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()