Skip to content

Improve logging for device path verification #1138

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

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

saikat-royc
Copy link
Member

@saikat-royc saikat-royc commented Feb 15, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

verification of path logic:
for a scsi device
if /dev/disk/by-id/* path exists:
  -> eval symlnk (derives the /dev/sd/* or a /dev/nvme/*)
  -> if serial number == disk name -> return success
  ->else run udevadm trigger
else:
  -> run udevadm --trigger (this is expected to replay the kernel event and create the /dev/by-id path, and in the next wait poll retry round, it is expected to find the path and follow the if path exists branch)

udevadm trigger logic:
-> scans all the /dev/sd* and /dev/nvme* and if it finds a disk with serial number same as disk name, it calls udevadm --trigger=change ...

Sample logs:

I0215 08:42:20.6285781 device-utils.go:250] For disk pvc-5ae5a3b8-b974-4f04-86c6-5f21092ec780 the /dev/* path is /dev/sdb for disk/by-id path /dev/disk/by-id/google-pvc-5ae5a3b8-b974-4f04-86c6-5f21092ec780
I0215 08:42:20.6310291 device-utils.go:264] For disk pvc-5ae5a3b8-b974-4f04-86c6-5f21092ec780, device path /dev/sdb, found serial number pvc-5ae5a3b8-b974-4f04-86c6-5f21092ec780

Does this PR introduce a user-facing change?:

Improve logging for device path verification

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 15, 2023
@saikat-royc
Copy link
Member Author

/hold [WIP]

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 15, 2023
@saikat-royc
Copy link
Member Author

/hold [WIP]
/assign @mattcary

@saikat-royc saikat-royc removed the request for review from leiyiz February 15, 2023 08:44
@mattcary
Copy link
Contributor

/release-note none

@mattcary
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattcary, saikat-royc

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:
  • OWNERS [mattcary,saikat-royc]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2023
@saikat-royc saikat-royc removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 15, 2023
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 15, 2023
@mattcary
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit e0557fe into kubernetes-sigs:master Feb 15, 2023
k8s-ci-robot added a commit that referenced this pull request Feb 15, 2023
Cherrypick #1138 - Improve logging for verification of device path
k8s-ci-robot added a commit that referenced this pull request Feb 16, 2023
Cherrypick #1138 - Improve logging for device path verification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. 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.

3 participants