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
[sssd] Collect memory cache individual files #2462
Conversation
cc3e846
to
eb452e9
Compare
sos/report/plugins/sssd.py
Outdated
self.add_copy_spec(glob("/var/lib/sss/mc/passwd")) | ||
self.add_copy_spec(glob("/var/lib/sss/mc/group")) | ||
self.add_copy_spec(glob("/var/lib/sss/mc/initgroups")) |
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.
Are these files or directories? If they're straight files there's no reason to glob here, and you can just pass the individual file names in a list in a single add_copy_spec()
call. Each item in a list has the --log-size
limitation applied to it individually.
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.
Thank you for this suggestion, I just updated the code. Please take a look and share you thoughts.
By default SSSD collects all memory cache files: * /var/lib/sss/mc/passwd * /var/lib/sss/mc/group * /var/lib/sss/mc/initgroups They all are included in 25MB size limit for sosreport. This commits add memory cache files one - by - one, this way 25MB size limit will be aplied per file. Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
eb452e9
to
fdb30c0
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.
Assuming each binary file is under 25MB sizelimit every time, ACK.
The failed tests are irelevant to the PR; |
@pmoravec, @elkoniu normally this should be OK, it is much better like this. But I wonder if we can handle the situation when files are bigger due to some user's customization. I know there is this sizelimit=0 - that would pack everything. The price will be bigger sosreport. Can we somehow "not include" files if they do not fit the limit? I'm afraid that people can conclude that memory cache is broken on the system just because it did not fit into sosreport. And I think that in this case it is better to pack nothing rather than tail. Tom |
I understand the concern. But
into I would change the default sizelimit primarily to prevent potential lack of data collected. How often either file can be >25MB ? How often it could be over, say, 100MB (or anyhow huge that it would become impractical to collect it)? If we speak about very rare circumstances, maybe we can start with the default 25MB and optionally amend per future experience. |
+1 Default sizes are within (6mb..10mb) range. (Still "all or nothing" option would be nice too, because cache tail really doesn't make sense) |
I'm fine with this PR as it is too. Thanks for all the work. |
@pmoravec I think that on SSSD side we agree to continue with this PR in current shape. We can continue with review process. |
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.
Ack. Minor stylistic nitpick: sos-style for the list would have it like so:
self.add_copy_spec([
'foo',
'bar'
])
But I'll take care of that one during a batch merge later today, no worries.
Thank you for the fast merge and taking care of this sos-style mismatch :) |
By default SSSD collects all memory cache files: * /var/lib/sss/mc/passwd * /var/lib/sss/mc/group * /var/lib/sss/mc/initgroups They all are included in 25MB size limit for sosreport. This commits add memory cache files one - by - one, this way 25MB size limit will be aplied per file. Related: sosreport#2462 Resolves: sosreport#2476 Signed-off-by: Jan Jansky <jjansky@redhat.com>
By default SSSD collects all memory cache files: * /var/lib/sss/mc/passwd * /var/lib/sss/mc/group * /var/lib/sss/mc/initgroups They all are included in 25MB size limit for sosreport. This commits add memory cache files one - by - one, this way 25MB size limit will be aplied per file. Related: #2462 Resolves: #2476 Signed-off-by: Jan Jansky <jjansky@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
By default SSSD collects all memory cache files:
They all are included in 25MB size limit for sosreport.
This commits add memory cache files one - by - one,
this way 25MB size limit will be aplied per file.
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines
Closes: #ISSUENUMBER
included in an independent line?Resolves: #PRNUMBER
included in an independent line?