Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gluster.infra package throwing error for firewall_config #117

Open
rkothiya opened this issue Jan 21, 2021 · 3 comments
Open

gluster.infra package throwing error for firewall_config #117

rkothiya opened this issue Jan 21, 2021 · 3 comments

Comments

@rkothiya
Copy link

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 :

rpm -qa | grep gluster

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

@pkesavap
Copy link
Member

@rkothiya Did you find any work around for this?

@pkesavap
Copy link
Member

pkesavap commented May 17, 2021

@rkothiya did you by any chance manually install glusterfs-server as part of the workaround

@hunter86bg
Copy link
Contributor

Glusterfs-server and in some distros reload of firewalld is needed
I'm using in Ubuntu 20.04 the following (omitting the code for swapping from UFW to firewalld):

# tasks file for firewall_config
- name: Populate service facts
  ansible.builtin.service_facts:

- name: Install gluster-server to get the firewalld service
  package:
    name: 'glusterfs-server'
    state: present
  register: install_status
  when:
  - 'gluster_infra_fw_services is defined'
  - 'services["ufw.service"].status == "masked"'

- name: Reload firewalld before enabling glusterfs service
  service:
    name: firewalld
    state: reloaded
  when:
  - 'gluster_infra_fw_services is defined'
  - 'services["ufw.service"].status == "masked"'
  - 'install_status.changed'

- name: Add/Delete services to firewalld rules
<output truncated>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants