-
Notifications
You must be signed in to change notification settings - Fork 898
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
Fix MiqWorker service_base_name to match unit file prefix #21149
Conversation
describe ".service_base_name" do | ||
before { MiqWorkerType.seed } | ||
|
||
it "every worker has a matching systemd target and service file" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really want to make this a providers_common
spec but we'll need a good way to determine which workers come from which engine.
This is how the container_common_spec is testing all worker deployment name lengths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we? It can't hurt to check all workers in all engines. If someone changes a particular engine, then the probability they break their own engine is higher than breaking others, especially since we won't merge on red.
7204ae3
to
8e186ca
Compare
[service_file, target_file] | ||
end | ||
|
||
expect(expected_units).to match_array(found_units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized this should have been the other way around...
expect(found_units).to match_array(expected_units)
but it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fryguy I think this was actually correct originally. I swapped this in the follow-up PR but now that I'm running one switching this around prints missing unit files as "extra" rather than "missing". Nevermind there were issues with the worker seed for subclassed workers, thought it was the missing unit files but was actually missing worker classes
After we renamed the systemd services to have "manageiq-" and "manageiq-providers-" prefixes the service_base_name wasn't updated to match the new names.
Also adds a spec test to ensure all workers have systemd unit files and that there are no extra unit files without workers.
Depends on: