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

wishlist: filter crm configure show by type of the primitive #819

Closed
klaernie opened this issue May 28, 2021 · 3 comments
Closed

wishlist: filter crm configure show by type of the primitive #819

klaernie opened this issue May 28, 2021 · 3 comments

Comments

@klaernie
Copy link

it would be really neat if crm configure show could be filtered by the type of the primitive, so that one could for example filter down to only the IPaddr2 resources.

My specific use case is scanning multiple machines to keep an inventory database up to date, where it would be nice to filter out which IPs are used by the clusters.

Right now I use the following one liner to grab the information needed, but this isn't the most practical to maintain:

env PAGER=cat crm configure show | perl -pe 's/\\\n//' | perl -ne 'if(m/prm_([^\s]+)_IP\sIPaddr2.*ip=([\d.]+).*cidr_netmask=(\d+)/){ print "$1|$2/$3\n" }'

I realize that this is a pure wishlist item, maybe it's a good first contribution for someone to get their feet wet.

@liangxin1300
Copy link
Collaborator

Hi @klaernie ,
Currently crmsh support crm configure show type:primitive, is that what you want?

@klaernie
Copy link
Author

klaernie commented Jun 1, 2021

Hi @liangxin1300

That helps partially, but of cause still lists more resources than in my case the IP addresses. Most of the clusters I run scans for have 5-10 LVM volume groups and logical volumes, 2-3 application resources and only one IPaddr2 resource.

@liangxin1300
Copy link
Collaborator

Hi @liangxin1300

That helps partially, but of cause still lists more resources than in my case the IP addresses. Most of the clusters I run scans for have 5-10 LVM volume groups and logical volumes, 2-3 application resources and only one IPaddr2 resource.

Seems like this issue #698
I will put this into my backlog
Thank you @klaernie !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants