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

Correctly execute yum module #4116

Closed
wants to merge 1 commit into from

Conversation

Timoses
Copy link
Contributor

@Timoses Timoses commented Jan 25, 2019

As specified in https://docs.ansible.com/ansible/2.7/modules/yum_module
the 'name' parameter can only be set to "'*'" when the 'state' parameter
is specified as "latest"

Without the "state: latest" option it can happen that ansible freezes: ansible/ansible#51284

As specified in https://docs.ansible.com/ansible/2.7/modules/yum_module
the 'name' parameter can only be set to "'*'" when the 'state' parameter
is specified as "latest"
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 25, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 25, 2019
@chadswen
Copy link
Member

ci check this
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chadswen, Timoses

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2019
@chadswen
Copy link
Member

@Timoses please sign the CNCF CLA, details in the first reply from k8s-ci-robot above.

@Timoses
Copy link
Contributor Author

Timoses commented Jan 25, 2019

@chadswen : Thanks for the hint. I will look into it!

@LuckySB
Copy link
Contributor

LuckySB commented Jan 25, 2019

Very bad request
This task is called
- name: Update package management cache (YUM)

but with the addition
state: latest
it starts updating all the packages on the server, instead of updating the cache, which is a dangerous behavior

for example:
this task silency upgrade docker from 18.06 to 18.09 on all nodes at the same time.
when restarting the docker on all nodes, the cluster will be unavailable

@Atoms
Copy link
Member

Atoms commented Jan 28, 2019

/hold

if this really is the case then this job should be reviewed, can we add some locking on newer docker releases (or any other components from yum which could break cluster?)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 28, 2019
@Timoses
Copy link
Contributor Author

Timoses commented Jan 29, 2019

See also: ansible/ansible#51284

@Timoses
Copy link
Contributor Author

Timoses commented Apr 8, 2019

CLA signed

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 8, 2019
@woopstar
Copy link
Member

woopstar commented May 1, 2019

can you fix this task according to @LuckySB's comment, please.

@Timoses
Copy link
Contributor Author

Timoses commented May 1, 2019

woopstar wrote:

can you fix this task according to @LuckySB's comment, please.

I'm not sure what exactly LuckySB wants. I am also not very well aware what exactly the yum module does / is supposed to do here.

LuckySB wrote:

Very bad request
This task is called
- name: Update package management cache (YUM)

but with the addition
state: latest
it starts updating all the packages on the server, instead of updating the cache, which is a dangerous behavior

I suppose present is the default behaviour in this case? I will have to test it with my cluster if it works and prevents the freezing when I explicitly set state: present.

for example:
this task silency upgrade docker from 18.06 to 18.09 on all nodes at the same time.
when restarting the docker on all nodes, the cluster will be unavailable
This is actually the exact problem I was experiencing. I did not connect it to the state: latest as without that the task freezes. My workaround was to use yum versionlock..

@Timoses
Copy link
Contributor Author

Timoses commented May 8, 2019

if this really is the case then this job should be reviewed, can we add some locking on newer docker releases (or any other components from yum which could break cluster?)

Since I currently have to use state: latest I have the problem that docker is simply updated to latest version. I am currently using yum versionlock to lock down Docker version.

I have triggered further review here: ansible/ansible#51284 (comment)

@Timoses
Copy link
Contributor Author

Timoses commented May 31, 2019

With PR #4619 the problematic part has been removed with the statement "it does nothing".

Closing this PR as it

  1. disturbed the intention of the task and
  2. part has been removed with PR ansible-lint: Fix commands that are also available as module [E303] #4619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants