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

ceph: fix metadata device passed by-id #6696

Merged
merged 1 commit into from
Nov 25, 2020
Merged

Conversation

leseb
Copy link
Member

@leseb leseb commented Nov 24, 2020

Description of your changes:

The code was assuming that devices were passed by the user as
"/dev/sda", this is bad! We all know people should be using paths like
/dev/disk/by-id so we must support them.

Closes: #6685
Signed-off-by: Sébastien Han seb@redhat.com

Which issue is resolved by this Pull Request:
Resolves #6685

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

pkg/daemon/ceph/osd/volume.go Outdated Show resolved Hide resolved
pkg/daemon/ceph/osd/volume.go Outdated Show resolved Hide resolved
The code was assuming that devices were passed by the user as
"/dev/sda", this is bad! We all know people should be using paths like
/dev/disk/by-id so we must support them.

Closes: rook#6685
Signed-off-by: Sébastien Han <seb@redhat.com>
@satoru-takeuchi
Copy link
Member

Code looks good. However, the integration test failed in two places.

https://github.com/rook/rook/pull/6696/checks?check_run_id=1453818328

There would be intermittent failures since it succeeded in the last one. Since the code is changed after the last test, I'll re-run test before merging this PR.

2020-11-25T14:13:47.4564975Z     ceph_base_block_test.go:292: 
2020-11-25T14:13:47.4566208Z         	Error Trace:	ceph_base_block_test.go:292
2020-11-25T14:13:47.4567427Z         	            				ceph_smoke_test.go:118
2020-11-25T14:13:47.4568425Z         	Error:      	Received unexpected error:
2020-11-25T14:13:47.4569530Z         	            	timed out waiting for image count to reach 1
2020-11-25T14:13:47.4570979Z         	Test:       	TestCephSmokeSuite/TestBlockStorage_SmokeTest
2020-11-25T14:13:47.4572385Z         	Messages:   	Make sure a new block is created
2020-11-25T14:19:40.3173557Z 2020-11-25 14:19:40.316943 I | testutil: waiting for pod file-test in namespace smoke-ns to be running
2020-11-25T14:19:40.3194702Z 2020-11-25 14:19:40.319130 D | exec: Running command: kubectl describe pod -n smoke-ns file-test
2020-11-25T14:19:40.5648393Z 2020-11-25 14:19:40.564180 I | testutil: POD Description:
2020-11-25T14:19:40.5649498Z Name:         file-test
2020-11-25T14:19:40.5650367Z Namespace:    smoke-ns
2020-11-25T14:19:40.5650811Z Priority:     0
2020-11-25T14:19:40.5651354Z Node:         <none>
2020-11-25T14:19:40.5651739Z Labels:       <none>
2020-11-25T14:19:40.5652138Z Annotations:  <none>
2020-11-25T14:19:40.5652568Z Status:       Pending
2020-11-25T14:19:40.5652926Z IP:           
2020-11-25T14:19:40.5653262Z IPs:          <none>
2020-11-25T14:19:40.5653646Z Containers:
2020-11-25T14:19:40.5654828Z   file-test:
2020-11-25T14:19:40.5655282Z     Image:      busybox
2020-11-25T14:19:40.5655988Z     Port:       <none>
2020-11-25T14:19:40.5656385Z     Host Port:  <none>
2020-11-25T14:19:40.5656758Z     Command:
2020-11-25T14:19:40.5658297Z       sh
2020-11-25T14:19:40.5659189Z       -c
2020-11-25T14:19:40.5659641Z       touch /tmp/testrook/csi.test && sleep 3600
2020-11-25T14:19:40.5660163Z     Environment:  <none>
2020-11-25T14:19:40.5660558Z     Mounts:
2020-11-25T14:19:40.5661096Z       /tmp/testrook from csivol (rw)
2020-11-25T14:19:40.5662182Z       /var/run/secrets/kubernetes.io/serviceaccount from default-token-cvfhz (ro)
2020-11-25T14:19:40.5662896Z Conditions:
2020-11-25T14:19:40.5663295Z   Type           Status
2020-11-25T14:19:40.5663725Z   PodScheduled   False 
2020-11-25T14:19:40.5664153Z Volumes:
2020-11-25T14:19:40.5664489Z   csivol:
2020-11-25T14:19:40.5665321Z     Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
2020-11-25T14:19:40.5666936Z     ClaimName:  file-test
2020-11-25T14:19:40.5667579Z     ReadOnly:   false
2020-11-25T14:19:40.5668285Z   default-token-cvfhz:
2020-11-25T14:19:40.5668887Z     Type:        Secret (a volume populated by a Secret)
2020-11-25T14:19:40.5669891Z     SecretName:  default-token-cvfhz
2020-11-25T14:19:40.5670429Z     Optional:    false
2020-11-25T14:19:40.5670872Z QoS Class:       BestEffort
2020-11-25T14:19:40.5671492Z Node-Selectors:  <none>
2020-11-25T14:19:40.5672399Z Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
2020-11-25T14:19:40.5673336Z                  node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
2020-11-25T14:19:40.5673941Z Events:
2020-11-25T14:19:40.5674402Z   Type     Reason            Age               From               Message
2020-11-25T14:19:40.5675125Z   ----     ------            ----              ----               -------
2020-11-25T14:19:40.5676437Z   Warning  FailedScheduling  38s (x6 over 5m)  default-scheduler  0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
2020-11-25T14:19:40.5677935Z 2020-11-25 14:19:40.564207 I | testutil: Giving up waiting for pod file-test in namespace smoke-ns to be running
2020-11-25T14:19:40.5678660Z     ceph_base_file_test.go:319: 
2020-11-25T14:19:40.5679172Z         	Error Trace:	ceph_base_file_test.go:319
2020-11-25T14:19:40.5679724Z         	            				ceph_base_file_test.go:262
2020-11-25T14:19:40.5680221Z         	            				ceph_smoke_test.go:124
2020-11-25T14:19:40.5680690Z         	Error:      	Should be true
2020-11-25T14:19:40.5681369Z         	Test:       	TestCephSmokeSuite/TestFileStorage_SmokeTest
2020-11-25T14:19:40.5683966Z         	Messages:   	make sure file-test pod is in running state

@satoru-takeuchi satoru-takeuchi merged commit d3ebaed into rook:master Nov 25, 2020
satoru-takeuchi added a commit that referenced this pull request Nov 26, 2020
ceph: fix metadata device passed by-id (bp #6696)
@leseb leseb deleted the fix-6685 branch November 26, 2020 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph main ceph tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rook-ceph-osd-preper prepending an extra /dev/
2 participants