gluster-kubernetes
gluster-kubernetes copied to clipboard
./gk-deploy -g Topology File not found!
Hi there,
I have a fresh K8's deployment trying to bring up gluster-kubernetes but failing stating Topology not found.
I enforced a verbose output but that gave no help:
[root@lab-sdn-tungsten01 ~]# ./gk-deploy -g -v Welcome to the deployment tool for GlusterFS on Kubernetes and OpenShift.
Before getting started, this script has some requirements of the execution environment and of the container platform that you should verify.
The client machine that will run this script must have:
- Administrative access to an existing Kubernetes or OpenShift cluster
- Access to a python interpreter 'python'
Each of the nodes that will host GlusterFS must also have appropriate firewall rules for the required GlusterFS ports:
- 2222 - sshd (if running GlusterFS in a pod)
- 24007 - GlusterFS Management
- 24008 - GlusterFS RDMA
- 49152 to 49251 - Each brick for every volume on the host requires its own port. For every new brick, one new port will be used starting at 49152. We recommend a default range of 49152-49251 on each host, though you can adjust this to fit your needs.
The following kernel modules must be loaded:
- dm_snapshot
- dm_mirror
- dm_thin_pool
For systems with SELinux, the following settings need to be considered:
- virt_sandbox_use_fusefs should be enabled on each node to allow writing to remote GlusterFS volumes
In addition, for an OpenShift deployment you must:
- Have 'cluster_admin' role on the administrative account doing the deployment
- Add the 'default' and 'router' Service Accounts to the 'privileged' SCC
- Have a router deployed that is configured to allow apps to access services running in the cluster
Do you wish to proceed with deployment?
[Y]es, [N]o? [Default: Y]: Y Topology File not found! [root@lab-sdn-tungsten01 ~]#
here is template:
[root@lab-sdn-tungsten01 ~]# cat ./kube-templates/topology.json { "clusters": [ { "nodes": [ { "node": { "hostnames": { "manage": [ "lab-tungsten01" ], "storage": [ "1.7.2.33" ] }, "zone": 1 }, "devices": [ "/dev/loop0", "/dev/loop1", "/dev/loop2" ] }, { "node": { "hostnames": { "manage": [ "lab-tungsten02" ], "storage": [ "1.7.2.54" ] }, "zone": 1 }, "devices": [ "/dev/loop0", "/dev/loop1", "/dev/loop2" ] }, { "node": { "hostnames": { "manage": [ "lab-sdn-tungsten03" ], "storage": [ "1.7.2.22" ] }, "zone": 1 }, "devices": [ "/dev/loop0", "/dev/loop1", "/dev/loop2" ] } ] } ] } [root@lab-tungsten01 ~]#
@haji-haji-haji I think you havent copied the to topology.json.sample to topology.json
$ vagrant ssh-config > ssh-config
$ scp -rF ssh-config ../deploy master:
$ vagrant ssh master
[vagrant@master]$ cd deploy
[vagrant@master]$ mv topology.json.sample topology.json
@Madhu-1
No the file exists:
[root@lab-sdn-tungsten01 gkdeploy]# ls gk-deploy kube-templates [root@lab-sdn-tungsten01 gkdeploy]# cd kube-templates/ [root@lab-sdn-tungsten01 kube-templates]# ls topology.json [root@lab-sdn-tungsten01 kube-templates]#
kube-templates is the default directory for template storage.
@Madhu-1,
Found a bug in the code, its not even looking into the directory that it should.
Preformed a strace on gk-depoy and found this:
stat("topology.json", 0x7ffcfa04c260) = -1 ENOENT (No such file or directory)
its expecting topology.json in the same path as the gk-deploy script.
Current workaround is copy topology.json in the same path as the gk-deploy script
I don't think the expectation is for you to copy the topology file to either of the templates directories. Did you need to edit any of the files in either of the templates directories? I ask because I don't think you need to do so and those dirs are effectively "read only" for the script.
Actually the --h states the following:
-t TEMPLATES, --templates_dir TEMPLATES Location of directory containing the heketi templates for the various resources. Defaults are: * For Kubernetes: '${KUBE_TEMPLATES_DEFAULT}'. * For OpenShift: '${OCP_TEMPLATES_DEFAULT}'.