Fix proc location for conntrack files#4150
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4150 +/- ##
===========================================
- Coverage 86.71% 73.58% -13.14%
===========================================
Files 743 7 -736
Lines 39233 458 -38775
Branches 4677 81 -4596
===========================================
- Hits 34020 337 -33683
+ Misses 3942 99 -3843
+ Partials 1271 22 -1249 |
4 tasks
ofek
previously approved these changes
Jul 18, 2019
coignetp
previously approved these changes
Jul 24, 2019
Member
Author
|
On hold, waiting feedback from user. |
Member
Author
|
QAed, conntrack metrics retrieved correctly in container with new code. |
FlorianVeaux
approved these changes
Jul 31, 2019
FlorianVeaux
left a comment
Member
There was a problem hiding this comment.
The code is good and has been tested correctly. Let's ![]()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Avoid suffixing with
/1when reading conntrack proc files.In a docker container the
proc_locationis suffixed with /1 fornetfiles.But there is not need to suffix with
/1for conntrack filesConntrack files always reside in
/proc/sys/net/*. Commands executed inside a container:Note:
nf_conntrack_counthas a different value inside a container. See additional notes below.Motivation
User getting this error
Unable to read /host/proc/1/sys/net/nf_conntrack_maxAdditional Notes
It seems that some
host conntrack statsare not available inside a container.Inside container:
On host:
But it seems that
nf_conntrack_counthas a different value inside a container (the only one):conntrack_metrics.txt
Review checklist (to be filled by reviewers)
changelog/andintegration/labels attached