Re: [xcat-user] Is there an ifcfg-eth postscript that works on systemdOSes?
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 ThanksBest Regards--Wang Xiaopeng (王晓朋)IBM China System Technology LaboratoryTel: 86-10-82453455Email: w...@cn.ibm.comAddress: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road, Haidian District Beijing P.R.China 100193 - Original message -From: Josh NielsenTo: 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 listxCAT-user@lists.sourceforge.nethttps://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] : KVM storage question
We do run VMs with multiple disks, sometimes, it depends on application needs. We have not seen, upon creating a new profile for a guest using "nodeadd" and adding a single hard disk, the issue only came when, in the process of provisioning, if the server application type dictates a second hard disk for data (done post firstboot via chef or legacy scripting), or if and existing VM needed a second (or third) disk added to the profile. To keep our build process simple and manage just a few osimages, we install with only one hard disk on VM. Once we have OS installed and VM speaking to our entire configuration server set, that is when any secondary disks would be added. Normally we use chdef for this. for instance, if we do a chdef vmstorage="disk1|disk2" and node is power cycled for legacy scsi disks, or inadvertently powered for virtio disks, we get the ide error if I don't comment out hte cdrom info on kvm.pm It occurs on any add of a disk and reread of a non cached profile, e.g. not in kvm_nodedata, which was required for the old style scsi disks on VMs and that I still have in parts of my clusters. However, if for some reason a vititio allocation gets uncached it gives same error when we try to rpower on, unless we edit the xml entry in kvm_nodedata or change it back to a single disk and hot add the other storage. Backend storage types also doesn't seem to matter, whether we are using a file based disk image in local or SAN or a LV device, if we go past one disk, this pops up. _ Douglas Myers, IBM Special Events - Smart Cloud BMS Lead _ "It's not an opportunity if it doesn't scare you a little bit" From: Mark Gurevich/Poughkeepsie/IBM To: Douglas MyersCc: xCAT Users Mailing list , Xiao Peng Wang/China/IBM@IBMCN, Victor Hu/Poughkeepsie/IBM@IBMUS Date: 08/03/2016 07:17 AM Subject:Re: [xcat-user] : KVM storage question Douglas, Xiaopeng asked me to look into this problem. Is your goal to be able to run mkvm to create a VM with multiple image files as disks ? Have you looked into chvm -a option ? Mark Gurevich Poughkeepsie Development Lab HPC Software Development - xCAT "If we knew what it was we were doing, it would not be called research, would it?" --Albert Einstein From: Douglas Myers/Schaumburg/IBM@IBMUS To: "xCAT Users Mailing list" Date: 07/27/2016 04:38 PM Subject:Re: [xcat-user] : KVM storage question Bringing this up again, now that I have upgraded to 2.12.1 on the MN. We've hit this off and on ever since, but with 2.12 it seems to occur whenever there's a removal from kvm_nodedata cache of a node def and try to rpower on: # rpower w30234 on w30234: Error: internal error Only 1 ide controller is supported We would get this error if we had more than one hard disk, virtio or scsi, defined on a client node profile. There was a hint in RH bug https://bugzilla.redhat.com/show_bug.cgi?id=1136182 Using that idediscussion as a basis, I removed the creation of virtual cdrom from /opt/xcat/lib/perl/xCAT_plugin/kvm.pm : #} else { #give the VM an empty optical drive, to allow chvm live attach/remove # my $cdhash; # $cdhash->{device} = 'cdrom'; # $cdhash->{type} = 'file'; # $cdhash->{readonly}; # $cdhash->{target}->{dev} = $cdprefix . $suffixes[$suffidx]; # push @returns, $cdhash; And restarted xCAT. We no longer get the ide error, but is defintiely a hack we can't maintain easily. We don't normally need the cdrom so not having it is not harmful to us, but kvm.pm will be clobbered on next upgrade. MN x86_64 SLES11 xCAT 2.12.1 Hypervisor x86_64 SLES11 _ Douglas Myers, IBM Special Events - Smart Cloud BMS Lead _ "It's not an opportunity if it doesn't scare you a little bit" Inactive hide details for Douglas Myers---08/19/2015 08:32:25 AM---Anything further on this? Douglas Myers---08/19/2015 08:32:25 AM---Anything further on this? _ From: Douglas Myers/Schaumburg/IBM To: "xCAT Users Mailing list" Date: 08/19/2015 08:32 AM Subject: Fw: [xcat-user] KVM storage question Anything further on this? _ Douglas Myers, IBM Special Events - Smart Cloud BMS Lead _ "It's not an opportunity if it doesn't scare you a little bit" - Forwarded by Douglas Myers/Schaumburg/IBM on 08/19/2015 08:31 AM - From: Douglas Myers/Schaumburg/IBM
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 Sudlowwrote: > 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
[xcat-user] Is there an ifcfg-eth postscript that works on systemd OSes?
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