Skip to content
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

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

cxhong
Copy link
Contributor

@cxhong cxhong commented Jan 25, 2018

IR PDUs provides Untility to configure the PDU.

+=============================================================================+
|                     [ IBM PDU Configuration Utility ]                       |
+=============================================================================+

Please Login: ADMIN

Password: ****
+=============================================================================+
|                     [ IBM PDU Configuration Utility ]                       |
+=============================================================================+

      1. System Configuration
      2. PDU Firmware Reset
      3. Reset Configuration to Default
      4. PDU Firmware Upgrade
      5. Event Log
      6. History Log
      0. Exit

------------------------------------------------------------------------------
     Please Enter Your Selection =>

xCAT adds rspconfig command to change hostname and network setting for IRPDU via Expect routine.

 rspconfig irpdunode [hostname=<NAME>|ip=<IP>|gateway=<GATEWAY>|mask=<MASK>]

this command is also included in the pdudiscover --setup options.

]# pdudiscover --range 172.21.253.115 --setup
Discovering pdu using snmpwalk for 172.21.253.115 .....
ip              name                    vendor                                                  mac
------------    ------------            ------------                                            ------------
172.21.253.115  f6pdu116                IBM PDU 46W1608(46M4003) OPDP_sIBM_v01.3_2 FreeRTOS_4.2.1 Lwip_1.2.0    00:18:23:05:84:10
pdu discovered and matched: f6pdu116 to f6pdu16
Configure pdu ....
process command: rspconfig f6pdu16 hostname=f6pdu16 ip=172.21.253.105 netmask=255.255.0.0

@xcatbot
Copy link

xcatbot commented Jan 25, 2018

CI CHECK RESULT : > PR FORMAT CORRECT> BUILD SUCCESSFUL > INSTALL XCAT SUCCESSFUL> CODE SYNTAX CORRECT> FAST REGRESSION TEST Successful: Totalcase 215 Pass 215 failed 0

@zet809
Copy link

zet809 commented Jan 26, 2018

Hi, @cxhong , I move this PR to 2.13.11 release.

@zet809 zet809 modified the milestones: 2.13.10, 2.13.11 Jan 26, 2018
my $cmd;
my $rc = 0;
if ( $mytype eq "crpdu" ) {
$cmd = "rspconfig $pdu sshcfg";
Copy link

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.

Copy link
Contributor Author

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

Copy link

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?

Copy link
Contributor Author

@cxhong cxhong Feb 1, 2018

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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The message must miss something.
  2. And, may need to return if no IP is available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the output message will have name of pdu:
testpud: is not reachable
  1. added "return", thanks

$mypdu->send("$send_one\r");
#change hostname
$mypdu->send("$send_one\r");
$mypdu->send("$hostname\r");
Copy link

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?

Copy link
Contributor Author

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");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No gateway input.

Copy link
Contributor Author

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

Copy link

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.

Copy link
Contributor Author

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

@zet809
Copy link

zet809 commented Feb 6, 2018

Looks good to me, I agree to merge, thx!

@zet809 zet809 merged commit 56814b4 into xcat2:master Feb 6, 2018
@cxhong cxhong deleted the irnet branch November 12, 2019 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants