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

use crm_mon instead parsing cib with cibadmin for constraint metric #173

Open
MalloZup opened this issue Aug 31, 2020 · 6 comments
Open
Labels
enhancement New feature or request prio/low

Comments

@MalloZup
Copy link
Contributor

MalloZup commented Aug 31, 2020

Parsing CIB with cibadmin is something we should remove and use more "conventional" tools like crm_mon.

Also right now we should use just crm_mon and improve it upstream to support the needed data.

In past we parsed the cib with cibadmin as workaround but the cleanest solution would be to implement the metric with crm_mon

see the only one metric we build with that:

for _, constraint := range CIB.Configuration.Constraints.RscLocations {

@MalloZup MalloZup added the enhancement New feature or request label Aug 31, 2020
@MalloZup MalloZup changed the title use crm_mon (contributing upstream for supporting it) instead parsing CIB.xml use crm_mon instead parsing CIB.xml with cibadmin for constraint metric Aug 31, 2020
@stefanotorresi
Copy link
Member

crm_mon is just an additional layer that parses the CIB itself, why would it be the "cleanest solution"?
What are the shortcomings of parsing the CIB directly?

@MalloZup
Copy link
Contributor Author

MalloZup commented Aug 31, 2020

It is a discussion i had back in time with @gao-yan and crm_mon should be considered the official tool for getting a right formatted data. Parsing CIB etc, they are plenty of this hacks in hawk.

In this exporter, we are using here cibadmin binary for getting only one metric, the constraint metric.

Instead of maintaining 2 binary tools with different API/ABI breaking changes that we can have, we should consolidate to the crm_mon.

Also could be a nice improvement/contribution upstream to the C code to add this kind of data.

It is more a middle-term issue, but removing a binary dependency is always an improvement if we get the same data from crm_mon (which is the tool we use mostly here)

@MalloZup MalloZup changed the title use crm_mon instead parsing CIB.xml with cibadmin for constraint metric use crm_mon instead parsing cib with cibadmin for constraint metric Aug 31, 2020
@stefanotorresi
Copy link
Member

I guess we should open an issue on the Pacemaker project to add the feature we require to crm_mon, then. :)
I'm still not entirely sure if the benefits are worth the amount of work this will require; in fact, at some point I thought the other way around: to simplify the exporter, we could just use the CIB and not use crm_mon at all!

@MalloZup
Copy link
Contributor Author

it is a tracking issue which we can reference later on. :)

Parsing the CIB directly has in my knowledge some contra-effects and risks comparing to crm_mon. Maybe @gao-yan could explain more.

I think if there is no contra to parse the CIB directly and it provides the same functionality/stability as crm_mon we can get rid definitely of both binaries, for that is true.

@stefanotorresi
Copy link
Member

okay, let's keep this in the back burner and see how the whole contributing-to-upstream thing goes.

@MalloZup
Copy link
Contributor Author

yep it is definitely something as prio/low or tech-debt but is ok to track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio/low
Projects
None yet
Development

No branches or pull requests

2 participants