Re: [xcat-user] Is there an ifcfg-eth postscript that works on systemdOSes?

2016-08-04 Thread Christopher Samuel
On 05/08/16 02:32, Josh Nielsen wrote:

> It looks like that uses the nics table which is currently empty in my
> config. The examples on that page show IPs being entered in
> manually/individually though. How does that relate to the regular
> expressions I've created for each of my hosts in the 'hosts' table that
> automatically assign an IP address based on the hostname?

You can use regular expressions in the nics table as well:

#node,nicips,nichostnamesuffixes,nichostnameprefixes,nictypes,niccustomscripts,nicnetworks,nicaliases,comments,disable
"compute","|\D+(\d+)|ib0!10.2.0.($1*1)|","ib0!-ib",,"ib0!Infiniband",,"ib0!bruce_infiniband",,,

Gives (for example):

[root@bruce-m ~]# lsdef bruce001 | fgrep 10. | fgrep -v kcmdline
ip=10.13.0.1
nicips.ib0=10.2.0.1
otherinterfaces=-bmc:10.12.0.1

[root@bruce-m ~]# lsdef bruce003 | fgrep 10. | fgrep -v kcmdline
ip=10.13.0.3
nicips.ib0=10.2.0.3
otherinterfaces=-bmc:10.12.0.3

All the best,
Chris
-- 
 Christopher SamuelSenior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/  http://twitter.com/vlsci

--
___
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user


Re: [xcat-user] Boot order changed after CentOS install on Lenovo 3550

2016-08-04 Thread Andrew Loftus
It appears that the rsetboot command has a -u option that tells the node to
PXE boot with UEFI support at next boot.  Omitting the option causes the
machine to boot from Legacy PXE.  I am told that the PXE mode will affect
how the OS installs boot elements.

I'm using restboot (without the -u option), which lends explanation to why
the OS started installing differently.

I intend to verify this, but haven't taken the time to do so yet.

On Tue, Aug 2, 2016 at 11:20 AM, Loftus, Andrew J 
wrote:

> Thank you to everyone who has responded.  Every response had helped move
> this issue forward as well as teach me something new.  I want to send an
> update on progress to everyone as well as provide feedback to help future
> user with similar issues.
>
> The link sent by YANG Song was very helpful.
>
> I am now testing on 8 different nodes, which helps ensure I am not dealing
> with a single piece of bad hardware.
>
> A new update in the story background is that the CentOS install is no
> longer creating a /boot/efi partition on the hard disk. I'm not sure why
> this is the case but I suspect it is a change made by a colleague.  (I will
> try to send a follow-up if I find out the cause.)
>
> I verified BootModes.SystemBootMode is UEFI (this appears to be the
> default, I didn't have to set it on any nodes.)
>
> I added "Legacy Only" to the BootOrder.BootOrder.
> After some playing around with different ordering, I am leaving the
> BootOrder as:
> BootOrder.BootOrder=Legacy Only=Hard Disk 0=PXE Network
>
> As Jarrod mentioned, booting from hard disk first avoids all the PXE
> network checks that occur at boot.  To re-install a node, I use rsetboot to
> force a PXE attempt at next boot.
>
> I should reiterate that the OS is no longer installing the EFI boot
> partition.  This is very important because setting "Legacy Only" in the
> BootOrder will cause a machine to not boot IF said machine has an EFI boot
> partition.
>
> At this point, I still have several questions unanswered, but am putting
> these off till I have more time to research and test more as well as learn
> more about EFI.  Unanswered questions are:
> How to make CentOS install (or not) a /boot/efi partition during OS
> install?
>
> When CentOS installs a /boot/efi partition and adjusts the boot order, why
> does the new boot option (named CentOS) fail to boot?  Removing the
> "CentOS" boot option manually allows the machine to boot into the freshly
> installed OS.
>
> Thanks again to everyone!
>
> On Tue, Aug 2, 2016 at 8:07 AM, Jarrod Johnson 
> wrote:
>
>> For what it is worth, I'd say that so long as you have working
>> 'rsetboot', I actually like the 'boot from hard disk first on normal boot'
>> behavior.  It's a touch faster and rsetboot can override.
>>
>>
>>
>> That's my personal opinion on that mode.
>>
>>
>>
>> *From:* Andrew Loftus [mailto:alof...@illinois.edu]
>> *Sent:* Friday, July 29, 2016 4:56 PM
>>
>> *To:* xCAT Users Mailing list
>> *Subject:* Re: [xcat-user] Boot order changed after CentOS install on
>> Lenovo 3550
>>
>>
>>
>> # pasu backup01 show BootOrder
>>
>> backup01: BootOrder.BootOrder=CentOS=PXE Network=Hard Disk 0
>>
>> backup01: BootOrder.WolBootOrder=PXE Network=CD/DVD Rom=Hard Disk 0
>>
>>
>>
>> What's interesting is that the UEFI update is expected behavior, which
>> seems to conflict with the preferred behavior for an xCAT deployed machine
>> is to always boot from PXE first, to allow a re-install when necessary.
>> Otherwise, an extra step is required to force a new installation, namely,
>> rsetboot.
>>
>>
>>
>> Am I correct in my thinking?
>>
>>
>>
>> I'm going to try Arif's suggestion of setting
>>
>> BootModes.SystemBootMode=UEFI Mode
>>
>> and see how that goes.
>>
>>
>>
>> On Fri, Jul 29, 2016 at 3:12 PM, Jarrod Johnson 
>> wrote:
>>
>>
>>
>> Can you do pasu  show BootOrder
>>
>>
>>
>> You could, if you'd like, change the boot order to 'Hard disk 0' with
>> asu/pasu and it should work (centos 7 will work that way, centos 6 will
>> not).
>>
>>
>>
>> I may also like to see asu show all if you can't find hard disk at all.
>>
>> *From:* Andrew Loftus [mailto:alof...@illinois.edu]
>> *Sent:* Friday, July 29, 2016 4:07 PM
>> *To:* xCAT Users Mailing list
>> *Subject:* Re: [xcat-user] Boot order changed after CentOS install on
>> Lenovo 3550
>>
>>
>>
>> Thanks for the information Jarrod!
>>
>>
>>
>> There is no special partitioning and only one "visible" hard drive (there
>> are two physical drives setup in a hardware mirror).
>>
>>
>>
>> I'm relatively new to UEFI systems.  Perhaps if I understand it better I
>> can troubleshoot it better.
>>
>> Where can I learn more about the UEFI install procedure that you
>> mentioned above?
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Jul 29, 2016 at 2:40 PM, Jarrod Johnson 
>> wrote:
>>
>> Just using the normal storage local?  No SAN attached storage or anything?
>>
>>
>>
>> For reference, on install UEFI 

Re: [xcat-user] Is there an ifcfg-eth postscript that works on systemdOSes?

2016-08-04 Thread Josh Nielsen
Thanks Wang,

It looks like that uses the nics table which is currently empty in my
config. The examples on that page show IPs being entered in
manually/individually though. How does that relate to the regular
expressions I've created for each of my hosts in the 'hosts' table that
automatically assign an IP address based on the hostname?

Josh


On Wed, Aug 3, 2016 at 7:06 PM, Xiao Peng Wang  wrote:

> xCAT recommends to use 'confignics' postscripts to achieve that. Refer to
> the doc:
> http://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_network_adapter.html
>
>
> Thanks
> Best Regards
> --
> Wang Xiaopeng (王晓朋)
> IBM China System Technology Laboratory
> Tel: 86-10-82453455
> Email: w...@cn.ibm.com
> Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road,
> Haidian District Beijing P.R.China 100193
>
>
>
> - Original message -
> From: Josh Nielsen 
> To: xCAT Users Mailing list 
> Cc:
> Subject: [xcat-user] Is there an ifcfg-eth postscript that works on
> systemd OSes?
> Date: Thu, Aug 4, 2016 4:24 AM
>
> Hello,
>
> I am now testing the deployment of Centos 7 in my environment and I've
> noticed that the ifcfg-eth postscript is not geared to work with it. For
> starters Centos 7 doesn't install ifconfig by default, though I've solved
> that with my kickstart, but more to the point the postscript explicitly
> looks for "Ethernet" in the ifconfig line to grab the interface name which
> doesn't work on systemd OSes like Centos 7. And of course there's the
> change from "eth" interface names to "ens" and a variety of other names.
>
> I changed the line that looked like this in the postscript:
>
> interfaces=$(ifconfig -a | grep "Ethernet" | awk '{print $1}')
>
> To this:
>
> interfaces=$(ifconfig -a | egrep "Ethernet|ens" | awk '{print $1}')
>
> And while that does parse out the ens interface names now they come with a
> colon tacked on to the end of them in the ifconfig output like this:
> ens160:
> ens192:
>
> I can parse that out with a regex substitution to remove the colon, but
> before I hack the default script up too much has there been an alternative
> ifcfg-eth postscript released for systems like this? I'm using this script
> to change the /etc/sysconfig/network-scripts/ifcfg-* files from using DHCP
> to the static addresses defined through xCAT, which works fine on my Centos
> 6 OSes.
>
> This is my xCAT version:
> lsxcatd -v
> Version 2.11 (git commit 9ea36ca6163392bf9ab684830217f017193815be, built
> Mon Nov 30 05:43:11 EST 2015)
>
> Thanks,
> Josh Nielsen
>
>
>
> --
> ___
> xCAT-user mailing list
> xCAT-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
>
>
>
> --
>
> ___
> xCAT-user mailing list
> xCAT-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
--
___
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user


Re: [xcat-user] Is there an ifcfg-eth postscript that works on systemd OSes?

2016-08-04 Thread Christian Caruthers
Will probably want to include "eno" in your grep statement. Not all Etherned 
devices come up as "ens".  Not sure if there are any other varations.

Regards,
Christian Caruthers
Lenovo xESS IT Consultant
Mobile: 757-289-9872


From: Josh Nielsen [mailto:jniel...@hudsonalpha.org]
Sent: Wednesday, August 03, 2016 5:01 PM
To: xCAT Users Mailing list; Rich Sudlow
Subject: Re: [xcat-user] Is there an ifcfg-eth postscript that works on systemd 
OSes?

Thanks! Yes, I knew ifconfig was deprecated, hence why I knew this was a hack 
and was asking. Is that postscript something you wrote yourself?

Thanks,
Josh

On Wed, Aug 3, 2016 at 3:49 PM, Rich Sudlow > 
wrote:
On 08/03/2016 03:54 PM, Josh Nielsen wrote:
Hello,

I am now testing the deployment of Centos 7 in my environment and I've noticed
that the ifcfg-eth postscript is not geared to work with it. For starters Centos
7 doesn't install ifconfig by default, though I've solved that with my
kickstart, but more to the point the postscript explicitly looks for "Ethernet"
in the ifconfig line to grab the interface name which doesn't work on systemd
OSes like Centos 7. And of course there's the change from "eth" interface names
to "ens" and a variety of other names.

I changed the line that looked like this in the postscript:

interfaces=$(ifconfig -a | grep "Ethernet" | awk '{print $1}')

To this:

interfaces=$(ifconfig -a | egrep "Ethernet|ens" | awk '{print $1}')

And while that does parse out the ens interface names now they come with a colon
tacked on to the end of them in the ifconfig output like this:
ens160:
ens192:

I can parse that out with a regex substitution to remove the colon, but before I
hack the default script up too much has there been an alternative ifcfg-eth
postscript released for systems like this? I'm using this script to change the
/etc/sysconfig/network-scripts/ifcfg-* files from using DHCP to the static
addresses defined through xCAT, which works fine on my Centos 6 OSes.

This is my xCAT version:
lsxcatd -v
Version 2.11 (git commit 9ea36ca6163392bf9ab684830217f017193815be, built Mon Nov
30 05:43:11 EST 2015)

Thanks,
Josh Nielsen

I believe all the latest xcat routines use ip addr 

as you might know the use if ifconfig is deprecated...

here's a snippet from a postscript which uses ksh


if [[ $OSVER = *rhels7* ]]; then
# This just hardcodes the entries which are already set
# Change to grep only on "inet " rather than "inet addr" so that rhels7 works - 
RKS - 8/21/2014
for nic in `ifconfig -a|grep -B1 "inet "|awk '{print $1}'|grep -v inet|grep -v 
-- --|grep -v lo|sed s/:$//`; do
echo "Setting up hardeths on rhels7" >> /root/post.log
   echo NIC $nic
   echo NIC $nic >> /root/post.log
   IPADDR=`ifconfig $nic |grep "inet "|awk '{print $2}' |awk -F: '{print $1}'`
   echo "IPADDR: $IPADDR" >> /root/post.log
   NETMASK=`ifconfig $nic |grep "inet "|awk '{print $4}' |awk -F: '{print $1}'`
   echo "NETMASK: $NETMASK" >> /root/post.log
   sed -i s/BOOTPROTO=dhcp/BOOTPROTO=none/ 
/etc/sysconfig/network-scripts/ifcfg-$nic
   sed -i s/ONBOOT=no/ONBOOT=yes/ /etc/sysconfig/network-scripts/ifcfg-$nic
   echo IPADDR=$IPADDR >> /etc/sysconfig/network-scripts/ifcfg-$nic
   echo NETMASK=$NETMASK >> /etc/sysconfig/network-scripts/ifcfg-$nic
   # Remove firewalld since we're using iptables - RKS 9/30/14
   yum remove -y firewalld | logger -t xcat
   echo "Done with hardeths on rhels7" >> /root/post.log
done

Hope this help you out.






--



___
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user


--
Rich Sudlow
University of Notre Dame
Center for Research Computing - Union Station
506 W. South St
South Bend, In 46601

(574) 631-7258 (office)
(574) 807-1046 (cell)

--
___
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user