Skip to content

Commit

Permalink
Enable BeeGFS Client Installation for versions >= 7.2.7
Browse files Browse the repository at this point in the history
Signed-off-by: DeepikaKrishnaiah <[email protected]>
  • Loading branch information
DeepikaKrishnaiah committed Mar 29, 2023
1 parent 7b7d41e commit 745c7e1
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 10 deletions.
8 changes: 8 additions & 0 deletions input/storage_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,11 @@ beegfs_client_version: "7.2.6"
# Default value: false
# If there is a need for installing different version of BeeGFS client then make this variable to true
beegfs_version_change: false

# Beegfs secret storage file or authentication file
# Required for Beegfs version >= 7.2.7
# Default value is /home/connauthfile
# Accepted value: Path along with filename for secret stoarge file configured
# on beegfs server
# If this is not provided, beegfs installation will fail
beegfs_secret_storage_filepath: /home/connauthfile
20 changes: 18 additions & 2 deletions storage/roles/beegfs/tasks/beegfs_client.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright 2023 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,24 @@
replace: "connDisableAuthentication = true"
when: beegfs_client_version >= '7.3.1'

- name: Copy and update the shared secret file configuration
when: beegfs_client_version >= '7.2.7'
block:
- name: Copy the shared secret file to the cluster
ansible.builtin.copy:
src: "{{ beegfs_secret_storage_filepath }}"
dest: "{{ beegfs_client_secret_path }}"
remote_src: false
mode: "{{ beegfs_secretfile_mode }}"

- name: Update the beegfs-client.conf file
ansible.builtin.lineinfile:
path: "{{ beegfs_client_secret_conf_file }}"
regexp: "{{ beegfs_secretfile_regexp }}"
line: "{{ beegfs_secretfile_regexp_update }}"

- name: Modify configuration files to support rdma
when: beegfs_rdma_support
block:
- name: Modify BeeGFS client autobuild file for infiniband support
ansible.builtin.lineinfile:
Expand Down Expand Up @@ -70,7 +87,6 @@
ansible.builtin.assert:
that: false
fail_msg: "{{ beegfs_rebuild_status }}"
when: beegfs_rdma_support

- name: Modify BeeGFS client autobuild file for without RDMA
ansible.builtin.lineinfile:
Expand Down
15 changes: 14 additions & 1 deletion storage/roles/beegfs/tasks/fetch_beegfs_inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
fail_msg: "{{ beegfs_mgmt_server_fail_msg }}"

- name: Validate beegfs_mgmt_server inputs
when: beegfs_mgmt_server | length > 1
block:
- name: Test reachability of beegfs_mgmt_server
ansible.builtin.command: ping -c3 {{ beegfs_mgmt_server }}
Expand All @@ -39,7 +40,6 @@
ansible.builtin.fail:
msg: "{{ beegfs_mgmt_server_not_reachable_msg }}"
when: ping_msg in beegfs_mgmt_server_reachablility.stdout
when: beegfs_mgmt_server | length > 1

- name: Verify beegfs_mounts is not empty
ansible.builtin.fail:
Expand Down Expand Up @@ -71,6 +71,19 @@
ansible.builtin.fail:
msg: "{{ beegfs_repo_status_msg }}"

- name: Validate shared secret file for beegfs version >= 7.2.7
when: beegfs_client_version >= '7.2.7'
block:
- name: Validate the shared secret file
ansible.builtin.stat:
path: "{{ beegfs_secret_storage_filepath }}"
register: file_result

- name: Validate the shared secret file existence
ansible.builtin.fail:
msg: "{{ beegfs_shared_secret_failure_msg }}"
when: not file_result.stat.exists

- name: Assert beegfs_version_change
ansible.builtin.assert:
that:
Expand Down
6 changes: 3 additions & 3 deletions storage/roles/beegfs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
compute_os: "{{ ansible_distribution | lower }}"

- name: Install BeeGFS client
when:
- beegfs_support
- os_supported_leap not in compute_os
block:
- name: Check prerequisites
ansible.builtin.include_tasks: prerequisites.yml
Expand All @@ -34,6 +37,3 @@

- name: Install BeeGFS client
ansible.builtin.include_tasks: beegfs_client.yml
when:
- beegfs_support
- os_supported_leap not in compute_os
8 changes: 4 additions & 4 deletions storage/roles/beegfs/tasks/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
---

- name: Check for beegfs_ofed_kernel_modules_path
when:
- beegfs_rdma_support
- beegfs_ofed_kernel_modules_path | length > 1
block:
- name: Verify beegfs_ofed_kernel_modules_path existence
ansible.builtin.stat:
Expand All @@ -24,9 +27,6 @@
ansible.builtin.fail:
msg: "{{ fail_msg_beegfs_ofed_path }}"
when: not beegfs_ofed_path.stat.exists
when:
- beegfs_rdma_support
- beegfs_ofed_kernel_modules_path | length > 1

- name: Fetch SElinux mode
ansible.builtin.command: sestatus
Expand All @@ -39,6 +39,7 @@
when: '"SELinux status: disabled" not in selinux_status.stdout_lines'

- name: Unmount previous existence of BeeGFS client
when: beegfs_unmount_client
block:
- name: BeeGFS client mount config file
ansible.builtin.command: cat "{{ beegfs_mount_file }}"
Expand Down Expand Up @@ -70,7 +71,6 @@
- name: Status of unmounting
ansible.builtin.fail:
msg: "{{ beegfs_mount_status_msg }}"
when: beegfs_unmount_client

- name: Fetch kernel version
ansible.builtin.command: uname -r
Expand Down
6 changes: 6 additions & 0 deletions storage/roles/beegfs/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ beegfs_rebuild_status:
beegfs_rebuild_tcp_msg:
- "Make sure that beegfs-client and beegfs other server's versions are compatible"
helperd_location: "/etc/beegfs/beegfs-helperd.conf"
beegfs_client_secret_path: "/etc/beegfs/"
beegfs_secretfile_mode: "0400"
beegfs_client_secret_conf_file: "/etc/beegfs/beegfs-client.conf"
beegfs_secretfile_regexp: "^connAuthFile = "
beegfs_secretfile_regexp_update: "connAuthFile = /etc/beegfs/connauthfile"

# Usage: validate_beegfs_vars.yml
selinux_fail_msg: "SELinux should be in disabled mode, for installing beegfs client. Please diasbled selinux and reboot the system"
Expand Down Expand Up @@ -105,3 +110,4 @@ unmount_failure_msg: "beegfs_unmount_client should be true only when beegfs_vers
latest_version: 7.3.0
compatability_msg: "Upgradation to 7.3.0 is not possible, as it is not supported by beegfs, try upgrading to some other versions"
storage_config_vars: "{{ role_path }}/../../../input/storage_config.yml"
beegfs_shared_secret_failure_msg: "Failed. Shared secret file should be configured in server, meta and storage should be provioded for client"

0 comments on commit 745c7e1

Please sign in to comment.