kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.13k stars 6.47k forks source link

cannot local volume provisioner - #4434

Closed geodb-io closed 4 years ago

geodb-io commented 5 years ago

Potential bug - or maybe documentation update request.

I used the local volume provisioner in the past, using the following syntax:

local_volume_provisioner_enabled: true
local_volumes_enabled: true
local_volume_provisioner_namespace: "{{ system_namespace }}"
local_volume_provisioner_base_dir: /mnt/disks
local_volume_provisioner_mount_dir: /mnt/disks
local_volume_provisioner_storage_class: local-storage

This was on kube_version: v1.12.1 and on top of commit 7f5f2ed7ddc0e972461cb3a3bc51b34a2785f0d7 "Allow kubeadm master untaint to fail (#3549)"

I now tried to use it again, following https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md

It seems the syntax has changed, so I used:

local_volume_provisioner_storage_classes:
  local-storage:
    host_dir: /mnt/disks
    mount_dir: /mnt/disks

on top of kube_version: v1.13.5 and commit 2fb27c852141ef49eaa2824591ada41d23888b92 "Use static files in KubeDNS templating task (#4379)"

However this time I do not see the local volume appear in the kubernetes dashboard. Is it because now some commands now have to be run manually? It is not clear for me in the documentation.

Environment:

Kubespray version (commit) (git rev-parse --short HEAD):

2fb27c85 - Use static files in KubeDNS templating task (#4379)

Network plugin used:

kube_network_plugin: calico

Copy of your inventory file: (not sure if this is the right file - please let me know if not)

[all]
node1    ansible_host=geodb1 ip=xxx.xx.xxx.xx
node2    ansible_host=geodb2 ip=xx.xx.xx.xx
node3    ansible_host=geodb3 ip=xxx.xxx.xxx.x
 [kube-master]
node1
 [kube-node]
node1
node2
node3
 [etcd]
node1
node2
node3
 [k8s-cluster:children]
kube-node
kube-master
 [calico-rr]
 [vault]

Command used to invoke ansible:

ansible-playbook -i inventory/mycluster/hosts.ini cluster.yml

Output of ansible run: complete run: https://gist.github.com/geodb-io/54ae98b6102597134d699c69d04e4c37 particular but failing (similar, from a previous run).

TASK [kubernetes-apps/external_provisioner/local_volume_provisioner : Local Volume Provisioner | Templates list] *******************************************************************************************
Saturday 30 March 2019  00:04:23 +0000 (0:00:00.279)       0:04:58.718 ********
ok: [node1]

TASK [kubernetes-apps/external_provisioner/local_volume_provisioner : Local Volume Provisioner | Insert extra templates to Local Volume Provisioner templates list for PodSecurityPolicy] ******************
Saturday 30 March 2019  00:04:23 +0000 (0:00:00.095)       0:04:58.814 ********

TASK [kubernetes-apps/external_provisioner/local_volume_provisioner : Local Volume Provisioner | Create manifests] *****************************************************************************************
Saturday 30 March 2019  00:04:23 +0000 (0:00:00.058)       0:04:58.873 ********
ok: [node1] => (item={'name': 'local-volume-provisioner-ns', 'file': 'local-volume-provisioner-ns.yml', 'type': 'ns'})
ok: [node1] => (item={'name': 'local-volume-provisioner-sa', 'file': 'local-volume-provisioner-sa.yml', 'type': 'sa'})
ok: [node1] => (item={'name': 'local-volume-provisioner-clusterrolebinding', 'file': 'local-volume-provisioner-clusterrolebinding.yml', 'type': 'clusterrolebinding'})
failed: [node1] (item={'name': 'local-volume-provisioner-cm', 'file': 'local-volume-provisioner-cm.yml', 'type': 'cm'}) => {"changed": false, "item": {"file": "local-volume-provisioner-cm.yml", "name": "local-volume-provisioner-cm", "type": "cm"}, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'iteritems'"}
failed: [node1] (item={'name': 'local-volume-provisioner-ds', 'file': 'local-volume-provisioner-ds.yml', 'type': 'ds'}) => {"changed": false, "item": {"file": "local-volume-provisioner-ds.yml", "name": "local-volume-provisioner-ds", "type": "ds"}, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'iteritems'"}
ok: [node1] => (item={'name': 'local-volume-provisioner-sc', 'file': 'local-volume-provisioner-sc.yml', 'type': 'sc'})

What are local-volume-provisioner-cm and local-volume-provisioner-ds?

Anything else do we need to know: not that I know of - I will update if I miss information

Miouge1 commented 5 years ago

/kind bug

rhockenbury commented 5 years ago

Related. The documentation feels to be in the wrong spot. It's nested under the role, rather than the docs directory.

@Miouge1 Can this README be moved? https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 4 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

k8s-ci-robot commented 4 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/kubespray/issues/4434#issuecomment-552166441): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Send feedback to sig-testing, kubernetes/test-infra and/or [fejta](https://github.com/fejta). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.