Incompatible with old version of GNU timeout

Bug #1349696 reported by Jacob Bin Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Incomplete
Undecided
Unassigned

Bug Description

There is no option -k in timeout (GNU coreutils) 8.4, which is the default of Redhat 6.5:
# timeout --version
timeout (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Pádraig Brady.

# timeout --help
Usage: timeout [OPTION] NUMBER[SUFFIX] COMMAND [ARG]...
  or: timeout [OPTION]
Start COMMAND, and kill it if still running after NUMBER seconds.
SUFFIX may be `s' for seconds (the default), `m' for minutes,
`h' for hours or `d' for days.

Mandatory arguments to long options are mandatory for short options too.
  -s, --signal=SIGNAL
                   specify the signal to be sent on timeout.
                   SIGNAL may be a name like `HUP' or a number.
                   See `kill -l` for a list of signals
      --help display this help and exit
      --version output version information and exit

# timeout -k 1m 5m git remote update
timeout: invalid option -- 'k'
Try `timeout --help' for more information.

Do not know the exact version this change brought in, but timeout 8.13/8.20 works just fine.

Updated: Sorry for my misunderstanding, updated after Pádraig Brady's comment.

description: updated
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

This feature was added in version 8.5
https://github.com/coreutils/coreutils/commit/c403c31e

One could degrade gracefully like:

    timeout -k 1m 1m true 2>/dev/null && KILL_AFTER="-k 1m"
    timeout $KILL_AFTER 5m git remote update

description: updated
summary: - Incompatible with newer version of GNU timeout
+ Incompatible with old version of GNU timeout
description: updated
Revision history for this message
Clark Boylan (cboylan) wrote :

This bug doesn't indicate which usage of `timeout` is problematic. A quick grep of the openstack-infra/config repo shows us using timeout -k only in the gerrit module which won't work on centos 6.5 for other reasons.

If this is the usage that is problematic we should probably update this bug to say something like puppet module X not compatible with centos 6.5 and write up a list of all the issues including this one.

Please provide more info on where timeout is not working.

Changed in openstack-ci:
status: New → Incomplete
Revision history for this message
Evgeny Antyshev (eantyshev) wrote :

"timeout -k" is used in the devstack-gate project, which executes it on various slaves, including centos 6.5
This bug forces us to make a local clone of devstack-gate project

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.