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

Some table field names are incorrect #47

Open
aryantaheri opened this issue Dec 15, 2020 · 2 comments
Open

Some table field names are incorrect #47

aryantaheri opened this issue Dec 15, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@aryantaheri
Copy link

aryantaheri commented Dec 15, 2020

According to documentation [1] and the dataplane spec [2] General Purpose Counter 0 field name is gpc0. There is an extra _ in the expected field name in [3] that breaks parsing stick table entries.

Here is an example:

Exec output:  0x7f80783a1750: key=<redacted> use=0 exp=86395752 gpt0=0 gpc0=484 gpc0_rate(30000)=5 http_err_rate(300000)=59
Parsed entry: &{BytesInCnt:<nil> BytesInRate:<nil> BytesOutCnt:<nil> BytesOutRate:<nil> ConnCnt:<nil> ConnCur:<nil> ConnRate:<nil> Exp:0xc000482d88 Gpc0:0xc000482d90 Gpc0Rate:<nil> Gpc1:<nil> Gpc1Rate:<nil> HTTPErrCnt:<nil> HTTPErrRate:0xc000482d98 HTTPReqCnt:<nil> HTTPReqRate:<nil> ID:0x7f80783a1750 Key:<redacted> ServerID:<nil> SessCnt:<nil> SessRate:<nil> Use:false}

The same applies to gpc0_rate, gpc1, and gpc1_rate.

The General Purpose Tag 0 gpt0 is not covered in the parser.

[1] https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#4.2-stick-table%20type
[2] https://github.com/haproxytech/dataplaneapi-specification/blob/5d0b7ffcb38214efeb6c7ba03c310223083c7138/models/runtime.yaml#L272
[3]

case key == "gpc_0":
gpc0, err := strconv.ParseInt(strings.TrimSpace(kv[1]), 10, 64)

@aryantaheri aryantaheri changed the title Some of table field names are incorrect Some table field names are incorrect Dec 15, 2020
@oktalz oktalz added the bug Something isn't working label Dec 15, 2020
@aryantaheri
Copy link
Author

aryantaheri commented Dec 15, 2020

Should I open a separate issue for the missing gpt0 in the dataplaneapi-specification repository?

@oktalz
Copy link
Member

oktalz commented Dec 15, 2020

hi @aryantaheri it seems this is a bug, thx for reporting this.

and regarding gpt0, we can track it here also, no need to open different issue.
But if you prefer, you can also open new issue on specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants