File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 212212 if node [ 'platform_version' ] . split ( '.' ) [ 1 ] >= '7'
213213 # Lustre Client for Centos >= 7.7
214214 default [ 'cfncluster' ] [ 'lustre' ] [ 'public_key' ] = 'https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc'
215- default [ 'cfncluster' ] [ 'lustre' ] [ 'base_url' ] = "https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.#{ node [ 'platform_version' ] . split ( '.' ) [ 1 ] } /x86_64/"
215+ default [ 'cfncluster' ] [ 'lustre' ] [ 'base_url' ] = "https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.#{ get_rhel_kernel_minor_version } /x86_64/"
216216 elsif node [ 'platform_version' ] . split ( '.' ) [ 1 ] == '6'
217217 # Lustre Drivers for Centos 7.6
218218 default [ 'cfncluster' ] [ 'lustre' ] [ 'version' ] = '2.10.6'
Original file line number Diff line number Diff line change @@ -307,3 +307,19 @@ def aws_domain
307307def platform_supports_pmix?
308308 node [ 'platform' ] != 'centos' || node [ 'platform_version' ] . to_i > 6
309309end
310+
311+ #
312+ # Retrieve RHEL kernel minor version from running kernel
313+ # The minor version is retrieved from the patch version of the running kernel
314+ # following the mapping reported here https://access.redhat.com/articles/3078#RHEL7
315+ # Method works for minor version >=7
316+ #
317+ def get_rhel_kernel_minor_version
318+ # kernel release is in the form 3.10.0-1127.8.2.el7.x86_64
319+ kernel_patch_version = node [ 'kernel' ] [ 'release' ] . match ( /^\d +\. \d +\. \d +-(\d +)\. .*$/ ) [ 1 ]
320+ kernel_minor_version = '7'
321+ if kernel_patch_version >= '1127'
322+ kernel_minor_version = '8'
323+ end
324+ kernel_minor_version
325+ end
You can’t perform that action at this time.
0 commit comments