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
[collect] Add cluster profile for RHOSP #2916
Conversation
|
@BryanQuigley and/or @slashdd - I made this with RHOSP in mind, but mainly because I'm not familiar with other flavors of OpenStack, personally. If this same profile can be used for Ubuntu/Deb deployments (meaning, the use of the ansible inventory yaml is not RH-specific) then I can drop the RH-specific verbiage. |
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
| # | ||
| # See the LICENSE file in the source distribution for further information. | ||
|
|
||
| import yaml |
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.
Some tests are failing with Could not initialize 'collect': No module named 'yaml'. The module is provided by python3-pyyaml which is would be a new sos requirement, then. Does this single instance of usage justify the new requirement? (I realy dont know..)
ACK to the PR otherwise, on torns if it enhance sos requirements just due to this use case or not (and reinvent the wheel by manual parsing the yaml file).
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.
Yeah, I had forgotten that yaml isn't in the standard library.
I'm checking back with the RHOSP folks to see if there is another way to get the node list, as I'm very hesitant to add yet another dependency, especially for such a specific use case.
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've been looking into this a bit more.
There is a possibility of using something like openstack overcloud profiles list and then a follow up openstack command that maps the node names to addresses - however the architecture of OSP in regards to where this command is functional is not immediately clear to me.
I've also clarified with the support team that this ansible inventory file is updated as the environment changes, and is the defacto source of truth.
I'm a bit torn here. One the one hand I am really not fond of adding another dependency, but this approach to enumeration is a lot more straight forward and reliable than relying on a chain of commands that output a table and having to grok that.
|
Maybe a stupid idea: Could we assume that / is that correct? If so, we can conditionally collect the data only when "try import yaml" succeeded. |
|
No, because |
|
Been thinking on this for a bit, and going back and forth with the RHOSP team contacts that I've had for this. We really have only two choices here:
I'm leaning towards option 1, and making it a weakdep. Thoughts, @pmoravec @jjansky1 @bmr-cymru ? |
|
I don't have much experience with ansible - and for the most part Ubuntu OpenStack deployments wouldn't use it. Can you export the inventory as a json or another format Python can just use without a dependency?
|
|
Ansible is 100% yaml based for this stuff. Inventories, plays, playbooks, etc... yaml all the way down, so we wouldn't be able to get this as a json file unfortunately. On that note, how are Ubuntu Openstack deployments done? I'm wondering if maybe there's some common ground we're overlooking that might be a suitable replacement to referencing the inventory file. |
|
I feel the option 1 (new weak dependency) has less negs than the 2, indeed. |
Adds a cluster profile for Red Hat OpenStack Platform to identify controller and (optionally) compute nodes to collect sos reports from. Note that this adds a dependency on pyyaml to sos. This should be considered a weak dependency by downstreams. As such, it is added as a 'Recommends' in `sos.spec`. pip does not have the concept of 'weak dependencies', and so is added as a regular requirement in `setup.py`. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
46c0668
to
8b2e1c7
Compare
Adds a cluster profile for Red Hat OpenStack Platform to identify
controller and (optionally) compute nodes to collect sos reports from.
Signed-off-by: Jake Hunsaker jhunsake@redhat.com
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines