xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
360 stars 171 forks source link

Is it possible to change NFS mount options for the root directory of a statelite image? #6495

Open asdorsey opened 4 years ago

asdorsey commented 4 years ago

I would like to change the attribute caching options on the root directory of one of our statelite images to attempt to find a workaround for some load-related slowdowns we're seeing.

However, I can't find a way to append additional NFS mount options or change the existing ones that are generated for the node in the files in /tftpboot/xcat/xnba/nodes/.

[root@j1x1 xcat]# grep nfs /tftpboot/xcat/xnba/nodes/jfe01
imgargs kernel root=nfs:10.187.1.150:/install/netboot/centos7-statelite/x86_64/login-20191015/rootimg:ro STATEMNT=10.187.1.150:/install/litetree/login XCAT=10.187.1.150:3001 NODE=jfe01 XCATHTTPPORT=80  console=tty0 console=ttyS0,115200n8r MNTOPTS= BOOTIF=01-${netX/machyp}

Is there a supported method to change or append additional parameters at the end of the root= argument? I've seen the mntopts field in the statelite table, but that appears to be for persistent statelite file directories, not the image's root directory.

cxhong commented 4 years ago

maybe you can try chdef nodename addkcmline=xxxxx, then run nodeset again.

asdorsey commented 4 years ago

Unfortunately, that doesn't seem to have had the desired effect.

[root@j1x1 ~]# chdef jfe01 addkcmdline="ac,actimeo=30"
1 object definitions have been created or modified.
[root@j1x1 ~]# nodeset jfe01 osimage=centos7-statelite-login-20191015
jfe01: statelite centos7.6-x86_64-compute
[root@j1x1 ~]# grep nfs /tftpboot/xcat/xnba/nodes/jfe01
imgargs kernel root=nfs:10.187.1.150:/install/netboot/centos7-statelite/x86_64/login-20191015/rootimg:ro STATEMNT=10.187.1.150:/install/litetree/login XCAT=10.187.1.150:3001 NODE=jfe01 XCATHTTPPORT=80  console=tty0 console=ttyS0,115200n8r MNTOPTS= ac,actimeo=30  BOOTIF=01-${netX/machyp}

Note that the ac,actimeo=30 options were added after MNTOPTS= instead of after the root= parameter.

I'm pretty sure that I'm looking for a way to get that root= parameter to look like this:

root=nfs:10.187.1.150:/install/netboot/centos7-statelite/x86_64/login-20191015/rootimg:ro,ac,actimeo=30
cxhong commented 4 years ago

you are correct, the MNTOPTS is per node based, you can set it up at statelite table, check this link: https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.html

If you want to do osimage based, you may need to change the code, the first kcmdline is hard coded.

$ git grep rootimg:ro
xCAT-server/lib/xcat/plugins/anaconda.pm:                    $kcmdline = "root=nfs:$nfssrv:$nfsdir/rootimg:ro STATEMNT=";
xCAT-server/lib/xcat/plugins/debian.pm:                    $kcmdline = "root=nfs:$nfssrv:$nfsdir/rootimg:ro STATEMNT=";
xCAT-server/lib/xcat/plugins/sles.pm:                    $kcmdline = "root=nfs:$nfssrv:$nfsdir/rootimg:ro STATEMNT=";

so for your centos image, you need to change anaconda.pm.

asdorsey commented 4 years ago

That's what I was afraid of. Thanks for the confirmation - at least it's fairly trivial to edit that file.

I don't know what level of work is involved in adding something like this, but it would be nice if those options were configurable at the node, osimage and/or site level.