gluster / gcs

Check github.com/heketi, github.com/gluster/gluster-containers, or github.com/kadalu/kadalu as active alternatives
https://gluster.org
Apache License 2.0
36 stars 24 forks source link

failed to add device on a rancher(kubernetes)-cluster #135

Closed muecahit94 closed 5 years ago

muecahit94 commented 5 years ago

I have a problem, its not possible to add a device to gluster, wiped the device before and started ansible then it stuck here:

 TASK [GCS | GD2 Cluster | Add devices | Add devices for hostname  ***************************************************************
 ....
 FAILED - RETRYING: GCS | GD2 Cluster | Add devices | Add devices for hostname (5 retries left).
 FAILED - RETRYING: GCS | GD2 Cluster | Add devices | Add devices for hostname (4 retries left).
 FAILED - RETRYING: GCS | GD2 Cluster | Add devices | Add devices for hostname (3 retries left).
 FAILED - RETRYING: GCS | GD2 Cluster | Add devices | Add devices for hostname (2 retries left).
 FAILED - RETRYING: GCS | GD2 Cluster | Add devices | Add devices for hostname (1 retries left).

failed: [master] (item=/dev/sdc) => {"attempts": 50, "changed": false, "connection": "close", "content": "{\"errors\":[{\"code\":1,\"message\":\"device already exists\"}]}\n", "content_length": "58", "content_type": "application/json; charset=UTF-8", "date": "Sat, 09 Feb 2019 13:43:34 GMT", "disk": "/dev/sdc", "json": {"errors": [{"code": 1, "message": "device already exists"}]}, "msg": "Status code was 400 and not [201]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "url": "http://10.43.19.214:24007/v1/devices/7936fefc-cbad-4508-bf96-9c26c902d95d", "x_gluster_cluster_id": "77dc4cfd-2e96-4004-b35b-b1e2db447afc", "x_gluster_peer_id": "89c13211-5858-4245-bb49-dfa8e0203424", "x_request_id": "408c723e-1572-446e-aeb3-152444cbe2c7"}

gluster2d.log: time="2019-02-09 13:42:12.834583" level=error msg="Device already exists" device=/dev/sdc error="<nil>" reqid=d7396582-f6a7-447b-bd02-2a70ee43a600 source="[rest.go:47:device.deviceAddHandler]"

When i try it manually, it takes really long curl -i -H "Content-Type: application/json" --data "{\"device\": \"/dev/sdc\"}" --request POST http://10.43.54.71:24007/v1/devices/[ID]

then i get this after long waiting: curl: (52) Empty reply from server

 lsblk -f
 NAME   FSTYPE      LABEL UUID                                   MOUNTPOINT
 sda
 ├─sda1 ext4              c1e2eba0-8896-4685-a90e-0869040459e0   /boot
 ├─sda2 ext4              f4325652-83d7-4fd1-a8e3-ad6a42f93199   /
 └─sda3 swap              9e6095c6-7708-4269-9d49-67ecd5006efc   [SWAP]
 sdb
 └─sdb1 ext4              780af07f-8003-4ed9-95d1-44debb5d78e2   /var/lib/docker
 sdc    LVM2_member       2f1rBN-Ok10-jPkT-zuUz-L6PS-QRKY-Vo9qiU

but vgdisplay shows nothing, so there are no lvm-groups

Pls help me. Thanks in advance!

aravindavk commented 5 years ago

Error is saying device already exists. Login to one of the Glusterd2 pod and see glustercli device info

Is peer ID is used in place of [ID] in the curl command?

muecahit94 commented 5 years ago

this fixed my issue: https://github.com/gluster/gcs/pull/112/commits/e64b321720ab2e44d08876b345affd2c4e3e6fb7