File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
cookbooks/aws-parallelcluster-install/recipes Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ This file is used to list changes made in each version of the AWS ParallelCluste
77------
88
99** ENHANCEMENTS**
10- - Add support for AWS Trainium instances.
1110- Add support for Slurm Accounting.
1211- Add support for adding and removing shared storages at cluster update.
1312- Add possibility to specify multiple instance types for the same compute resource.
Original file line number Diff line number Diff line change 1515# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
1616# limitations under the License.
1717
18- return if node [ 'cluster' ] [ 'base_os' ] == 'centos7' || arm_instance? || is_package_installed? ( "aws-neuronx-dkms" )
18+ return if node [ 'cluster' ] [ 'base_os' ] == 'centos7' || arm_instance? || neuron_installed?
1919
2020if platform? ( 'amazon' )
2121 # add neuron repository
Original file line number Diff line number Diff line change @@ -541,19 +541,18 @@ def efa_installed?
541541 dir_exist
542542end
543543
544- def is_package_installed? ( package_name )
544+ def neuron_installed?
545+ package_name = "aws-neuronx-dkms"
545546 command = value_for_platform (
546- %w( ubuntu debian ) => {
547- 'default' => "apt list --installed | grep #{ package_name } " ,
548- } ,
549- 'default' => "yum list installed | grep #{ package_name } "
550- )
547+ %w( ubuntu debian ) => {
548+ 'default' => "apt list --installed | grep #{ package_name } " ,
549+ } ,
550+ 'default' => "yum list installed | grep #{ package_name } " )
551551
552552 cmd = Mixlib ::ShellOut . new ( command , timeout : 60 )
553553 cmd . run_command
554- Chef ::Log . info ( "Checking if #{ package_name } is installed...\n #{ command } \n #{ cmd . stdout . strip } " )
555- # Convert return code to boolean
556- cmd . exitstatus . to_i . zero?
554+ # Return false if the package is not installed
555+ !( cmd . exitstatus != 0 )
557556end
558557
559558def is_neuron_instance?
You can’t perform that action at this time.
0 commit comments