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

Run Handlers When Services Should Exist #280

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

timway
Copy link
Contributor

@timway timway commented Feb 1, 2025

  • The rke2-* services might not exist so make sure to check if they should be there prior to trying to reset them.
  • rke2_installed_version is not defined prior to use. default it to an empty string.

What type of PR is this?

(REQUIRED)

  • bug
  • cleanup
  • documentation
  • feature

What this PR does / why we need it:

(REQUIRED)

The role fails to restart services during a tarball install because it tries to restart services for both rke2-server and rke2-agent regardless of what was installed.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #275

Testing

Tested on SLES15 SP6 VMs created by Terraform against a cloud-init based image on vSphere in our CI.

Release Notes

(REQUIRED)

* Ensures only installed services are attempted to be reinstalled if notified during the tarball install

* The `rke2-*` services might not exist so make sure to check if they should be there prior to trying to reset them.
* `rke2_installed_version` is not defined prior to use. default it to an empty string.
Copy link
Contributor

@aleiner aleiner left a comment

Choose a reason for hiding this comment

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

LGTM

@aleiner aleiner merged commit b1bd831 into rancherfederal:main Feb 12, 2025
6 of 11 checks passed
@aleiner
Copy link
Contributor

aleiner commented Feb 12, 2025

Thanks @timway ! I'm going to create a new issue to adjust the tarball logic to prevent this from happening in the first place! We'll get that taken care of and pushed into the next release.

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.

Could not find the requested service rke2-agent: host
2 participants