我正在跟踪this instruction在我的kubernetes集群上设置glusterfs。在heketi-client/bin/heketi-cli setup-openshift-heketi-storage
部分,heketi-cli告诉我:
错误:创建卷:heketidbstorage:失败:主机192.168.99.25未连接
或有时:
错误:卷创建:heketidbstorage:失败:在192.168.99.26上登台失败。错误:主机192.168.99.25未连接
heketi.json是
{
"_port_comment": "Heketi Server Port Number",
"port": "8080",
"_use_auth": "Enable JWT authorization. Please enable for deployment",
"use_auth": false,
"_jwt": "Private keys for access",
"jwt": {
"_admin": "Admin has access to all APIs",
"admin": {
"key": "7319"
},
"_user": "User only has access to /volumes endpoint",
"user": {
"key": "7319"
}
},
"_glusterfs_comment": "GlusterFS Configuration",
"glusterfs": {
"_executor_comment": "Execute plugin. Possible choices: mock, kubernetes, ssh",
"executor": "kubernetes",
"_db_comment": "Database file name",
"db": "/var/lib/heketi/heketi.db",
"kubeexec": {
"rebalance_on_expansion": true
},
"sshexec": {
"rebalance_on_expansion": true,
"keyfile": "/etc/heketi/private_key",
"fstab": "/etc/fstab",
"port": "22",
"user": "root",
"sudo": false
}
},
"_backup_db_to_kube_secret": "Backup the heketi database to a Kubernetes secret when running in Kubernetes. Default is off.",
"backup_db_to_kube_secret": false
}
topology-sample.json是
{
"clusters": [
{
"nodes": [
{
"node": {
"hostnames": {
"manage": [
"redis-test25"
],
"storage": [
"192.168.99.25"
]
},
"zone": 1
},
"devices": [
{
"name": "/dev/sda7",
"destroydata": true
}
]
},
{
"node": {
"hostnames": {
"manage": [
"redis-test26"
],
"storage": [
"192.168.99.26"
]
},
"zone": 1
},
"devices": [
{
"name": "/dev/sda7",
"destroydata": true
}
]
},
{
"node": {
"hostnames": {
"manage": [
"redis-test01"
],
"storage": [
"192.168.99.113"
]
},
"zone": 1
},
"devices": [
{
"name": "/dev/sda7",
"destroydata": true
}
]
}
]
}
]
}
heketi-cli是v8.0.0,而kubernetes是v1.12.3
如何解决此问题?
更新:刚刚发现我错过了iptables部分,但是现在消息变成了
错误:创建卷:heketidbstorage:失败:主机192.168.99.25不在“对等集群”状态
我似乎尝试了kubectl exec -i glusterfs-59ftx -- gluster peer status
:glusterfs吊舱之一无法与其他吊舱连接:
Number of Peers: 2
Hostname: 192.168.99.26
Uuid: 6950db9a-3d60-4625-b642-da5882396bee
State: Peer Rejected (Disconnected)
Hostname: 192.168.99.113
Uuid: 78983466-4499-48d2-8411-2c3e8c70f89f
State: Peer Rejected (Disconnected)
而另一个人说:
Number of Peers: 1
Hostname: 192.168.99.26
Uuid: 23a0114d-65b8-42d6-8067-7efa014af68d
State: Peer in Cluster (Connected)
答案 0 :(得分:1)
我自己解决了这些问题。
首先,原因是我没有根据Infrastructure Requirements在每个节点中设置iptables。
根据this article的第二部分,删除/ var / lib / glusterd中除glusterd.info之外的所有文件,然后从Kubernete Deploy重新开始。