cri-o: cri-o 1.12/master with devicemapper driver fails to remove pods
Description
Using cri-o v1.12.0 and master branch and devicemapper driver. When trying to remove a pod I got:
FATA[0000] removing the pod sandbox "d12ec82743668" failed: rpc error: code = Unknown desc = failed to remove pod sandbox d12ec82743668c07869212f771132e9f77cc1a5754b0258c51425f6c02b3a76b: invalid argument
This happens using runc
or kata-runtime
.
My storage configuration on /etc/crio/crio.conf:
# Storage driver used to manage the storage of images and containers. Please
# refer to containers-storage.conf(5) to see all available storage drivers.
storage_driver = "devicemapper"
# List to pass options to the storage driver. Please refer to
# containers-storage.conf(5) to see all available storage options.
storage_option = [
"dm.directlvm_device=/dev/sdb",
"dm.directlvm_device_force=true",
"dm.thinp_percent=95",
"dm.thinp_metapercent=1",
"dm.thinp_autoextend_threshold=80",
"dm.thinp_autoextend_percent=20"
]
Steps to reproduce the issue:
- Build cri-o v1.12.0 or master
- Configure to use devicemapper
- Create a pod and then try to remove it.
Describe the results you received: The pod could not be removed:
fuentess@kata-k8s:~/go/src/github.com/kubernetes-incubator/cri-o/test$ sudo crictl pods
POD ID CREATED STATE NAME NAMESPACE ATTEMPT
d12ec82743668 2 minutes ago Ready podsandbox1 redhat.test.crio 1
fuentess@kata-k8s:~/go/src/github.com/kubernetes-incubator/cri-o/test$ sudo crictl rmp d12ec82743668
FATA[0000] removing the pod sandbox "d12ec82743668" failed: rpc error: code = Unknown desc = failed to remove pod sandbox d12ec82743668c07869212f771132e9f77cc1a5754b0258c51425f6c02b3a76b: invalid argument
fuentess@kata-k8s:~/go/src/github.com/kubernetes-incubator/cri-o/test$ sudo crictl pods
POD ID CREATED STATE NAME NAMESPACE ATTEMPT
d12ec82743668 2 minutes ago NotReady podsandbox1 redhat.test.crio 1
Logs from the crio journal:
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.508673679Z" level=debug msg="devmapper: deactivateDevice START(8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.508810679Z" level=debug msg="devmapper: removeDevice START(container-8:1-775614-8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.531688222Z" level=debug msg="devmapper: removeDevice END(container-8:1-775614-8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.531724123Z" level=debug msg="devmapper: deactivateDevice END(8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.531733123Z" level=debug msg="devmapper: UnmountDevice END(hash=8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550445458Z" level=debug msg="unmounted container "d12ec82743668c07869212f771132e9f77cc1a5754b0258c51425f6c02b3a76b""
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550506258Z" level=debug msg="devmapper: UnmountDevice START(hash=8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550515158Z" level=debug msg="devmapper: Unmount(/var/lib/containers/storage/devicemapper/mnt/8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b5232
0e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550541258Z" level=debug msg="devmapper: UnmountDevice END(hash=8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae)"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550550358Z" level=error msg="devmapper: Error unmounting device 8a2682fc4b22b135a6a78528184d8fe0cbdcaa72d72a57d1d9b52320e45b36ae: invalid argument"
Nov 01 14:48:48 kata-k8s crio[9931]: time="2018-11-01 14:48:48.550560458Z" level=debug msg="failed to delete pod sandbox "d12ec82743668c07869212f771132e9f77cc1a5754b0258c51425f6c02b3a76b": invalid argument"
Nov 01 14:49:03 kata-k8s crio[9931]: time="2018-11-01 14:49:03.225207330Z" level=debug msg="ListPodSandboxRequest &ListPodSandboxRequest{Filter:&PodSandboxFilter{Id:,State:nil,LabelSelector:map[string]string{},}
,}"
Describe the results you expected: Pod should be removed successfully
Additional information you deem important (e.g. issue happens only occasionally):
Output of crio --version
:
fuentess@kata-k8s:~/go/src/github.com/kubernetes-incubator/cri-o/test$ crio --version
crio version 1.12.0-dev
commit: "f58419d6cf462070a0c3727ad2dc554ef151e832"
Additional environment details (AWS, VirtualBox, physical, etc.): Ubuntu 16.04 VM on Azure.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (19 by maintainers)
Commits related to this issue
- pkg/storage: force unmounts Due to a change in containers/storage, we need to force umount the storage of a container to get back to previous behavior. Conversation happened here: https://github.com... — committed to runcom/ocid-1 by runcom 6 years ago
- pkg/storage: force unmounts Due to a change in containers/storage, we need to force umount the storage of a container to get back to previous behavior. Conversation happened here: https://github.com... — committed to runcom/ocid-1 by runcom 6 years ago
- pkg/storage: force unmounts Due to a change in containers/storage, we need to force umount the storage of a container to get back to previous behavior. Conversation happened here: https://github.com... — committed to runcom/ocid-1 by runcom 6 years ago
- pkg/storage: force unmounts Due to a change in containers/storage, we need to force umount the storage of a container to get back to previous behavior. Conversation happened here: https://github.com... — committed to runcom/ocid-1 by runcom 6 years ago
- vendor: revendor c/storage to fix a devicemapper bug Fix #1883 Signed-off-by: Antonio Murdaca <runcom@linux.com> — committed to runcom/ocid-1 by runcom 6 years ago
- versions: Update Kubernetes and Openshift Update supported versions of Kubernetes and Openshift with its corresponding CRI implementations: - Kubernetes from 1.10.5 to 1.12.2 - cri-o from 1.10 to 1.... — committed to chavafg/runtime-1 by chavafg 6 years ago
- versions: Update Kubernetes and Openshift Update supported versions of Kubernetes and Openshift with its corresponding CRI implementations: - Kubernetes from 1.10.5 to 1.12.2 - cri-o from 1.10 to 1.... — committed to chavafg/runtime-1 by chavafg 6 years ago
- versions: Update Kubernetes, containerd and cri-o Update supported versions of Kubernetes with its corresponding CRI implementations: - Kubernetes from 1.10.5 to 1.12.2 - cri-o from 1.10 to 1.12.0, ... — committed to chavafg/runtime-1 by chavafg 6 years ago
- versions: Update Kubernetes, containerd and cri-o Update supported versions of Kubernetes with its corresponding CRI implementations: - Kubernetes from 1.10.5 to 1.12.2 - cri-o from 1.10 to 1.12.0, ... — committed to chavafg/runtime-1 by chavafg 6 years ago
I totally agree with the above and thanks for checking @sboeuf and @chavafg - let’s hear from Mrunal and Dan as well and then we can revert and open an issue in c/storage to investigate the actual bug.