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

Make drivers.yaml file optional #35

Closed

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Apr 3, 2024

Change the path to the drivers.yaml from a constant to a user-definable parameter path.supported-drivers-version-db. If the user does not specify any value for the file path, then every ethernet driver is considered good to use.

@SchSeba @Eoghan1232 please take a look

Change the path to the `drivers.yaml` from a constant to a
user-definable parameter `path.supported-drivers-version-db`.
If the user does not specify any value for the file path, then every
ethernet driver is considered good to use.

Signed-off-by: Andrea Panattoni <[email protected]>
@zeeke zeeke force-pushed the optional-version-map branch from 341f74b to 9f558ab Compare April 3, 2024 10:33
@Eoghan1232
Copy link
Collaborator

Should we assume every driver is considered good to use?
I think the default values should be hard-set unless overwritten in the new driver yaml file?

if a user used an out of date driver, i.e. not supported - it would just fail?

wdyt?

@zeeke
Copy link
Member Author

zeeke commented Apr 3, 2024

Should we assume every driver is considered good to use?

That's a good question. If the IsDriverSupported check is removed, the VfStats(...) function will log an error and return empty stats. That's almost the same behavior, but we'd get a slightly worse error message.

func VfStats(pf string) PerPF {

The problem with the supported driver map is that an in-tree driver inherits the version from the kernel. So it's not trivial to prepare a good drivers.yaml file.

@Eoghan1232
Copy link
Collaborator

right - but if we are assuming that if a yaml is not provided, then return empty and assume all are correct, this will be the default configuration for everyone

so there' not much point in checking it then.....

it's a catch 22, if you default it to some values, then folks will hit it and have to either set the values to empty and overwrite, or else explicitly set the values based on their env..........

I am not sure which approach I like better....

maybe don't check the version - and call out a minimum (we do this) in the README
and update the logs - to say it could be an issue with driver version ?

@zeeke @SchSeba not sure, what are your opinions here?

@zeeke
Copy link
Member Author

zeeke commented Apr 3, 2024

Mentioning the supported hardware and driver version in the README is enough, IMO. I vote for removing the IsDriverSupported check, but I'm ok with anything that can simplify the deployment of this component

Alos, I'd like to hear what @SchSeba think about this

@SchSeba
Copy link
Collaborator

SchSeba commented Apr 8, 2024

I will vote to remove this file as I don't think it really works for in-tree drivers.

for example, we have 1.9 version in the file for ICE driver but for example, in RHEL all the driver versions are based on the kernel. For example "4.18.0-513.18.1.el8_9.x86_64" will be marked as a "good" version but we don't really know if that driver is newer or older than the u/s 1.9 version requested in the file

@Eoghan1232
Copy link
Collaborator

@zeeke any progress on this?

@zeeke
Copy link
Member Author

zeeke commented May 8, 2024

Sorry, I wasn't sure I got the plan here.

Can you confirm this:
a. the exporter does not read any drivers.yaml file.
b. netlink collector is used regardless the driver and/or the version
c. (optional) we log a warning if the driver version is older than some hardcoded value

is that right?

@Eoghan1232
Copy link
Collaborator

Sorry, I wasn't sure I got the plan here.

Can you confirm this: a. the exporter does not read any drivers.yaml file. b. netlink collector is used regardless the driver and/or the version c. (optional) we log a warning if the driver version is older than some hardcoded value

is that right?

my understanding is that we will remove the drivers.yaml file, remove the IsDriverSupported check.
add a note/couple lines in README calling out the minimum supported version.

I think if netlink fails, then we can fall back on sysfs collector, etc.

@zeeke @SchSeba is this what has been agreed?

@zeeke
Copy link
Member Author

zeeke commented May 9, 2024

Sorry, I wasn't sure I got the plan here.
Can you confirm this: a. the exporter does not read any drivers.yaml file. b. netlink collector is used regardless the driver and/or the version c. (optional) we log a warning if the driver version is older than some hardcoded value
is that right?

my understanding is that we will remove the drivers.yaml file, remove the IsDriverSupported check. add a note/couple lines in README calling out the minimum supported version.

I think if netlink fails, then we can fall back on sysfs collector, etc.

@zeeke @SchSeba is this what has been agreed?

sounds very good to me. Going to provide changes

@zeeke zeeke mentioned this pull request May 9, 2024
@SchSeba
Copy link
Collaborator

SchSeba commented May 22, 2024

closing this one in favor of #37

@zeeke zeeke closed this May 23, 2024
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

Successfully merging this pull request may close these issues.

3 participants