Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

2021-06-18 Thread Vinícius Ferrão via xCAT-user
It wont hurt to sync /etc/resolv.conf. Great idea. Will do it.

On 18 Jun 2021, at 05:26, Jon Diprose 
mailto:j...@well.ox.ac.uk>> wrote:

Sorry, I should have also said that I have /etc/resolv.conf on my syncfiles 
list, so all that setup was to try to get xcat to give me ifcfg files that 
looked as I wanted, and particularly not to be left with an unexpected dhcp-ing 
interface that caused my resolv.conf to be eaten every time the lease renewed. 
I didn't want to meddle with xCAT-provided code more than necessary and I 
wanted to try to keep as much config as possible in the node definition. I 
started off down the track of maybe if I can get anaconda to use the bond as 
the install nic it will all be OK, and that's how I ended up where I did.
Someone else suggested you use the mkresolvconf postscript to provide the 
resolv.conf, which should also work.
Jon

--
Dr. Jonathan Diprose mailto:j...@well.ox.ac.uk>>
 Tel: 01865 287873
Research Computing Manager
Henry Wellcome Building for Genomic Medicine
Roosevelt Drive, Headington, Oxford OX3 7BN

From: Vinícius Ferrão 
[fer...@versatushpc.com.br]
Sent: 18 June 2021 06:35
To: Jon Diprose
Cc: xCAT Users Mailing list
Subject: Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

Jon thank you man.

I'm looking at the code right now and trying to understand it.

On 17 Jun 2021, at 13:27, Jon Diprose 
mailto:j...@well.ox.ac.uk>> wrote:

Hi Vinícius,
I've dumped the various parts I think are necessary in the following gist:

https://gist.github.com/JDiprose/f377a97998a971bbe1e591e5afd4e1c6

See particularly the 'installnic' and 'addkcmdline' node settings, and the 
referenced 'confignetwork-jon' postbootscript (small but significant addition 
to the original 'confignetwork') and the locally-written 
rescomp_persistinstallbond postscript. Modifications to the kickstart template 
are also required - see 
compute.centos74.no-ignoredisk.net-link.tmpl,
 referenced by the osimage.
If I remember correctly, all the important bits for installing on a bond are 
above (execpt the switch config, for which forcing up the pxe link is 
required). The 'addkcmdline' setting configures the bond for anaconda to use, 
the 'network --device=link' in the template tells anaconda to use it, the 
'rescomp_persistinstallbond' replaces the junk anaconda produces with a good 
approximation of what xCAT ought to do and the 'installnic' setting and 
modification to 'confignetwork' stops the 'confignetwork' script from 
destroying the config when run as a postbootscript to configure the secondary 
nics (it otherwise doesn't accept that a nic called bondX can be the install 
nic).
I haven't tested that the modified 'confignetwork' is capable of configuring 
the install nic as a bond in its own right. I don't expect that to work and I 
don't think xCAT has anywhere to hold the relevant config without a significant 
rewrite of 'confignetwork'.
This is obviously for a stateful install. I couldn't tell you anything about 
stateless or statelite.
Finally, apologies to all those whose work I have reused without reference in 
the above - I wasn't expecting to be sharing it. I am happy to answer questions 
on it, and especially to be told better ways to do it!
Jon

--
Dr. Jonathan Diprose mailto:j...@well.ox.ac.uk>>
 Tel: 01865 287873
Research Computing Manager
Henry Wellcome Building for Genomic Medicine
Roosevelt Drive, Headington, Oxford OX3 7BN

From: Vinícius Ferrão 
[fer...@versatushpc.com.br]
Sent: 17 June 2021 07:13
To: Jon Diprose
Cc: xCAT Users Mailing list
Subject: Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

Hi Jon, thanks for your time.

You're absolutely correct regarding the network configuration. The node boots 
up with PXE from a single network card and them it creates the LACP bond. On 
the switch side that was achieved with LACP fallback. So yes, ip and 
nicips.bond0 are the same. It's the single interface that is later on bonded.

Regarding NetworkManager, I thought xCAT was using it to configure it's 
network. So there's a way to disable it?

Finally, the networkconfig script works if I add it to the postbootscripts 
section instead of postscripts. In the later I end up with the server without 
any network. Console login is unavaible because root password does not work 
either, so I can't check what happened. Don't know why.

Anyway, here's the files:

Bondies first:
[root@login ~]# cat /etc/sysconfig/network-scripts/ifcfg-xcat-bond-bond0
BONDING_OPTS="mode=802.3ad miimon=100"
TYPE=Bond
BONDING_MASTER=yes
HWADDR=
MTU=1500
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=172.26.255.253
PREFIX=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy

Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

