Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase yum lock timeout (workaround) #1879

Merged
merged 19 commits into from
Jan 27, 2021
Merged

Increase yum lock timeout (workaround) #1879

merged 19 commits into from
Jan 27, 2021

Conversation

sk4zuzu
Copy link
Contributor

@sk4zuzu sk4zuzu commented Nov 30, 2020

No description provided.

@atsikham
Copy link
Contributor

atsikham commented Dec 4, 2020

I would use |lower for ansible_os_family everywhere, but in general LGTM.

@sk4zuzu
Copy link
Contributor Author

sk4zuzu commented Dec 4, 2020

I would use |lower for ansible_os_family everywhere, but in general LGTM.

What we really would like to do is upgrade ansible to 2.10.3 or 2.10.4 and then use bugfixed "package" and remove chunks of code from this PR. That's why I'm not so enthusiastic about merging it 🤗

@sk4zuzu sk4zuzu marked this pull request as draft December 4, 2020 11:13
@sk4zuzu sk4zuzu marked this pull request as ready for review January 25, 2021 19:22
@sk4zuzu sk4zuzu force-pushed the fix/yum-lock-timeout branch from 8018759 to 361285b Compare January 25, 2021 19:25
@sk4zuzu
Copy link
Contributor Author

sk4zuzu commented Jan 25, 2021

I can confirm that in ansible 2.10.5, passing module defaults to yum module through the package module finally works 👍😇, so I was able to simplify this PR! 🤗

@sk4zuzu sk4zuzu force-pushed the fix/yum-lock-timeout branch from 361285b to 3632c9f Compare January 26, 2021 11:10
Comment on lines 43 to 54
- name: Remove docker-ce and docker-ce-selinux
block:
- name: Remove docker-ce
package:
yum:
name: docker-ce-{{ ansible_facts.packages['docker-ce'][0].version }}
state: absent

- name: Remove docker-ce-selinux
package:
yum:
name: docker-ce-selinux-{{ ansible_facts.packages['docker-ce-selinux'][0].version }}
state: absent
when: "'docker-ce-selinux' in ansible_facts.packages"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the last condition? If no, can it be combined to the one task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know at this point 🤔 @to-bar can you shed some light here? 👍 😇

Copy link
Contributor

@to-bar to-bar Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today I would write this like:

- name: Remove Docker in version < 18.09 (RedHat)
  when: ansible_os_family == "RedHat"
  module_defaults:
    yum: { lock_timeout: 300 }
  block:
    - name: Get information about installed packages as facts
      package_facts:
        manager: auto

    - name: Remove docker-ce and docker-ce-selinux
      yum:
        name:
          - docker-ce
          - docker-ce-selinux
        state: absent
      when:
        - "'docker-ce' in ansible_facts.packages"
        - ansible_facts.packages['docker-ce'][0].version is version ('18.09', '<')

but not tested 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think another PR would be a better place for this :)

atsikham
atsikham previously approved these changes Jan 26, 2021
Copy link
Contributor

@atsikham atsikham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sk4zuzu
Copy link
Contributor Author

sk4zuzu commented Jan 27, 2021

/azp run

Copy link
Contributor

@to-bar to-bar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐜

@sk4zuzu sk4zuzu merged commit 33fcfdb into develop Jan 27, 2021
atsikham pushed a commit to atsikham/epiphany that referenced this pull request Apr 16, 2021
* common: add yum lock_timeout (fix)

* docker: add yum lock_timeout (fix)

* elasticsearch: add yum lock_timeout (fix)

* elasticsearch_curator: add yum lock_timeout (fix)

* filebeat: add yum lock_timeout (fix)

* firewall: add yum lock_timeout (fix)

* grafana: add yum lock_timeout (fix)

* kafka: add yum lock_timeout (fix)

* kibana: add yum lock_timeout (fix)

* kubernetes_common: add yum lock_timeout (fix)

* logstash: add yum lock_timeout (fix)

* opendistro_for_elasticsearch: add yum lock_timeout (fix)

* postgresql: add yum lock_timeout (fix)

* repository: add yum lock_timeout (fix)

* upgrade: add yum lock_timeout (fix)

* zookeeper: add yum lock_timeout (fix)

* group_vars: make yum_lock_timeout configurable

* Update 0.10 changelog

* group_vars: coding-style adjustment
atsikham pushed a commit to atsikham/epiphany that referenced this pull request Apr 16, 2021
* common: add yum lock_timeout (fix)

* docker: add yum lock_timeout (fix)

* elasticsearch: add yum lock_timeout (fix)

* elasticsearch_curator: add yum lock_timeout (fix)

* filebeat: add yum lock_timeout (fix)

* firewall: add yum lock_timeout (fix)

* grafana: add yum lock_timeout (fix)

* kafka: add yum lock_timeout (fix)

* kibana: add yum lock_timeout (fix)

* kubernetes_common: add yum lock_timeout (fix)

* logstash: add yum lock_timeout (fix)

* opendistro_for_elasticsearch: add yum lock_timeout (fix)

* postgresql: add yum lock_timeout (fix)

* repository: add yum lock_timeout (fix)

* upgrade: add yum lock_timeout (fix)

* zookeeper: add yum lock_timeout (fix)

* group_vars: make yum_lock_timeout configurable

* Update 0.10 changelog

* group_vars: coding-style adjustment
atsikham added a commit that referenced this pull request Apr 19, 2021
* Increase yum lock timeout (workaround) (#1879)

* common: add yum lock_timeout (fix)

* docker: add yum lock_timeout (fix)

* elasticsearch: add yum lock_timeout (fix)

* elasticsearch_curator: add yum lock_timeout (fix)

* filebeat: add yum lock_timeout (fix)

* firewall: add yum lock_timeout (fix)

* grafana: add yum lock_timeout (fix)

* kafka: add yum lock_timeout (fix)

* kibana: add yum lock_timeout (fix)

* kubernetes_common: add yum lock_timeout (fix)

* logstash: add yum lock_timeout (fix)

* opendistro_for_elasticsearch: add yum lock_timeout (fix)

* postgresql: add yum lock_timeout (fix)

* repository: add yum lock_timeout (fix)

* upgrade: add yum lock_timeout (fix)

* zookeeper: add yum lock_timeout (fix)

* group_vars: make yum_lock_timeout configurable

* Update 0.10 changelog

* group_vars: coding-style adjustment

* Fix task "repository : Wait for yum lock to be released" for CentOS Minimal (#2078)

* Bypass rhui-update-client on Azure

* Do not use yum module waiting for yum lock to be released

* Update changelog

* Fix for restoring rhui-update-client (#2095)

Co-authored-by: Michał Opala <[email protected]>
Co-authored-by: to-bar <[email protected]>
atsikham added a commit that referenced this pull request Apr 20, 2021
* Increase yum lock timeout (workaround) (#1879)

* common: add yum lock_timeout (fix)

* docker: add yum lock_timeout (fix)

* elasticsearch: add yum lock_timeout (fix)

* elasticsearch_curator: add yum lock_timeout (fix)

* filebeat: add yum lock_timeout (fix)

* firewall: add yum lock_timeout (fix)

* grafana: add yum lock_timeout (fix)

* kafka: add yum lock_timeout (fix)

* kibana: add yum lock_timeout (fix)

* kubernetes_common: add yum lock_timeout (fix)

* logstash: add yum lock_timeout (fix)

* opendistro_for_elasticsearch: add yum lock_timeout (fix)

* postgresql: add yum lock_timeout (fix)

* repository: add yum lock_timeout (fix)

* upgrade: add yum lock_timeout (fix)

* zookeeper: add yum lock_timeout (fix)

* group_vars: make yum_lock_timeout configurable

* Update 0.10 changelog

* group_vars: coding-style adjustment

* Fix task "repository : Wait for yum lock to be released" for CentOS Minimal (#2078)

* Bypass rhui-update-client on Azure

* Do not use yum module waiting for yum lock to be released

* Update changelog

* Fix for restoring rhui-update-client (#2095)

Co-authored-by: Michał Opala <[email protected]>
Co-authored-by: to-bar <[email protected]>
@to-bar to-bar deleted the fix/yum-lock-timeout branch June 30, 2021 11:55
sbbroot pushed a commit to sbbroot/epiphany that referenced this pull request Aug 17, 2021
* common: add yum lock_timeout (fix)

* docker: add yum lock_timeout (fix)

* elasticsearch: add yum lock_timeout (fix)

* elasticsearch_curator: add yum lock_timeout (fix)

* filebeat: add yum lock_timeout (fix)

* firewall: add yum lock_timeout (fix)

* grafana: add yum lock_timeout (fix)

* kafka: add yum lock_timeout (fix)

* kibana: add yum lock_timeout (fix)

* kubernetes_common: add yum lock_timeout (fix)

* logstash: add yum lock_timeout (fix)

* opendistro_for_elasticsearch: add yum lock_timeout (fix)

* postgresql: add yum lock_timeout (fix)

* repository: add yum lock_timeout (fix)

* upgrade: add yum lock_timeout (fix)

* zookeeper: add yum lock_timeout (fix)

* group_vars: make yum_lock_timeout configurable

* Update 0.10 changelog

* group_vars: coding-style adjustment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants