gluster / gluster-ansible-infra Goto Github PK
View Code? Open in Web Editor NEWAnsible role to enable and deploy the backend of a Gluster cluster.
License: GNU General Public License v3.0
Ansible role to enable and deploy the backend of a Gluster cluster.
License: GNU General Public License v3.0
when running the role it fails on the task gluster.infra/roles/backend_setup : Enable and start vdo service
role output:
TASK [gluster.infra/roles/backend_setup : Install VDO dependencies] ************
ok: [REDACTED.REDACTED.com]
TASK [gluster.infra/roles/backend_setup : set fact about vdo installed deps] ***
ok: [REDACTED.REDACTED.com]
TASK [gluster.infra/roles/backend_setup : Enable and start vdo service] ********
fatal: [REDACTED.REDACTED.com]: FAILED! => {"changed": false, "msg": "Could not find the requested service vdo: host"}
when I search for vdo it is installed:
vdo-8.2.0.2-1.el9.x86_64
kmod-kvdo-8.2.0.18-46.el9.x86_64
kernel version: 5.14.0-160.el9.x86_64
OS: Centos Stream 9
with no extra repos, minimal install.
lsmod | grep vdo
kvdo 716800 0
dm_bufio 36864 2 kvdo,dm_persistent_data
dm_mod 184320 94 kvdo,dm_crypt,dm_thin_pool,dm_multipath,dm_log,dm_mirror,dm_bufio
modinfo kvdo
filename: /lib/modules/5.14.0-160.el9.x86_64/weak-updates/kmod-kvdo/vdo/kvdo.ko
version: 8.2.0.18
license: GPL
author: Red Hat, Inc.
description: device-mapper target for transparent deduplication
description: LZ4 compressor
license: Dual BSD/GPL
rhelversion: 9.1
srcversion: 01DF8D94EBF01EE3493F895
depends: dm-mod,dm-bufio
retpoline: Y
name: kvdo
vermagic: 5.14.0-152.el9.x86_64 SMP preempt mod_unload modversions
sudo systemctl status vdo
Unit vdo.service could not be found.
sudo systemctl status kvdo
Unit kvdo.service could not be found.
it seems like there is no service vdo or kvdo even tho the package is installed. From RHEL 9 documentation on VDO they are moving it to LVM-VDO does that have something to do with it?
Hi,
I'm getting some behaviour that I don't understand and am an unable to debug.
gluster_volumes_by_groupname_pre is being set incorrectly.
TASK [gluster.infra/roles/backend_setup : Check if vg block device exists] ***********************************************************************************************************************************
fatal: [host1]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'str'> instead."}
Group devices by volume group name, including existing devices
is setting gluster_volumes_by_groupname_pre
to the following
"gluster_volumes_by_groupname_pre": "NoneNoneNone{\"vg_sda\": [{\"vgname\": \"vg_sda\", \"pvname\": \"/dev/sda\"}]}"
I do have jinja2_native = True
in ansible.cfg, if I take that away gluster_volumes_by_groupname_pre
is set correctly.
"gluster_volumes_by_groupname_pre": {
"vg_sda": [
{
"pvname": "/dev/sda",
"vgname": "vg_sda"
}
]
}
If you attempt to create a gluster_volume
pointing at an empty brick created by this role, it will error:
"volume create: volume_name: failed: The brick storage-server:/data/brickmount is a mount point. Please create a sub-directory under the mount point and use that as the brick directory. Or use 'force' at the end of the command if you want to override this behavior"
I dont want to force. This behaviour is for a good reason. If the mount dir exists, but the LV hasn't actually been mounted, the volume will use the local file system instead of the mounted LV. It should error instead.
I propose adding an initial_dir
parameter to the gluster_infra_mount_devices
dict, that if specified, will create this directory in the mounted LV. It will default to blank to avoid breakages.
Not sure exactly when this sub-dir requirement was added to GlusterFS, I'm using 6.x.
The docs for gluster_infra_cache_vars
state:
cachethinpoolname - (deprecated, see: cachetarget) The existing thinpool on the volume group mentioned above.
cachetarget - The target thinpool or thick LV that should be cached
However,
has a hard dependency on that variable andcachetarget
does not exist outside of the docs. It is therefore not possible to create a cache for a thicklv.Hi,
just starting to read up before setting up my first Gluster cluster and wanted to know why you only seem to support JBOD, RAID6 and RAID10?
I have two SSD's per node that I was planning on running in RAID1 within a Replica 3.
Thanks.
Hello I get the same error
selinux is off
I found previous issuere here but advices from there don't help
try package in master and version 1.0.4 and pack from iso image
TASK [gluster.infra/roles/backend_setup : Group devices by volume group name, including existing devices] ***
fatal: [brest2.f.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'str object' has no attribute 'vgname'\n\nThe error appears to be in '/etc/ansible/roles/gluster.infra/roles/backend_setup/tasks/get_vg_groupings.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Group devices by volume group name, including existing devices\n ^ here\n"}/gluster.infra/roles/backend_setup/tasks/get_vg_groupings.yml'
this is my deploy file single node gfs
hc_nodes:
hosts:
brest2.f.com:
gluster_infra_volume_groups:
- vgname: gluster_vg_sdb
pvname: /dev/sdb
gluster_infra_mount_devices:
- path: /gluster_bricks/engine
lvname: gluster_lv_engine
vgname: gluster_vg_sdb
- path: /gluster_bricks/data
lvname: gluster_lv_data
vgname: gluster_vg_sdb
- path: /gluster_bricks/vmstore
lvname: gluster_lv_vmstore
vgname: gluster_vg_sdb
blacklist_mpath_devices:
- sdb
gluster_infra_thick_lvs:
- vgname: gluster_vg_sdb
lvname: gluster_lv_engine
size: 100G
gluster_infra_thinpools:
- vgname: gluster_vg_sdb
thinpoolname: gluster_thinpool_gluster_vg_sdb
poolmetadatasize: 3G
gluster_infra_lv_logicalvols:
- vgname: gluster_vg_sdb
thinpool: gluster_thinpool_gluster_vg_sdb
lvname: gluster_lv_data
lvsize: 500G
- vgname: gluster_vg_sdb
thinpool: gluster_thinpool_gluster_vg_sdb
lvname: gluster_lv_vmstore
lvsize: 500G
vars:
gluster_infra_disktype: RAID6
gluster_infra_stripe_unit_size: 256
gluster_infra_diskcount: 10
gluster_set_selinux_labels: true
gluster_infra_fw_ports:
- 2049/tcp
- 54321/tcp
- 5900/tcp
- 5900-6923/tcp
- 5666/tcp
- 16514/tcp
gluster_infra_fw_permanent: true
gluster_infra_fw_state: enabled
gluster_infra_fw_zone: public
gluster_infra_fw_services:
- glusterfs
gluster_features_force_varlogsizecheck: false
cluster_nodes:
- brest2.f.com
gluster_features_hci_cluster: '{{ cluster_nodes }}'
gluster_features_hci_volumes:
- volname: engine
brick: /gluster_bricks/engine/engine
arbiter: 0
- volname: data
brick: /gluster_bricks/data/data
arbiter: 0
- volname: vmstore
brick: /gluster_bricks/vmstore/vmstore
arbiter: 0
gluster_features_hci_volume_options:
storage.owner-uid: '36'
storage.owner-gid: '36'
features.shard: 'on'
performance.low-prio-threads: '32'
performance.strict-o-direct: 'on'
network.remote-dio: 'off'
network.ping-timeout: '30'
user.cifs: 'off'
nfs.disable: 'on'
performance.quick-read: 'off'
performance.read-ahead: 'off'
performance.io-cache: 'off'
cluster.eager-lock: enable
how to resolve it i use ovirt 4.5 node iso
roles/backend_setup/tasks/blacklist_mpath_devices.yml
- name: Ensure that multipathd service is running
service:
name: multipathd
state: started
enabled: yes
Should this be:
- name: Ensure that multipathd service is running
systemd:
name: multipathd
state: started
enabled: yes
?
Or is this a case where Ansible is smart and uses service/systemd according to the system?
Getting the following error message when using gluster.infra
:
TASK [gluster.infra/roles/backend_setup : Create volume groups] ********************************************************************************************************************************
failed: [hc2-02] (item={'key': 'vg.gluster', 'value': [{'vgname': 'vg.gluster', 'pvname': '/dev/sda'}]}) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "vg.gluster", "value": [{"pvname": "/dev/sda", "vgname": "vg.gluster"}]}, "msg": "Failed to find required executable pvs in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"}
Running sudo apt install lvm2 -y
on the remote machine fixes the problem.
Shouldn't this package be installed (if not already installed) by gluster.infra
like the thin-provisioning-tools
package is?
The README says that the lvsize
option for gluster_infra_lv_logicalvols
is "Optional, Default 100%, size of LV". However, omitting it results in the following error:
TASK [gluster.infra/roles/backend_setup : Create thin logical volume] **************************************************************************************************************************
fatal: [hc2-02]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'lvsize'\n\nThe error appears to be in '/home/ollie/.ansible/roles/gluster.infra/roles/backend_setup/tasks/thin_volume_create.yml': line 132, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n#this fails when the pool doesn't exist\n- name: Create thin logical volume\n ^ here\n"}
Manually specifying "100%FREE" results in this error:
TASK [gluster.infra/roles/backend_setup : Create thin logical volume] **************************************************************************************************************************
failed: [hc2-02] (item={'vgname': 'vg.gluster', 'thinpool': 'thinpool', 'lvname': 'lv.thin', 'lvsize': '100%FREE'}) => {"ansible_index_var": "index", "ansible_loop_var": "item", "changed": false, "index": 0, "item": {"lvname": "lv.thin", "lvsize": "100%FREE", "thinpool": "thinpool", "vgname": "vg.gluster"}, "msg": "Thin volume sizing with percentage not supported."}
What do I need to do to get the logical volume to be 100% the size of the thinpool?
roles:
- role: gluster.infra
vars:
gluster_infra_disktype: JBOD
gluster_infra_volume_groups:
- { vgname: vg.gluster, pvname: /dev/sda }
gluster_infra_lv_logicalvols:
- { vgname: vg.gluster, thinpool: thinpool, lvname: lv.thin }
gluster_infra_thinpools:
- { vgname: vg.gluster, thinpoolname: thinpool, poolmetadatasize: 16G, thinpoolsize: 100%FREE }
gluster_infra_mount_devices:
- { path: "/mnt/brick{{ ansible_hostname[-2:] }}", vgname: vg.gluster, lvname: lv.thin }
become: yes
The current implementation has a default value of 100%FREE
, but is using the -L|--size
argument, which only allows physical sizes like 100G
.
I would like to suggest changing the default -L 100%FREE
to the more acceptable -l 100%FREE
, which won't fail on run.
I'm not an ansible genius, but it should be possible to have different settings, ie. lvextentsize and lvbytesize, and to favour one over another.
Maybe set the default of lvextentsize
, but if lvbytesize
is defined, use that, which will be -L {SIZE}[M|G|T]
When applying the gluster.infra role this fails during the last task of the backend-setup sub role. This against a RHGS3.5 on RHEL7 host.
The task that fails is this one:
- name: Regenerate new LVM filter rules
shell: >
vdsm-tool config-lvm-filter -y
This fails because vdsm-tool is an interactive command, that waits for some operator to answer with Yes or No to proceed. As a result the playbook there just hangs. On RHEL7 at least vdsm-tool does not have an -y option.
I have 3 bare-metal servers on which I have 3 disks which are configured as a RAID. There are 3 partitions. One of these partitions I will use for my gluster cluster.
I've tried to configure a pool as follows:
---
- name: Create a GlusterFS brick on the servers
remote_user: root
hosts: gluster
gather_facts: false
vars:
gluster_infra_disktype: JBOD
# Dataalignment, for JBOD default is 256K if not provided.
gluster_infra_dalign: 256K
# VDO creation
#gluster_infra_vdo:
#- { name: 'hc_vdo_1', device: '/dev/md3' }
gluster_infra_volume_groups:
- { vgname: 'vg_md3', pvname: '/dev/md3' }
# https://de.slideshare.net/GlusterCommunity/data-reduction-for-gluster-with-vdo
# thinpoolname is optional, if not provided `vgname' followed by _thinpool is
# used for name. poolmetadatasize is optional, default 16G is used
gluster_infra_thinpools:
- { vgname: 'vg_md3', thinpoolname: 'vg_md3_thinpool', thinpoolsize: '1.6T', poolmetadatasize: '2G' }
# Thinvolumes for the brick. `thinpoolname' is optional, if omitted `vgname' followed by _thinpool is used
gluster_infra_lv_logicalvols:
- { vgname: 'vg_md3', thinpool: 'vg_md3_thinpool', vname: 'vg_md3_thinlv', lvsize: '1.8T' }
gluster_infra_mount_devices:
- { path: '/data/gluster/brick1', vgname: 'vg_md3', lvname: 'vg_md3_thinlv' }
roles:
- gluster.infra
Unfortunately this fails with:
TASK [gluster.infra/roles/backend_setup : Create a LV thinpool] *******************************************************************************************
failed: [prds0001] (item={'vgname': 'vg_md3', 'thinpoolname': 'vg_md3_thinpool', 'thinpoolsize': '1.6T', 'poolmetadatasize': '2G'}) => {"changed": false, "item": {"poolmetadatasize": "2G", "thinpoolname": "vg_md3_thinpool", "thinpoolsize": "1.6T", "vgname": "vg_md3"}, "module_stderr": "Shared connection to prds0001 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1544421225.6793776-67207272652594/AnsiballZ_lvol.py\", line 113, in <module>\r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1544421225.6793776-67207272652594/AnsiballZ_lvol.py\", line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1544421225.6793776-67207272652594/AnsiballZ_lvol.py\", line 48, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/usr/lib/python3.5/imp.py\", line 234, in load_module\r\n return load_source(name, filename, file)\r\n File \"/usr/lib/python3.5/imp.py\", line 170, in load_source\r\n module = _exec(spec, sys.modules[name])\r\n File \"<frozen importlib._bootstrap>\", line 626, in _exec\r\n File \"<frozen importlib._bootstrap_external>\", line 673, in exec_module\r\n File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\r\n File \"/tmp/ansible_lvol_payload_yyp74adb/__main__.py\", line 557, in <module>\r\n File \"/tmp/ansible_lvol_payload_yyp74adb/__main__.py\", line 510, in main\r\nValueError: invalid literal for int() with base 10: '1.6'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
While creating PV/VDO devices, add wipefs features. Which will call the wipefs command before creating a PV or a vdo device.
The backend setup process is not idempotent.
How to reproduce:
Expected result:
Actual result:
Running the playbook with --skip-tages=fscreate is possible as a workaround, but is not optimal.
The current architecture has a placeholder for backend_reset.
Tasks need to be added.
While trying to run the perf test on Fedora33 servers, I am getting the following error :
TASK [gluster.infra/roles/firewall_config : Add/Delete services to firewalld rules] ****************************************************************************************
failed: [server1.example.com] (item=glusterfs) => {"ansible_loop_var": "item", "changed": false, "item": "glusterfs", "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: glusterfs Permanent and Non-Permanent(immediate) operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)"}
failed: [server2.example.com] (item=glusterfs) => {"ansible_loop_var": "item", "changed": false, "item": "glusterfs", "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: glusterfs Permanent and Non-Permanent(immediate) operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)"}
failed: [server3.example.com] (item=glusterfs) => {"ansible_loop_var": "item", "changed": false, "item": "glusterfs", "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: glusterfs Permanent and Non-Permanent(immediate) operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)"}
failed: [server5.example.com] (item=glusterfs) => {"ansible_loop_var": "item", "changed": false, "item": "glusterfs", "msg": "ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: glusterfs Permanent and Non-Permanent(immediate) operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)"}
ok: [server2.example.com] => (item=samba)
ok: [server1.example.com] => (item=samba)
ok: [server3.example.com] => (item=samba)
ok: [server5.example.com] => (item=samba)
Control machine is having the following packages install :
gluster-ansible-maintenance-1.0.1-10.el7.noarch
gluster-ansible-cluster-1.0.1-2.el7.noarch
gluster-ansible-1.0.5-1.el7.noarch
centos-release-gluster7-1.0-2.el7.centos.noarch
gluster-ansible-infra-1.0.4-15.el7.noarch
gluster-ansible-repositories-1.0.1-3.el7.noarch
gluster-ansible-features-1.0.5-6.el7.noarch
The server on which the ansible script is running is having fedora33 installed
I'm trying to create a brick that uses the entire physical disk by pre-allocating the entire disk's space in a thin Logical Volume, without specifying an absolute size (in GB\TB, etc).
The thin pool is fine since in variable: gluster_infra_thinpools
, can use:
thinpoolsize: "99%VG"
, which leaves one percent for the pool metadata (16GB).
But this approach fails when creating the thin LV using variable: gluster_infra_lv_logicalvols
that has: lvsize: "99%VG"
. Error occurs: "Thin volume sizing with percentage not supported":
ASK [gluster.infra/roles/backend_setup : Create thin logical volume] *************************************************************************************************************************************************************************
Tuesday 29 October 2019 15:38:19 +0000 (0:00:00.103) 0:00:29.366 *******
failed: [storage-server] (item={'vgname': 'vg_sda', 'thinpool': 'vg_sda_thinpool', 'lvname': 'vg_sda_thinlv', 'lvsize': '99%VG'}) => {"changed": false, "index": 0, "item": {"lvname": "vg_sda_thinlv", "lvsize": "99%VG", "thinpool": "vg_sda_thinpool", "vgname": "vg_sda"}, "msg": "Thin volume sizing with percentage not supported."}
How can I avoid specifying the absolute size of each disk in the lvsize
value?
We have a server that has disks redundantly attached. So we have use as disk devices /dev/mapper/mpath{a..e}
This seems to interfere with this piece of code in roles/backend_setup/main.yaml:
# Get the list of volume groups created on vdo disks
# This is a bit hacky, we rely on pvname to get vdo disks
- name: Record VDO devices (if any)
set_fact:
vdo_devs: "{{ vdo_devs|default([]) + [ item.vgname ] }}"
with_items: "{{ gluster_infra_volume_groups | default([]) }}"
when: item.pvname is defined and item.pvname is search("/dev/mapper/")
What happens is that because the disks all have pvnames that contain "/dev/mapper" they are added to the vdo_devs list, and this leads to roles/backed_setup/mount.yaml
trying to mount them as VDOs... And this fails.
Script are failing as the updated gluster-ansible requires vdsm-tools to be installed, following error is observed now :
TASK [gluster.infra/roles/backend_setup : Regenerate new LVM filter rules] *****
fatal: [server1.example.com]: FAILED! => {"changed": true, "cmd": "vdsm-tool config-lvm-filter -y \n", "delta": "0:00:00.005736", "end": "2020-10-07 06:27:53.024411", "msg": "non-zero return code", "rc": 127, "start": "2020-10-07 06:27:53.018675", "stderr": "/bin/sh: vdsm-tool: command not found", "stderr_lines": ["/bin/sh: vdsm-tool: command not found"], "stdout": "", "stdout_lines": []}
@devyanikota : We have an issue with VDO and thin-pools, hence whenever VDO is enabled on a device, the LV for brick is created as a thick LV. So we need to support vdo with thickp for all device and also non-vdo with thinp.
We have been noticing the following failure since the update to ansible 2.13.3 with its dependency on Python 3.9 on CentOS Stream 8:
TASK [gluster.infra/roles/backend_setup : Group devices by volume group name, including existing devices] ***
fatal: [storage0]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was:
'str object' has no attribute 'vgname'\n\nThe error appears to be in '/etc/ansible/roles/gluster.infra/roles/
backend_setup/task/get_vg_groupings.yml': line 3, column 3, but may\nbe elsewhere in the file depending on
the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Group devices by volume group
name, including existing devices\n ^ here\n"}
fatal: [storage1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was:
'str object' has no attribute 'vgname'\n\nThe error appears to be in '/etc/ansible/roles/gluster.infra/roles/
backend_setup/tasks/get_vg_groupings.yml': line 3, column 3, but may\nbe elsewhere in the file depending on
the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Group devices by volume group
name, including existing devices\n ^ here\n"}
Instead of calling lvcreate and friends directly, we should probably use https://docs.ansible.com/ansible/2.9/modules/lvol_module.html ?
As of now all of the PVs defined in gluster_infra_pvs
go into one volume group, and all logical volumes are created from it.
We should be able to create multiple VGs like:
gluster_infra_vgs:
- vgname: vg_sda
pvs: /dev/sda
- vgname: vg_sdb
pvs: /dev/sdb
22:81 error line too long (84 > 80 characters) (line-length)
28:81 error line too long (81 > 80 characters) (line-length)
34:81 error line too long (90 > 80 characters) (line-length)
49:81 error line too long (81 > 80 characters) (line-length)
53:81 error line too long (81 > 80 characters) (line-length)
57:81 error line too long (83 > 80 characters) (line-length)
See https://ci.centos.org/view/Gluster/job/gluster_ansible-infra/3/console
Following error is seen while preparing backend for GlusterFS cluster:
TASK [gluster.infra/roles/backend_setup : Create a LV thinpool for similar device types] ***
failed: [storage0] (item={'vgname': 'vg_vdb', 'thinpoolname': 'vg_vdb_thinpool', 'thinpoolsize': '9G', 'poolmetadatasize': '100M'}) => {"ansible_loop_var": "item", "changed": true, "cmd": ["lvcreate", "--type", "thin-pool", "--zero", "n", "-l", "9G", "--chunksize", "256K", "--poolmetadatasize", "100MiB", "-n", "vg_vdb_thinpool", "vg_vdb"], "delta": "0:00:00.012250", "end": "2022-06-02 10:02:10.161117", "item": {"poolmetadatasize": "100M", "thinpoolname": "vg_vdb_thinpool", "thinpoolsize": "9G", "vgname": "vg_vdb"}, "msg": "non-zero return code", "rc": 3, "start": "2022-06-02 10:02:10.148867", "stderr": " Invalid argument for --extents: 9G\n Error during parsing of command line.", "stderr_lines": [" Invalid argument for --extents: 9G", " Error during parsing of command line."], "stdout": "", "stdout_lines": []}
It looks like wrong option -l
is used instead of -L
.
using the example playbook posted on the bottom of https://github.com/gluster/gluster-ansible-infra i am keep getting gluster_infra_thick_lvs is undefined and the playbook fails. I thought that gluster_infra_thick_lvs was optional and according to the playbook it does not mention gluster_infra_thick_lvs and tries to mount the thinlv ...
Task "Install python-yaml package for Debian systems" at role "backend_setup" fails on Debian bullseye. The package name was changed to "python3-yaml".
Hello,
SELinux configuration do not implement a correct regex for glusterd_brick_t fcontext.
https://docs.ansible.com/ansible/latest/modules/sefcontext_module.html
The target should be a regex instead of a path.
Could you please test and implement the following patch to this playbook ?
https://github.com/gluster/gluster-ansible-infra/blob/master/roles/backend_setup/tasks/mount.yml#L61
--- a/roles/backend_setup/tasks/mount.yml
+++ b/roles/backend_setup/tasks/mount.yml
@@ -51,7 +51,7 @@
- name: Set Gluster specific SeLinux context on the bricks
sefcontext:
- target: "{{ item.path }}"
+ target: "{{ (item.path | realpath | regex_escape()) + '(/.*)?' }}"
setype: glusterd_brick_t
state: present
with_items: "{{ gluster_infra_mount_devices }}"
Due to this bug, the glusterd_brick_t failed to propagate the correct type to our bricks. All our files were flagged as default_t. I prevents glusterd to access some files likes (sockets โฆ) and it raises a big amount of selinux AVC denies alerts.
Hope this helps,
As of now the variable gluster_features_ganesha_masternode provides the user flexibility to choose the master node, at the cost of extra pain in assigning the variable.
We can always choose the first node as master node and get rid of this variable.
When vdo devices are mounted, a couple of configuration settings have to be done so that XFS handles error conditions when VDO runs out of physical space.
These settings would be to update the max_retries files:
/sys/fs/xfs//error/metadata/ENOSPC/max_retries
/sys/fs/xfs//error/metadata/EIO/max_retries
For example:
echo 4 | tee /sys/fs/xfs/dm-13/error/metadata/ENOSPC/max_retries
echo 4 | tee /sys/fs/xfs/dm-13/error/metadata/EIO/max_retries
This is a run time config, the directory dm-13 (or whatever) is removed when filesystem is unmounted and created again when filesystem is mounted.
As of now there is no permanent solution (that I know) to this problem except to run the above command and update the files every time the filesystem is mounted.
Update the mount role with the above commands when the device is a VDO device.
In role backend_setup there is a task to check whether the package vdsm-python
is installed. This seems to be specific to operating systems in the RedHat family. This isn't an issue as ignore_errors
is set to yes
However, later on there is a task to 'Re-generate new LVM Filrer rules' which uses vdsm-python. This task fails on Debian like systems. This should either be modified to include operating systems from the Debian family or ignore_errors
could be set to yes
on this task as well.
While trying to run gluster-performance-test-suite using centos7 as the control machine, I am getting the following error :
TASK [gluster.infra/roles/backend_setup : Make sure meta and pool pvs exists in volume group] ******************************************************************************
fatal: [server1.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
fatal: [server2.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
fatal: [server3.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
fatal: [server4.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
fatal: [server5.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
fatal: [server6.com]: FAILED! => {"msg": "dict2items requires a dictionary, got <class 'ansible.template.AnsibleUndefined'> instead."}
The pvs are existing on the machine and it is working fine with fedora32, hence I think this is a bug.
The following gluster-ansible packages were installed on the centos7 machine from the copr repo :
# rpm -qa | grep gluster-ansible
gluster-ansible-cluster-1.0.1-2.el7.noarch
gluster-ansible-1.0.5-1.el7.noarch
gluster-ansible-maintenance-1.0.1-3.el7.noarch
gluster-ansible-infra-1.0.4-10.el7.noarch
gluster-ansible-repositories-1.0.1-2.el7.noarch
gluster-ansible-features-1.0.5-6.el7.noarch
Centos Version :
# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
Important Note: I am not getting any problems while using fedora32
The issue is resolved. Remove the comment and the corresponding cast to int and division by 1024 once ansible 2.6 is released.
Change the spec file to add dependency on Ansible 2.6
For some reason vg_create is using a command that fails if you need to rerun the setup:
We need to use idempotent modules where possible
Tendrl Ansible (https://github.com/Tendrl/tendrl-ansible/tree/release/1.6.3/ ) use 'gluster_servers' as the list of hosts to have Gluster on as storage servers. Let's be consistent and use it here as well.
The current CentOS7 variant of VDO doesn't yet know of this option and oVirt HCI deployments using VDO always fail.
This tasks file should essential check for the required variables for that particular role.
For example:
- name: Checking that required variables are set
fail: msg="{{ item }} is not defined"
when: not {{ item }}
with_items:
- foo_volname
- foo_username
- foo_mastenodes
This should essentially do a role sanity check before executing the role.
ykaul@ykaul gluster-ansible-infra]$ find . -name "*.yml" |xargs ansible-lint
Syntax Error while loading YAML.
did not find expected ',' or '}'
The error appears to have been in '/home/ykaul/github/gluster-ansible-infra/examples/backend_with_vdo.yml': line 22, column 8, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- {vgname: 'vg_sdb', thinpoolname: 'foo_thinpool', thinpoolsize: '100G', poolmetadatasize: '16G'
- {vgname: 'vg_sdc', thinpoolname: 'bar_thinpool', thinpoolsize: '500G', poolmetadatasize: '16G'
^ here
@devyanikota : Now only three options are included in vdo dictionary like: "name","device" and "logicalsize" and others are global.
The problem is we can't configure other global variables if we have multiple devices.
I'm trying to setup a 3 node GlusterFS cluster and have run into some issues trying to setup the backend storage.
My current setup consists of 3 nodes, each of which has a 10G disk attached (/dev/vdb) in addition to the primary storage (/dev/vda). The primary storage does not use LVM partitioning scheme.
I'm trying to prepare the backend disks (/dev/vdb). My goal is to:
My playbook is as follows:
- hosts: all
become: True
roles:
- gluster.infra
vars:
gluster_infra_fw_state: disabled
gluster_infra_volume_groups:
vgname: 'storage_vg'
pvname: '/dev/vdb'
gluster_infra_thick_lvs:
vgname: 'storage_vg'
lvname: 'storage_lv'
gluster_infra_mount_devices:
path: '/mnt/brick'
vgname: 'storage_vg'
lv: 'storage_lv'
When I try to run the playbook it fails with the following error:
TASK [gluster.infra/roles/backend_setup : Group devices by volume group name, including existing devices] ******************************************************************
fatal: [gluster-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'str object' has no attribute 'vgname'\n\nThe error appears to be in '/root/.ansible/roles/gluster.infra/roles/backend_setup/tasks/get_vg_groupings.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Group devices by volume group name, including existing devices\n ^ here\n"}
I've uploaded the full log file here https://paste.ubuntu.com/p/dGPD7KRPMF/ if it's any help.
Could you please update the documentation for the instalation in the galaxy? I did not found it .
Would be awsome if this role could be part of the collection
See https://github.com/linux-system-roles/firewall - instead of keep your own role to configure firewalld, use that one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.