-
Notifications
You must be signed in to change notification settings - Fork 2
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 issue-template #7
base: master
Are you sure you want to change the base?
Conversation
0bd455d
to
385c745
Compare
issue-template command collects logs and information for problem analysis
385c745
to
40f0a58
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.
Except comments below, All looks good to me.
TODO:
- Extract snapshots info in issue-template
- From HyperSDS 1.4, we support snapshot on both CephFS and RBD
- Unifying error message format
- ex. Create error function using
github.com/pkg/errors
in util, and every error-logging handlers call this util function
- ex. Create error function using
) | ||
|
||
var issueTemplateCmd = &cobra.Command{ | ||
Use: "issue-template", |
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 is more coherent to make subcommand as a verb.
I recommend create-issue-info
or create-issue-template
instead of issue-template
.
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.
I agree but what about gather
? This command is more about gathering rook-ceph related log files and system status.
|
||
info, err := os.Stat(source) | ||
if err != nil { | ||
return nil |
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.
why does it return nil
? zip function is called after creating source
directory (rookInfoDirName
), so if any error occurs here, it should return that error to caller.
} | ||
|
||
if err2 := tarball.WriteHeader(header); err2 != nil { | ||
return err |
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 should return err2
, not err
if err != nil { | ||
glog.Error(err.Error()) | ||
} | ||
|
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.
Delete the compressed directory (rookInfoDirName
) after compressing
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.
lgtm
TODO:
- Consider the case where a user created a pool differently from the hypersds's default pool setting.
cephMountInfoDirName string = "cephMount" | ||
kubeCommand string = "kubeCommand" | ||
cephCommand string = "cephCommand" | ||
commonCommand string = "commonCommand" |
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.
I recommend shellCommand
instead of commonCommand
.
return err | ||
} | ||
|
||
glog.Info("Get cluster info") |
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.
I recommend more specific logs.
Get cluster Info
-> Get Ceph Cluster infor
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.
I guess 'kubeadm_info' command is also executed in getClusterInfo
, so "cluster" is not limited to ceph cluster. Maybe it's more clear to separate getCephClusterInfo
and getKubeClusterInfo
.
} | ||
|
||
cmdList := [][]string{} | ||
cmdList = append(cmdList, []string{"ceph_status", "ceph", "status"}, |
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 would be nice to consider the case where the number of pools and the names of the pools are created differently from the hypersds's default pool settings. ( not just replicapool
or myfs
)
lgtm. It would be nice to briefly explain what logs are collected in commit message. |
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.
.github/workflows/hcsctl.yml
e2e section should be updated to execute this new command.
) | ||
|
||
var issueTemplateCmd = &cobra.Command{ | ||
Use: "issue-template", |
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.
I agree but what about gather
? This command is more about gathering rook-ceph related log files and system status.
|
||
var issueTemplateCmd = &cobra.Command{ | ||
Use: "issue-template", | ||
Short: "issue-template을 생성합니다.", |
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.
I think it's better to include an explanation that this command only gather rook-ceph related information (for now). Maybe we can consider to add flag or rename the command to specify what it is for when we need to gather other information in the future.
rook 관련 로그파일과 클러스터 상태 정보를 수집하여 tar 파일을 생성합니다. 이슈 등록 시 이를 첨부해주세요.
return err | ||
} | ||
|
||
glog.Info("Get cluster info") |
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.
I guess 'kubeadm_info' command is also executed in getClusterInfo
, so "cluster" is not limited to ceph cluster. Maybe it's more clear to separate getCephClusterInfo
and getKubeClusterInfo
.
d5006df
to
792aa2c
Compare
issue-template command collects logs and information for problem analysis