Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add issue-template #7

wants to merge 2 commits into from

Conversation

donggyupark
Copy link
Collaborator

issue-template command collects logs and information for problem analysis

issue-template command collects logs and information for problem analysis
Copy link
Contributor

@shellwedance shellwedance left a 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

)

var issueTemplateCmd = &cobra.Command{
Use: "issue-template",
Copy link
Contributor

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.

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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())
}

Copy link
Contributor

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

Copy link
Collaborator

@SangHyeok-Kim95 SangHyeok-Kim95 left a 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"
Copy link
Collaborator

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")
Copy link
Collaborator

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

Copy link
Contributor

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"},
Copy link
Collaborator

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)

@hookak
Copy link

hookak commented Sep 17, 2020

lgtm. It would be nice to briefly explain what logs are collected in commit message.

Copy link
Contributor

@hbinkim hbinkim left a 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",
Copy link
Contributor

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을 생성합니다.",
Copy link
Contributor

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")
Copy link
Contributor

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.

@donggyupark donggyupark force-pushed the master branch 2 times, most recently from d5006df to 792aa2c Compare October 5, 2022 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants