用于 FC 存储的 openshift 中的 FailedAttachVolume
FailedAttachVolume in openshift for FC storage
我创建了以下 yaml 文件
- fc-pod.yaml
- fc-pvc.yaml
当我创建 fc pod 时,它总是进入 ContainerCreating 状态,并在我描述 pod 时给我以下错误。
Warning FailedAttachVolume 83s
attachdetach-controller AttachVolume.Attach failed for volume
"csiunity-d93a52838d" : rpc error: code = InvalidArgument desc =
runid=95 Cannot publish volume as protocol in the Storage class is
'FC' but the node has no valid FC initiators Warning FailedMount
29s kubelet Unable to attach or
mount volumes: unmounted volumes=[dy-fc-unity], unattached
volumes=[dy-fc-unity kube-api-access-psrcp]: timed out waiting for the
condition Warning FailedAttachVolume 19s
attachdetach-controller AttachVolume.Attach failed for volume
"csiunity-d93a52838d" : rpc error: code = InvalidArgument desc =
runid=96 Cannot publish volume as protocol in the Storage class is
'FC' but the node has no valid FC initiators
我创建了 pvc、存储 类 和 secrets 等。
我已经使用相同的方法创建了 nfs 和 iscsi pods,并且它们已创建。
请检查我的 fc-pod.yaml 下面的文件
apiVersion: v1
kind: Pod
metadata:
name: dynamic-fc-pod
namespace: unity
spec:
containers:
- name: container
image: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: dy-fc-unity
volumes:
- name: dy-fc-unity
persistentVolumeClaim:
claimName: dynamic-fc-pvc
我发现后端有 fc 连接问题。这就是为什么 FC pods 没有创造。
如果您遇到类似问题,请用
解决
- 更改 nginx 镜像标签。
- 检查 fc 连接
- 检查存储中的协议 class
- 删除pvc和pod
- 再次创建时更改容器名称
我创建了以下 yaml 文件
- fc-pod.yaml
- fc-pvc.yaml
当我创建 fc pod 时,它总是进入 ContainerCreating 状态,并在我描述 pod 时给我以下错误。
Warning FailedAttachVolume 83s
attachdetach-controller AttachVolume.Attach failed for volume "csiunity-d93a52838d" : rpc error: code = InvalidArgument desc = runid=95 Cannot publish volume as protocol in the Storage class is 'FC' but the node has no valid FC initiators Warning FailedMount
29s kubelet Unable to attach or mount volumes: unmounted volumes=[dy-fc-unity], unattached volumes=[dy-fc-unity kube-api-access-psrcp]: timed out waiting for the condition Warning FailedAttachVolume 19s
attachdetach-controller AttachVolume.Attach failed for volume "csiunity-d93a52838d" : rpc error: code = InvalidArgument desc = runid=96 Cannot publish volume as protocol in the Storage class is 'FC' but the node has no valid FC initiators
我创建了 pvc、存储 类 和 secrets 等。 我已经使用相同的方法创建了 nfs 和 iscsi pods,并且它们已创建。
请检查我的 fc-pod.yaml 下面的文件
apiVersion: v1
kind: Pod
metadata:
name: dynamic-fc-pod
namespace: unity
spec:
containers:
- name: container
image: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: dy-fc-unity
volumes:
- name: dy-fc-unity
persistentVolumeClaim:
claimName: dynamic-fc-pvc
我发现后端有 fc 连接问题。这就是为什么 FC pods 没有创造。
如果您遇到类似问题,请用
解决- 更改 nginx 镜像标签。
- 检查 fc 连接
- 检查存储中的协议 class
- 删除pvc和pod
- 再次创建时更改容器名称