2021-06-18 Thread Jon Diprose
Sorry, I should have also said that I have /etc/resolv.conf on my syncfiles 
list, so all that setup was to try to get xcat to give me ifcfg files that 
looked as I wanted, and particularly not to be left with an unexpected dhcp-ing 
interface that caused my resolv.conf to be eaten every time the lease renewed. 
I didn't want to meddle with xCAT-provided code more than necessary and I 
wanted to try to keep as much config as possible in the node definition. I 
started off down the track of maybe if I can get anaconda to use the bond as 
the install nic it will all be OK, and that's how I ended up where I did.
Someone else suggested you use the mkresolvconf postscript to provide the 
resolv.conf, which should also work.
Jon

--
Dr. Jonathan Diprose mailto:j...@well.ox.ac.uk>>
 Tel: 01865 287873
Research Computing Manager
Henry Wellcome Building for Genomic Medicine
Roosevelt Drive, Headington, Oxford OX3 7BN

From: Vinícius Ferrão [fer...@versatushpc.com.br]
Sent: 18 June 2021 06:35
To: Jon Diprose
Cc: xCAT Users Mailing list
Subject: Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

Jon thank you man.

I'm looking at the code right now and trying to understand it.

On 17 Jun 2021, at 13:27, Jon Diprose 
mailto:j...@well.ox.ac.uk>> wrote:

Hi Vinícius,
I've dumped the various parts I think are necessary in the following gist:

https://gist.github.com/JDiprose/f377a97998a971bbe1e591e5afd4e1c6

See particularly the 'installnic' and 'addkcmdline' node settings, and the 
referenced 'confignetwork-jon' postbootscript (small but significant addition 
to the original 'confignetwork') and the locally-written 
rescomp_persistinstallbond postscript. Modifications to the kickstart template 
are also required - see 
compute.centos74.no-ignoredisk.net-link.tmpl,
 referenced by the osimage.
If I remember correctly, all the important bits for installing on a bond are 
above (execpt the switch config, for which forcing up the pxe link is 
required). The 'addkcmdline' setting configures the bond for anaconda to use, 
the 'network --device=link' in the template tells anaconda to use it, the 
'rescomp_persistinstallbond' replaces the junk anaconda produces with a good 
approximation of what xCAT ought to do and the 'installnic' setting and 
modification to 'confignetwork' stops the 'confignetwork' script from 
destroying the config when run as a postbootscript to configure the secondary 
nics (it otherwise doesn't accept that a nic called bondX can be the install 
nic).
I haven't tested that the modified 'confignetwork' is capable of configuring 
the install nic as a bond in its own right. I don't expect that to work and I 
don't think xCAT has anywhere to hold the relevant config without a significant 
rewrite of 'confignetwork'.
This is obviously for a stateful install. I couldn't tell you anything about 
stateless or statelite.
Finally, apologies to all those whose work I have reused without reference in 
the above - I wasn't expecting to be sharing it. I am happy to answer questions 
on it, and especially to be told better ways to do it!
Jon

--
Dr. Jonathan Diprose mailto:j...@well.ox.ac.uk>>
 Tel: 01865 287873
Research Computing Manager
Henry Wellcome Building for Genomic Medicine
Roosevelt Drive, Headington, Oxford OX3 7BN

From: Vinícius Ferrão 
[fer...@versatushpc.com.br]
Sent: 17 June 2021 07:13
To: Jon Diprose
Cc: xCAT Users Mailing list
Subject: Re: [xcat-user] /etc/resolv.conf missing nameserver on install nodes

Hi Jon, thanks for your time.

You're absolutely correct regarding the network configuration. The node boots 
up with PXE from a single network card and them it creates the LACP bond. On 
the switch side that was achieved with LACP fallback. So yes, ip and 
nicips.bond0 are the same. It's the single interface that is later on bonded.

Regarding NetworkManager, I thought xCAT was using it to configure it's 
network. So there's a way to disable it?

Finally, the networkconfig script works if I add it to the postbootscripts 
section instead of postscripts. In the later I end up with the server without 
any network. Console login is unavaible because root password does not work 
either, so I can't check what happened. Don't know why.

Anyway, here's the files:

Bondies first:
[root@login ~]# cat /etc/sysconfig/network-scripts/ifcfg-xcat-bond-bond0
BONDING_OPTS="mode=802.3ad miimon=100"
TYPE=Bond
BONDING_MASTER=yes
HWADDR=
MTU=1500
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPADDR=172.26.255.253
PREFIX=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=xcat-bond-bond0
UUID=c7b9cbeb-2966-4e41-88a5-be212ca4b675
DEVICE=bond0
ONBOOT=yes
AUTOCONNECT_PRIORITY=9
AUTOCONNECT_RETRIES=0
AUTOCONNECT_SLAVES=yes

[root@login ~]# cat