-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add new flag to collect minimal resources #206
Add new flag to collect minimal resources #206
Conversation
Hi @Sheetalpamecha. Thanks for your PR. I'm waiting for a red-hat-storage member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@yati1998 and @black-dragon74 Please take a look. |
96520a7
to
5e4dafd
Compare
collection-scripts/gather
Outdated
@@ -93,6 +99,7 @@ Options: | |||
-cl, --ceph-logs Collect ceph daemon, kernel, journal logs and crash reports | |||
-ns, --namespaced Collect namespaced resources | |||
-cs, --clusterscoped Collect clusterscoped resources | |||
--minimal-crds Collect only relevant CRDs and CSVs |
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.
how about adding short form for it too?
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.
Sure, How about -mr, --minimal-resources?
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.
MG always collects CRDs or resources. Let's omit it and call it -m, minimal
?
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.
Done
@Sheetalpamecha can you link the issue which pointed to raise this PR? I didn't get why do we want only these specific crds to be collected? I just see this as a code duplication and I don't think user would be happy just with these resources to debug any case? |
Hi Yati, True there will be redundancy, As we want to highlight few configurations only and we don't want the logs and other information collected. |
collection-scripts/gather
Outdated
@@ -197,6 +204,12 @@ if [ "$clusterscoped" == true ] && [ "$odf" == false ]; then | |||
pids+=($!) | |||
fi | |||
|
|||
if [ "$minimal_crds" == true ] && [ "$odf" == false ]; then |
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.
if [ "$minimal_crds" == true ] && [ "$odf" == false ]; then | |
if [ "$minimal_crds" == true ]; then |
We do not need to check for odf == false
here as the minimal script is not part of the odf collection. The reason we check for odf == false
is so we do not collect resources that are collected with --odf
mode twice.
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.
Done
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.
Umm.. I think you forgot to commit the changes..
P.S: We should not mark conversations as resolved by ourselves as it makes it harder to keep track of changes for reviewers. Ideally, the person who left the comment resolves it upon confirming the changes :)
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.
Noted, will be careful with future PRs.
Pushed the correct changes
/ok-to-test |
daca790
to
f8e1372
Compare
collection-scripts/gather
Outdated
@@ -93,6 +99,7 @@ Options: | |||
-cl, --ceph-logs Collect ceph daemon, kernel, journal logs and crash reports | |||
-ns, --namespaced Collect namespaced resources | |||
-cs, --clusterscoped Collect clusterscoped resources | |||
-m, --minimal Collect only relevant CRDs and CSVs |
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.
A more specific description would be nice. "only relevant" sounds a bit vague?
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.
Done
@@ -197,6 +204,12 @@ if [ "$clusterscoped" == true ] && [ "$odf" == false ]; then | |||
pids+=($!) | |||
fi | |||
|
|||
if [ "$minimal" == true ]; then | |||
echo "Collect minimal resource files..." | |||
gather_minimal_resources ${BASE_COLLECTION_PATH} & |
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.
gather_minimal_resources ${BASE_COLLECTION_PATH} & | |
gather_minimal_resources & |
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.
Hi Niraj, We can keep it as it is, as this is to keep the same structure for all options as there will be a python script running over this. I have tested with both cmds but we should call with argument only for future use also.
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’s fine I guess. But if you look at actual scripts, none of them read this arg. They read the exported BASE_COLLECTION_PATH.
Anyways, let’s keep it.
f8e1372
to
1b03be0
Compare
@Sheetalpamecha I hope you have tested this change and verified that you are able to collect all the required crds using this flag? |
Creating a flag to limit data collection to only major CRDs and CSVs, reducing time taken and log clutter. Signed-off-by: Sheetal Pamecha <[email protected]>
1b03be0
to
30c8ec6
Compare
Hi @yati1998 , Yes I have tested and this option is able to collect required crds. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: black-dragon74, Sheetalpamecha The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
7922423
into
red-hat-storage:main
Creating a flag to limit data collection to only major CRDs and CSVs, reducing time taken and log clutter.
It collects minimum required data and have kept the alignment similar to other flags for streamlined parsing.