From 7fd9970c770ff7014b3066c5db303927b52be124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Obih=C3=B6rnchen?= Date: Tue, 25 Jan 2022 12:14:47 +0100 Subject: [PATCH] Fix OpenPOWER detection regex The old regex matches product IDs containing a 0 (like 1230 or 1023, ...), too. This causes issues for some x86 Supermicro servers resulting in the following error: rpower node01 cycle node01: [xcat]: Error: unsupported command rpower cycle for OpenPOWER The new regex fixes this issue and matches ^0$ only. --- xCAT-server/lib/xcat/plugins/ipmi.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 7e3580561..51a7e06c8 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1619,7 +1619,7 @@ sub isopenpower { if ($sessdata->{prod_id} == 43707 and $sessdata->{mfg_id} == 0) { # mft_id 0 and prod_id 43707 is for Firestone,Minsky return 1; - } elsif (($sessdata->{prod_id} =~ /0|2355|2437/) and $sessdata->{mfg_id} == 10876) { + } elsif (($sessdata->{prod_id} =~ /^(?:0|2355|2437)$/) and $sessdata->{mfg_id} == 10876) { # mfg_id 10876 is for IBM Power S822LC for Big Data (Supermicro), prod_id 2355 for B&S, and 0 or 2437 for Boston return 1; } else {