Skip to content

Commit

Permalink
assign a sane default to yum/dnf lock_timeout, in line with cli (ansi…
Browse files Browse the repository at this point in the history
…ble#57383)

* assign a sane default to yum/dnf lock_timeout, in line with cli

Fixes ansible#57189

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix typo in changelog snippet

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit d2dc4c9)
  • Loading branch information
maxamillion authored and mkrizek committed Jul 11, 2019
1 parent 840d869 commit eadf03b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/yum-sane-default-lockfile-timeout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- yum - set lock_timeout to a sane default (30 seconds, as is the cli)
- dnf - set lock_timeout to a sane default (30 seconds, as is the cli)
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/yumdnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
update_cache=dict(type='bool', default=False, aliases=['expire-cache']),
update_only=dict(required=False, default="no", type='bool'),
validate_certs=dict(type='bool', default=True),
lock_timeout=dict(type='int', default=0),
lock_timeout=dict(type='int', default=30),
),
required_one_of=[['name', 'list', 'update_cache']],
mutually_exclusive=[['name', 'list']],
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/packaging/os/dnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
description:
- Amount of time to wait for the dnf lockfile to be freed.
required: false
default: 0
default: 30
type: int
version_added: "2.8"
install_weak_deps:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/packaging/os/yum.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
description:
- Amount of time to wait for the yum lockfile to be freed.
required: false
default: 0
default: 30
type: int
version_added: "2.8"
install_weak_deps:
Expand Down

0 comments on commit eadf03b

Please sign in to comment.