-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hostname and network setting changes for IRPDU #4726
Conversation
|
Hi, @cxhong , I move this PR to 2.13.11 release. |
my $cmd; | ||
my $rc = 0; | ||
if ( $mytype eq "crpdu" ) { | ||
$cmd = "rspconfig $pdu sshcfg"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, one more step needed for crpdu
. You can put rspconfig out of the if/else section which is common for both crpdu and irpdu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sshcfg only supports for Coral PDU
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so the rspconfig section is common for both IRPDU and CRpdu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is usage for rspconfig:
IR PDU:
rspconfig irpdunode [hostname=<NAME>|ip=<IP>|gateway=<GATEWAY>|mask=<MASK>]
CR PDU:
rspconfig pdunodes sshcfg
rspconfig pdunodes snmpcfg
rspconfig pdunode [hostname=<NAME>|ip=<IP>|mask=<MASK>]
} elsif (system("ping -c 2 $discover_ip") == 0) { | ||
$login_ip = $discover_ip; | ||
} else { | ||
xCAT::SvrUtils::sendmsg(" is not reachable", $callback,$pdu); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The message must miss something.
- And, may need to return if no IP is available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the output message will have name of pdu:
testpud: is not reachable
- added "return", thanks
$mypdu->send("$send_one\r"); | ||
#change hostname | ||
$mypdu->send("$send_one\r"); | ||
$mypdu->send("$hostname\r"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no hostname specified, what shall be input here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will not affect configuration
$mypdu->send("$send_two\r"); | ||
$mypdu->send("$send_one\r"); | ||
$mypdu->send("$ip\r"); | ||
$mypdu->send("$gateway\r"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No gateway input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gateway takes from input also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But from line 1463 in file xCAT-server/lib/xcat/plugins/switchdiscover.pm, no gateway is input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I am going to add gateway from switchdiscover.pm
Looks good to me, I agree to merge, thx! |
IR PDUs provides Untility to configure the PDU.
xCAT adds rspconfig command to change hostname and network setting for IRPDU via Expect routine.
this command is also included in the pdudiscover --setup options.