mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
Update bmcsetup related code for OpenBMC
This commit is contained in:
parent
2aa3136094
commit
69f38cbb87
@ -266,13 +266,13 @@ elif [ "$IPMIMFG" == "674" ]; then # DELL
|
||||
ipmitool delloem lan set shared with lom$BMCPORT &>/dev/null
|
||||
ipmitool delloem lan set shared with failover all loms &>dev/null
|
||||
fi
|
||||
elif [ "$IPMIMFG" = "42817" -a "$XPROD" = "16975" ]; then
|
||||
elif [ "$IPMIMFG" = "42817" -a "$XPROD" = "16975" ]; then # IBM OpenPOWER servers with OpenBMC
|
||||
ISOPENBMC=1
|
||||
fi
|
||||
|
||||
if [ -z "$ISOPENBMC" ]; then
|
||||
LAN_MED_TYPE="802.3"
|
||||
else
|
||||
LAN_MED_TYPE="802.3"
|
||||
if [ ! -z "$ISOPENBMC" ]; then
|
||||
# Overvide the default value for OpenBMC
|
||||
LAN_MED_TYPE="Other LAN"
|
||||
fi
|
||||
while [ -z "$LANCHAN" ]; do
|
||||
@ -390,12 +390,11 @@ done
|
||||
# update the node status to 'bmcready' for openbmc, no more configuration is needed.
|
||||
if [ ! -z "$ISOPENBMC" ]; then
|
||||
# To enable network configuration for openbmc
|
||||
let idev=0
|
||||
TRIES=0
|
||||
bmc_config_rc=0
|
||||
# Set Channel Access to apply network setting
|
||||
#while ! ipmitool -d $idev lan set $LANCHAN access on; do
|
||||
while ! ipmitool -d $idev raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
|
||||
#while ! ipmitool -d 0 lan set $LANCHAN access on; do
|
||||
while ! ipmitool -d 0 raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
|
||||
snooze
|
||||
let TRIES=TRIES+1
|
||||
if [ $TRIES -gt $TIMEOUT ]; then
|
||||
|
@ -96,9 +96,9 @@ sub process_request {
|
||||
my $request = shift;
|
||||
my $callback = shift;
|
||||
my $node = $request->{'_xcat_clienthost'}->[0];
|
||||
my $open_table = "ipmi";
|
||||
my $bmc_mgmt_type = "ipmi";
|
||||
if ($request->{isopenbmc}->[0]) {
|
||||
$open_table = "openbmc";
|
||||
$bmc_mgmt_type = "openbmc";
|
||||
}
|
||||
unless (ok_with_node($node, 300)) {
|
||||
$callback->({ error => ["Unable to prove root on your IP approves of this request"], errorcode => [1] });
|
||||
@ -106,14 +106,14 @@ sub process_request {
|
||||
}
|
||||
|
||||
#my $sitetable = xCAT::Table->new('site');
|
||||
my $ipmitable = xCAT::Table->new("$open_table");
|
||||
my $ipmitable = xCAT::Table->new("$bmc_mgmt_type");
|
||||
my $tmphash;
|
||||
my $username;
|
||||
my $gennedpassword = 0;
|
||||
my $bmc;
|
||||
my $password;
|
||||
$tmphash = $ipmitable->getNodesAttribs([$node], [ 'bmc', 'username', 'bmcport', 'password', 'taggedvlan' ]);
|
||||
my $authmap = xCAT::PasswordUtils::getIPMIAuth(noderange => [$node], ipmihash => $tmphash, keytype => $open_table);
|
||||
my $authmap = xCAT::PasswordUtils::getIPMIAuth(noderange => [$node], ipmihash => $tmphash, keytype => $bmc_mgmt_type);
|
||||
|
||||
if ($::XCATSITEVALS{genpasswords} eq "1" or $::XCATSITEVALS{genpasswords} =~ /y(es)?/i) {
|
||||
$password = genpassword(10) . "1cA!";
|
||||
|
Loading…
x
Reference in New Issue
Block a user