向GlusterFS添加新的OpenShift节点

时间:2019-02-04 16:00:35

标签: ansible openshift openshift-origin glusterfs okd

我有一个安装了GlusterFS存储的OpenShift Origin 3.11集群。这是一个单一的主设置,我的初始清单如下:

[nodes]
console.example.com openshift_ip=1.2.3.4 openshift_schedulable=true openshift_node_group_name='node-config-all-in-one'

node-01.example.com openshift_ip=1.2.3.1 openshift_schedulable=true openshift_node_group_name='node-config-compute'

node-02.example.com openshift_ip=1.2.3.2 openshift_schedulable=true openshift_node_group_name='node-config-compute'



[glusterfs]
console.example.com glusterfs_devices='[ "/dev/sda" ]'

node-01.example.com glusterfs_devices='[ "/dev/sda" ]'

node-02.example.com glusterfs_devices='[ "/dev/sda" ]'

通过将清单修改为以下内容,我向集群添加了一个新节点:

[nodes]
console.example.com openshift_ip=1.2.3.4 openshift_schedulable=true openshift_node_group_name='node-config-all-in-one'

node-01.example.com openshift_ip=1.2.3.1 openshift_schedulable=true openshift_node_group_name='node-config-compute'

node-02.example.com openshift_ip=1.2.3.2 openshift_schedulable=true openshift_node_group_name='node-config-compute'



[glusterfs]
console.example.com glusterfs_devices='[ "/dev/sda" ]'

node-01.example.com glusterfs_devices='[ "/dev/sda" ]'

node-02.example.com glusterfs_devices='[ "/dev/sda" ]'

[new_nodes]
node-03.example.com openshift_ip=1.2.3.3 openshift_schedulable=true openshift_node_group_name='node-config-compute'

并运行:

ansible-playbook playbooks/openshift-node/scaleup.yml

哪个成功运行。现在,要将这个新节点添加为GlusterFS卷,我将该节点添加到了glusterfs组中,

[nodes]
console.example.com openshift_ip=1.2.3.4 openshift_schedulable=true openshift_node_group_name='node-config-all-in-one'

node-01.example.com openshift_ip=1.2.3.1 openshift_schedulable=true openshift_node_group_name='node-config-compute'

node-02.example.com openshift_ip=1.2.3.2 openshift_schedulable=true openshift_node_group_name='node-config-compute'
node-03.example.com openshift_ip=1.2.3.3 openshift_schedulable=true openshift_node_group_name='node-config-compute'



[glusterfs]
console.example.com glusterfs_devices='[ "/dev/sda" ]'

node-01.example.com glusterfs_devices='[ "/dev/sda" ]'

node-02.example.com glusterfs_devices='[ "/dev/sda" ]'

node-03.example.com  glusterfs_devices='[ "/dev/sda" ]'

[new_nodes]

并运行相应的剧本,

ansible-playbook playbooks/openshift-glusterfs/config.yml

但这在

中失败
TASK [openshift_storage_glusterfs : Wait for GlusterFS pods] *******************

步骤。我是否想念其他任何剧本?

1 个答案:

答案 0 :(得分:0)

{p1}剧本不支持

AFAIK,converged mode扩展名。 因为当时仅在全新安装期间支持磁盘设备的ansible初始化,所以您想扩展现有的heketi集群,然后 需要手动操作,如下所示:12.1.3. Adding a New Cluster