-
Notifications
You must be signed in to change notification settings - Fork 108
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
wmstats - consistent reporting of wmagent disk use #12140
Conversation
Can one of the admins verify this patch? |
This comment was marked as outdated.
This comment was marked as outdated.
1fb7740
to
a29aad0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good.
@mapellidario just a note, for your consideration, not to request a change. This:
we show the value of the latest column "mounted on", which is not meaningful nor consistent across agents
Is because df
command does not display duplicated mounts by default until explicitly told with the -a
option. Which is the case for docker bind
mounts starting from the same volume - in our case /dev/vdb
. And the inconsistency between agents is only because df
shows only the first mount, which basically at startup time succeeds on a random basis, so one never knows which of the so bound mounts would be visualized.
I do not want to use the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dario, these changes look good to me.
However, can you please enhance the relevant unit test to give us better coverage (more meaningful test):
https://github.com/dmwm/WMCore/blob/master/test/python/Utils_t/Utilities_t.py#L167
?
Changing the unit tests would mean parsing some output that is specific to the platform that is running the unittest (linux host, vm, container, osx, ...) and it is not easy to come up with some common pattern that is both meaningful and does not break on some machines, which i think was the reason behind that very generic unittest. I will give it a try, but i do not promise anything |
This comment was marked as outdated.
This comment was marked as outdated.
So, [1] [
{
"filesystem": "devtmpfs",
"mounted": "/dev",
"percent": "0%"
},
{
"filesystem": "tmpfs",
"mounted": "/dev/shm",
"percent": "0%"
},
{
"filesystem": "tmpfs",
"mounted": "/run",
"percent": "11%"
},
{
"filesystem": "tmpfs",
"mounted": "/sys/fs/cgroup",
"percent": "0%"
},
{
"filesystem": "/dev/vda1",
"mounted": "/",
"percent": "76%"
},
{
"filesystem": "/dev/vda15",
"mounted": "/boot/efi",
"percent": "3%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/cvmfs-config.cern.ch",
"percent": "82%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/cms.cern.ch",
"percent": "82%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/cms-ib.cern.ch",
"percent": "82%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/grid.cern.ch",
"percent": "82%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/projects.cern.ch",
"percent": "82%"
},
{
"filesystem": "cvmfs2",
"mounted": "/cvmfs/unpacked.cern.ch",
"percent": "82%"
},
{
"filesystem": "tmpfs",
"mounted": "/run/user/501",
"percent": "0%"
}
] |
75127af
to
4a20f8a
Compare
I added a new set of checks in that unit test, i am satisfied :) |
Jenkins results:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, thanks Dario.
NOTE: with this change, we will have to push new couchapps in in the central CouchDB instance(s) when an upgrade time comes.
Fixes #12139
Status
Tested. I run this code inside a wmagent docker container and i got the expected output [1].
Description
the output of df is
At the moment in WMStats we show the value of the latest column "mounted on", which is not meaningful nor consistent across agents. The first column "filesystem" contains the name of the partition that we care about and is consistent both between the docker container and the host and across different hosts.
This PR adds the parsing of the first column and shows that string in wmstats
Is it backward compatible (if not, which system it affects?)
YES: I did not remove the "mounted on" column, so existing code will continue to work as is
Related PRs
none
External dependencies / deployment changes
none
[1]