Skip to content

Commit 2c5f5dc

Browse files
author
Himani Anil Deshpande
committed
[Bug] Installing Pyxis if nvidia is installed
1 parent 20b88c9 commit 2c5f5dc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cookbooks/aws-parallelcluster-slurm/recipes/install/install_pyxis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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 unless nvidia_enabled?
18+
return unless nvidia_installed?
1919
return if pyxis_installed?
2020

2121
pyxis_version = node['cluster']['pyxis']['version']

cookbooks/aws-parallelcluster-slurm/spec/unit/recipes/install_pyxis_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
node.override['cluster']['pyxis']['version'] = pyxis_version
3434
node.override['cluster']['pyxis']['runtime_path'] = pyxis_runtime_dir
3535
end
36-
allow_any_instance_of(Object).to receive(:nvidia_enabled?).and_return(true)
36+
allow_any_instance_of(Object).to receive(:nvidia_installed?).and_return(true)
3737
allow_any_instance_of(Object).to receive(:pyxis_installed?).and_return(false)
3838
runner.converge(described_recipe)
3939
end
@@ -93,7 +93,7 @@
9393
runner = runner(platform: platform, version: version) do |_node|
9494
RSpec::Mocks.configuration.allow_message_expectations_on_nil = true
9595
end
96-
allow_any_instance_of(Object).to receive(:nvidia_enabled?).and_return(true)
96+
allow_any_instance_of(Object).to receive(:nvidia_installed?).and_return(true)
9797
allow_any_instance_of(Object).to receive(:pyxis_installed?).and_return(true)
9898
runner.converge(described_recipe)
9999
end

cookbooks/aws-parallelcluster-slurm/test/controls/pyxis_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# See the License for the specific language governing permissions and limitations under the License.
1111

1212
control 'tag:install_pyxis_installed' do
13-
only_if { ['yes', true, 'true'].include?(node['cluster']['nvidia']['enabled']) }
13+
only_if { instance.nvidia_installed? }
1414

1515
title 'Checks Pyxis has been installed'
1616

0 commit comments

Comments
 (0)