From 749ee5b8c6161e893924fccf71be929f30a13ac6 Mon Sep 17 00:00:00 2001 From: Don Brady Date: Tue, 21 Jun 2022 22:30:34 -0600 Subject: [PATCH] DLPX-81551 nfs-utils 2.6.1 - update initial configurations for virtualization and dcenter --- .../appliance-build.dcenter/tasks/main.yml | 35 ++++++++++++++++++- .../tasks/main.yml | 19 +++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml b/live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml index edf426a3..d6d4dc3a 100644 --- a/live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml +++ b/live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml @@ -1,5 +1,5 @@ # -# Copyright 2018,2020 Delphix +# Copyright 2018, 2022 Delphix # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -70,6 +70,39 @@ - { regexp: '^RPCNFSDCOUNT=', line: 'RPCNFSDCOUNT=64' } - { regexp: '^RPCMOUNTDOPTS=', line: 'RPCMOUNTDOPTS="--num-threads=5 --manage-gids"' } +# +# Use the same NFS configuration as a Delphix engine. The content here should +# be identical to what is in '/opt/delphix/server/etc/nfs-local-v3v4.conf'. +# This config file is for use with nfs-utils 2.6.1 and later. +# +- ansible.builtin.stat: + path: /etc/nfs.conf.d + register: nfs_conf_d +- copy: + dest: "/etc/nfs.conf.d/local.conf" + mode: 0644 + content: | + [lockd] + port = 54045 + + [nfsd] + debug = all + lease-time = 20 + grace-time = 20 + vers2 = n + vers3 = y + vers4 = y + threads = 512 + + [mountd] + manage-gids = n + port = 54043 + threads = 5 + + [statd] + port = 54044 + when: nfs_conf_d.stat.isdir is defined and nfs_conf_d.stat.isdir + - command: systemctl mask named.service isc-dhcp-server.service isc-dhcp-server6.service # diff --git a/live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml b/live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml index 8dd8d069..33a1b003 100644 --- a/live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml +++ b/live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml @@ -1,5 +1,5 @@ # -# Copyright 2018 Delphix +# Copyright 2018, 2022 Delphix # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,6 +29,8 @@ # modifies this configuration at runtime, and we don't want ansible roles that # are re-run as part of upgrades to undo these runtime modifications. # +# This initialization works for both nfs-utils 1.3.4 and nfs-utils 2.6.1 +# - name: Link initial NFS configuration file: src: /opt/delphix/server/etc/nfs-kernel-server-v4 @@ -38,6 +40,21 @@ group: root state: link +- name: Get stats of directory + ansible.builtin.stat: + path: /etc/nfs.conf.d + register: nfs_conf_d + +- name: Link initial nfs-utils 2.6.1 configuration + file: + src: /opt/delphix/server/etc/nfs-local-v4.conf + dest: /etc/nfs.conf.d/local.conf + force: yes + owner: root + group: root + state: link + when: nfs_conf_d.stat.isdir is defined and nfs_conf_d.stat.isdir + # # The section below deals with disabling and masking services that need to be # disabled on initial install. Some of those services will remain disabled