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

Make sure kubelet gets restarted after package version change #525

Closed
wants to merge 2 commits into from

Conversation

danifr
Copy link
Contributor

@danifr danifr commented Jul 9, 2021

Fix #524

@danifr danifr requested a review from a team as a code owner July 9, 2021 14:22
@puppet-community-rangefinder
Copy link

kubernetes::packages is a class

that may have no external impact to Forge modules.

kubernetes::service is a class

that may have no external impact to Forge modules.

This module is declared in 0 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@danifr
Copy link
Contributor Author

danifr commented Jul 9, 2021

Hmm I am not sure why the tests failed.

I am doing something similar to: https://github.com/puppetlabs/puppetlabs-kubernetes/blob/main/manifests/packages.pp#L357 (referencing a Service declared in the service.pp class)

I someone can give me a hint I'd appreciate it.

@danifr danifr force-pushed the restart_kubelet branch 11 times, most recently from c2ede67 to 65c2a71 Compare July 12, 2021 14:27
@danifr
Copy link
Contributor Author

danifr commented Jul 12, 2021

Well, I don't know what I can do to make the tests pass... I tried a few different approaches but I always get an error. I wonder if the tests are OK.

Just so you know, same patch, running on my infra, works as expected (kubelet services gets restarted after a package update):

Notice: /Stage[main]/Kubernetes::Packages/Package[kubelet]/ensure: ensure changed '1.20.8-0' to '1.21.0' (corrective)
Info: /Stage[main]/Kubernetes::Packages/Package[kubelet]: Scheduling refresh of Service[kubelet]
Notice: /Stage[main]/Kubernetes::Packages/Package[kubectl]/ensure: ensure changed '1.20.8-0' to '1.21.0' (corrective)
Notice: /Stage[main]/Kubernetes::Packages/Package[kubeadm]/ensure: ensure changed '1.20.8-0' to '1.21.0' (corrective)

@daianamezdrea can you please review it? Thanks

@daianamezdrea
Copy link
Contributor

Hi @danifr, thank you ! Yes, I'll have a look, I'll try to debug it locally and see what is not working fine

@danifr danifr force-pushed the restart_kubelet branch 4 times, most recently from c019df9 to cde07d4 Compare July 20, 2021 14:15
@daianamezdrea
Copy link
Contributor

daianamezdrea commented Aug 10, 2021

Hi @danifr, I pushed some changes to see if the specs are going to pass

@danifr
Copy link
Contributor Author

danifr commented Aug 10, 2021

@daianamezdrea OMG thanks a lot!!!

@CLAassistant
Copy link

CLAassistant commented Sep 1, 2021

CLA assistant check
All committers have signed the CLA.

@danifr
Copy link
Contributor Author

danifr commented Sep 21, 2021

Hello again, can we get this change merged and have it available within the next release? Thank you!

@danifr
Copy link
Contributor Author

danifr commented Sep 28, 2021

@daianamezdrea Hi! sorry for insisting, did you have some time to look at this? I think we can safely merge it into main

@daianamezdrea
Copy link
Contributor

Hi @danifr, I required @carabasdaniel review on the changes I've made and he said that the dependencies added transform the unit tests in acceptance (with the changes I did) so I need to re-think the issue, sorry for the late response, looking now again how to approach it

@danifr
Copy link
Contributor Author

danifr commented Jan 3, 2022

Hi @daianamezdrea happy new year! is there something I can do to have this merged?

@chelnak chelnak reopened this May 9, 2022
@puppet-community-rangefinder
Copy link

kubernetes::packages is a class

that may have no external impact to Forge modules.

kubernetes::service is a class

that may have no external impact to Forge modules.

This module is declared in 0 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@chelnak
Copy link
Contributor

chelnak commented May 9, 2022

Looks like there were some failing tests on the last run.

I've re kicked them so we can get a fresh view of what is happening.

@chelnak chelnak closed this May 9, 2022
@chelnak chelnak reopened this May 9, 2022
@puppet-community-rangefinder
Copy link

kubernetes::packages is a class

that may have no external impact to Forge modules.

kubernetes::service is a class

that may have no external impact to Forge modules.

This module is declared in 0 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@chelnak
Copy link
Contributor

chelnak commented May 9, 2022

Looks like we have some conflicts. Could you rebase on current main please?

@chelnak chelnak removed the stale label May 9, 2022
@github-actions
Copy link

github-actions bot commented Jul 9, 2022

Hello! 👋

This pull request has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which PRs need our attention.

If you are waiting on a response from us we will try and address your comments on a future Community Day.

Alternatively, if it is no longer relevant to you please close the PR with a comment.

Please note that if a pull request receives no update for 7 after it has been labelled, it will be closed. We are always happy to re-open pull request if they have been closed in error.

@danifr
Copy link
Contributor Author

danifr commented Jul 10, 2022

Hi @chelnak, sorry I missed you comment. I just rebased from main and the tests are still failing...

I don't understand why though... the only relevant change that this PR introduces is:

https://github.com/puppetlabs/puppetlabs-kubernetes/pull/525/files#diff-98b7734749457d0f7b07bfccf04f7316e31a48cdf3e02a46cb3cb8209daecb29R128

Maybe you know what's going on.

@deric
Copy link
Collaborator

deric commented Jul 19, 2022

@danifr For failing tests see #565

@danifr
Copy link
Contributor Author

danifr commented Jul 27, 2022

Still failing... I will try removing @daianamezdrea commit from this PR. Let's see

@danifr
Copy link
Contributor Author

danifr commented Jul 27, 2022

Blows my mind that is fails with:

# Puppet::Parser::Compiler::CatalogValidationError:
#   Could not find resource 'Service[kubectl]' in parameter 'notify' (file: /home/runner/work/puppetlabs-kubernetes/puppetlabs-kubernetes/spec/fixtures/modules/kubernetes/manifests/packages.pp, line: 368)

Because of: https://github.com/puppetlabs/puppetlabs-kubernetes/pull/525/files#diff-7395f2f3aeb84af1465802a40aed5e8226f466887bccbf9a8e4599ea73f50964R386

But it does not say anything about: https://github.com/puppetlabs/puppetlabs-kubernetes/blob/main/manifests/packages.pp#L357
that is basically the same thing.

manifests/packages.pp Outdated Show resolved Hide resolved
@danifr danifr force-pushed the restart_kubelet branch 2 times, most recently from 75a6845 to 95718fb Compare August 2, 2022 15:59
@jordanbreen28
Copy link
Contributor

@danifr looks like there are some merge conflicts. Could you resolve these so we can assess how to proceed with this.

@danifr
Copy link
Contributor Author

danifr commented Sep 29, 2022

I just did it. Thanks for the heads-up :)

@GSPatton
Copy link
Contributor

hey @danifr. I pulled your PR and ran the tests locally. The tests fail on your branch but pass on the master branch so the failures are due to your changes.

The failing tests complain about missing k8s-related files e.g. expected to contain File[/etc/systemd/system/kubelet.service.d/20-cloud.conf] with content =~ /--cloud-provider=openstack/ etc. This may be a good starting point.

Hopefully this helps!

@GSPatton GSPatton closed this Oct 24, 2022
@danifr
Copy link
Contributor Author

danifr commented Oct 24, 2022

@GSPatton sorry did not have time to work on this. I can open a new PR in the future if I managed to get it working.

I need to figure out how to run the test locally, so I can make sure the test pass before opening a PR. Do you have some docs or info on how to run them locally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

daemon-reload and restart kubelet after version change
7 participants