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

Add Ansible Automation Platform as a cluster option in sos collect #3344

Open
Sayalijoshi25 opened this issue Aug 28, 2023 · 3 comments
Open

Comments

@Sayalijoshi25
Copy link

  • Add Ansible Automation Platform as a cluster option in sos collect to allow Ansible Automation Platform customers to generate and collect sos reports from their cluster for support cases

  • Allow Ansible Automation Platform customers to generate and collect sos reports from their cluster for support cases, saving administrators and support engineers time

  • The Ansible Automation platform is a clustered service It would make sense to have it added to the cluster list for collecting sos reports from multiple systems at once.

sos collect -l

@TurboTurtle
Copy link
Member

Definitely a valid use case for a cluster profile. What we'd need to know is a standard way to identify the hosts in the cluster. Is there a command that can be run, or an easily accessible/scrape-able API we can hit to get the host list?

@pmoravec
Copy link
Contributor

Definitely a valid use case for a cluster profile. What we'd need to know is a standard way to identify the hosts in the cluster. Is there a command that can be run, or an easily accessible/scrape-able API we can hit to get the host list?

I got some hints from AAP colleagues here: For identifying if a controller instance is a cluster or not, the command awx-manage list_instances may be used:

# awx-manage list_instances
[controlplane capacity=112 policy=100%]
    [vm-10-1-230-102.obfusscateddomain0.com](http://vm-10-1-230-102.obfusscateddomain0.com/) capacity=56 node_type=control version=4.4.1 heartbeat="2023-08-29 09:04:23"
    [vm-10-1-230-103.obfusscateddomain0.com](http://vm-10-1-230-103.obfusscateddomain0.com/) capacity=56 node_type=control version=4.4.1 heartbeat="2023-08-29 09:05:13"

[default capacity=114 policy=100%]
    [vm-10-1-230-100.obfusscateddomain0.com](http://vm-10-1-230-100.obfusscateddomain0.com/) capacity=57 node_type=execution version=ansible-runner-2.3.2 heartbeat="2023-08-29 09:04:52"
    [vm-10-1-230-97.obfusscateddomain0.com](http://vm-10-1-230-97.obfusscateddomain0.com/) capacity=57 node_type=execution version=ansible-runner-2.3.2 heartbeat="2023-08-29 09:04:36"

[workers capacity=114]
    [vm-10-1-230-100.obfusscateddomain0.com](http://vm-10-1-230-100.obfusscateddomain0.com/) capacity=57 node_type=execution version=ansible-runner-2.3.2 heartbeat="2023-08-29 09:04:52"
    [vm-10-1-230-97.obfusscateddomain0.com](http://vm-10-1-230-97.obfusscateddomain0.com/) capacity=57 node_type=execution version=ansible-runner-2.3.2 heartbeat="2023-08-29 09:04:36"

[ungrouped capacity=0]
    [vm-10-1-230-213.obfusscateddomain0.com](http://vm-10-1-230-213.obfusscateddomain0.com/) node_type=hop heartbeat="2023-08-29 09:04:48"

I guess if the output is not empty and contains the hostname's FQDN, we are on AAP cluster. And we should parse the output for the cluster nodes list.

@TurboTurtle
Copy link
Member

I don't have anything available to me personally to poke around with this. Does awx-manage provide a way to output as json/yaml? We can slice and dice the raw text output if needed, but it'd be a lot easier if it could come pre-packaged in a more consumable form.

Is there a desired default we want to limit the list of hosts to by grouping? I.E. should we just use controlplane, or should workers or default be the...default?

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

No branches or pull requests

3 participants