prometheus / procfs

procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
Apache License 2.0
756 stars 311 forks source link

[fix]: fix nfsd v4 ops index miss match #543

Closed dongjiang1989 closed 10 months ago

dongjiang1989 commented 1 year ago

Fixes: #492

/kind fix

  1. fix nfsd v4 ops index miss match
  2. add unittest for proc4ops 72 , proc4ops 59, proc4ops 40 and proc4ops 39
dongjiang1989 commented 1 year ago

@discordianfish PTAL

discordianfish commented 1 year ago

Are we sure there are no systems with only 39 fields when using nfsd v4? I would assume this worked in the past?

dongjiang1989 commented 1 year ago

Are we sure there are no systems with only 39 fields when using nfsd v4? I would assume this worked in the past?

The previous version of procfs supports the OP_RELEASE_LOCKOWNER field. It’s just that the lack of OP_SETCLIENTID and OP_SETCLIENTID_CONFIRM caused the index miss match.

@discordianfish Support 39 fields system. Please re-check

dongjiang1989 commented 1 year ago

@SuperQ Please take a look! Thanks.

cc @atkinsam

dongjiang1989 commented 11 months ago

@discordianfish @SuperQ When is this likely to be merged and a release available? so I can manage expectations.

discordianfish commented 11 months ago

We don't have a fixed release schedule. First @SuperQ needs to review and merge this.

jjaakkol commented 10 months ago

Ok, I just noticed today that Write operations won't get counted at all in my dashboard and wrote almost exactly the same patch myself, before noticing this. I don't think this can break any old systems. The numbering comes directly from NFSv4 RFC and write request there is number 38. Linux kernel just uses those exact same numbers. Thanks @dongjiang1989 !

https://www.rfc-editor.org/rfc/rfc7530.html#page-299

dongjiang1989 commented 10 months ago

Ok, I just noticed today that Write operations won't get counted at all in my dashboard and wrote almost exactly the same patch myself, before noticing this. I don't think this can break any old systems. The numbering comes directly from NFSv4 RFC and write request there is number 38. Linux kernel just uses those exact same numbers. Thanks @dongjiang1989 !

https://www.rfc-editor.org/rfc/rfc7530.html#page-299

@jjaakkol Thank you for your code review. If you have any other questions about this pull request, please submit them to me!