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 enhanced volume and mount logging for block devices #24797

Merged
merged 1 commit into from
Jul 22, 2016
Merged

add enhanced volume and mount logging for block devices #24797

merged 1 commit into from
Jul 22, 2016

Conversation

screeley44
Copy link
Contributor

@screeley44 screeley44 commented Apr 26, 2016

Fixes #24568

Adding better logging and debugging for block device volumes and the shared SafeFormatAndMount (aws, gce, flex, rbd, cinder, etc...)

@k8s-bot
Copy link

k8s-bot commented Apr 26, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in hack/jenkins/job-configs/kubernetes-jenkins-pull/ instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

2 similar comments
@k8s-bot
Copy link

k8s-bot commented Apr 26, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in hack/jenkins/job-configs/kubernetes-jenkins-pull/ instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented Apr 26, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in hack/jenkins/job-configs/kubernetes-jenkins-pull/ instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Apr 26, 2016
@screeley44
Copy link
Contributor Author

@kubernetes/sig-storage

@@ -107,6 +107,7 @@ func doMount(source string, target string, fstype string, options []string) erro
command := exec.Command("mount", mountArgs...)
output, err := command.CombinedOutput()
if err != nil {
glog.Errorf("Mount failed: %w\nMounting arguments: %s %s %s %w\nOutput: %s\n", err, source, target, fstype, options, string(output))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean %v instead of %w?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saad-ali - yes, that is what I meant and will be updating accordingly

@k8s-bot
Copy link

k8s-bot commented May 11, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@screeley44
Copy link
Contributor Author

@saad-ali @pmorie - any more thoughts on this?

@screeley44
Copy link
Contributor Author

a snippet of some logging for aws ebs:

I0518 12:02:33.082433   16223 mount_linux.go:287] disk /dev/xvdba appears to be unformatted, attempting to format disk: ext4  with options: [-E lazy_itable_init=0,lazy_journal_init=0 -F /dev/xvdba]
I0518 12:02:34.512242   16223 mount_linux.go:292] disk successfully formatted (mkfs): ext4 - /dev/xvdba /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/vol-d56f0667
I0518 12:02:34.535146   16223 aws_ebs.go:292] Successfully mounted /var/lib/kubelet/pods/ebc7822c-1d11-11e6-9195-06d8cc2ef6b3/volumes/kubernetes.io~aws-ebs/ebsvol

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2016
@pmorie pmorie added sig/storage Categorizes an issue or PR as relevant to SIG Storage. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 19, 2016
@@ -267,6 +269,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
}

// Try to mount the disk
glog.Infof("attempting to mount disk: %s %s %s", fstype, source, target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be V(4) since it is fairly common, and not alarming.

@k8s-bot
Copy link

k8s-bot commented Jun 15, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot
Copy link

This PR hasn't been active in 60 days. Will be closed in 29 days.

You can add 'keep-open' label to prevent this from happening.

@saad-ali
Copy link
Member

This is a useful PR. In particular logging attempting to format disk is a must-have

@screeley44 could you rebase and address feedback.

@screeley44
Copy link
Contributor Author

@saad-ali - ack

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 20, 2016
@screeley44
Copy link
Contributor Author

@saad-ali - rebased and addressed initial comments

@screeley44
Copy link
Contributor Author

@saad-ali - might need the "ok-to-test" label

@saad-ali
Copy link
Member

@k8s-bot ok to test

return nil
}

func makeGlobalPDPath(host volume.VolumeHost, volumeID string) string {
// Clean up the URI to be more fs-friendly
name := volumeID
name = strings.Replace(name, "://", "/", -1)
glog.V(4).Infof(path.Join(host.GetPluginDir(awsElasticBlockStorePluginName), "mounts", name))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think I was using that as debug and didn't remove it, don't think we need to log anything from here, I think I will remove

@screeley44 screeley44 changed the title [WIP] add enhanced volume and mount logging for block devices add enhanced volume and mount logging for block devices Jul 21, 2016
@saad-ali saad-ali added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 21, 2016
@saad-ali saad-ali added this to the v1.3 milestone Jul 21, 2016
@saad-ali
Copy link
Member

@k8s-bot test this issue: #22655

@k8s-bot
Copy link

k8s-bot commented Jul 21, 2016

GCE e2e build/test passed for commit 11d1289.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jul 22, 2016

GCE e2e build/test passed for commit 11d1289.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 4694a6d into kubernetes:master Jul 22, 2016
@fabioy fabioy added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jul 24, 2016
k8s-github-robot pushed a commit that referenced this pull request Jul 27, 2016
…97-upstream-release-1.3

Automatic merge from submit-queue

Automated cherry pick of #24797 upstream release 1.3

Cherry pick #24797 ("add enhanced volume and mount logging for block devices") to upstream release 1.3.
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.3" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
…ck-of-#24797-upstream-release-1.3

Automatic merge from submit-queue

Automated cherry pick of kubernetes#24797 upstream release 1.3

Cherry pick kubernetes#24797 ("add enhanced volume and mount logging for block devices") to upstream release 1.3.
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
Automatic merge from submit-queue

add enhanced volume and mount logging for block devices

Fixes kubernetes#24568 

Adding better logging and debugging for block device volumes and the shared SafeFormatAndMount (aws, gce, flex, rbd, cinder, etc...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants