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
Facilitate pulp_workers config #303
Conversation
|
Attached issue: https://pulp.plan.io/issues/6774 |
roles/pulp_devel/defaults/main.yml
Outdated
| @@ -2,3 +2,4 @@ | |||
| pulp_requirements_dir: "{{ pulp_source_dir }}" | |||
| pulp_devel_package_retries: 5 | |||
| pulp_devel_supplement_bashrc: false | |||
| pulp_workers: 2 | |||
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.
nitpick: can this have a newline at the end of it. If someone were to concat this with another yml file it would break without it.
roles/pulp_workers/defaults/main.yml
Outdated
| state: started | ||
| enabled: true | ||
| pulp_workers: 2 | ||
| default_worker: |
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.
I imagined we would not be a user option. It would be useful if a user wanted to create a bunch of systemd units but then start them another way. To me that is rare enough and would require extra work from the user that I don't think adding is valuable. That's just my take; others could feel differently.
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.
This looks good to me. @mikedep333 and @dkliban ?
|
Thank you @fao89 ! |
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.
Awesome! Just see comment about the change message.
| name: pulpcore-worker@{{ item }}.service | ||
| state: started | ||
| enabled: true | ||
| with_sequence: 'start=1 count={{ pulp_workers }}' |
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.
Nice syntax!
| @@ -1,7 +1,7 @@ | |||
| # If adding new functions to this file, note that you can add help text to the function | |||
| # by defining a variable with name _<function>_help containing the help text | |||
|
|
|||
| SERVICES=("pulpcore-content pulpcore-worker@1 pulpcore-worker@2 pulpcore-resource-manager pulpcore-api") | |||
| SERVICES=("pulpcore-content {% for num in range(pulp_workers) %}pulpcore-worker@{{ num + 1 }} {% endfor %}pulpcore-resource-manager pulpcore-api") | |||
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.
Nice syntax!
CHANGES/6774.removal
Outdated
| @@ -0,0 +1 @@ | |||
| Facilitate `pulp_workers` config | |||
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.
I think we should have a more specific message.
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.
@mikedep333 can you suggest something
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.
| Facilitate `pulp_workers` config | |
| Replaced `pulp_workers` dictionary variable with the `pulp_workers` integer variable. `pulp_workers` is now simply the number of workers. |
CHANGES/6774.removal
Outdated
| @@ -0,0 +1 @@ | |||
| Facilitate `pulp_workers` config | |||
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.
| Facilitate `pulp_workers` config | |
| Replaced `pulp_workers` dictionary variable with the `pulp_workers` integer variable. `pulp_workers` is now simply the number of workers. |
https://pulp.plan.io/issues/6774
closes #6774