clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

nodeset: Unknown group source: "<default>"

Open jehutyy opened this issue 4 years ago • 6 comments

On a freshly installed centos 7 (container and vm) as well as on a SLES 15 SP1, nodeset -ll returns this :

nodeset: Unknown group source: "<default>"

On centos 7 I tried installing with yum and pip3 and only with pip3 on SLES15 SP1.

clustershell version : 1.8.3 python version : 3.6 pip version : pip 20.1.1

jehutyy avatar Jun 25 '20 07:06 jehutyy

Hello

Could you copy your /etc/clustershell/groups.conf content?

degremont avatar Jun 30 '20 08:06 degremont

Hello, I've installed it from pip so the configuration comes from /usr/local/etc/clustershell, I guess this is the same configuration file. Anyway here it is :

# ClusterShell node groups main configuration file
#
# Please see `man 5 groups.conf` and
# http://clustershell.readthedocs.org/en/latest/config.html#node-groups
# for further details.
#
# NOTE: This is a simple group configuration example file, not a
#       default config file. Please edit it to fit your own needs.
#
[Main]

# Default group source
default: local

# Group source config directory list (space separated, use quotes if needed).
# Examples are provided. Copy them from *.conf.example to *.conf to enable.
#
# $CFGDIR is replaced by the highest priority config directory found.
# Default confdir value enables both system-wide and user configuration.
confdir: /etc/clustershell/groups.conf.d $CFGDIR/groups.conf.d

# New in 1.7, autodir defines a directory list (space separated, use quotes if
# needed) where group data files will be auto-loaded.
# Only *.yaml file are loaded. Copy *.yaml.example files to enable.
# Group data files avoid the need of external calls for static config files.
#
# $CFGDIR is replaced by the highest priority config directory found.
# Default autodir value enables both system-wide and user configuration.
autodir: /etc/clustershell/groups.d $CFGDIR/groups.d

# Sections below also define group sources.
#
# NOTE: /etc/clustershell/groups is deprecated since version 1.7, thus if it
#       doesn't exist, the "local.cfg" file from autodir will be used.
#
# See the documentation for $CFGDIR, $SOURCE, $GROUP and $NODE upcall special
# variables. Please remember that they are substitued before the shell command
# is effectively executed.
#
[local]
# flat file "group: nodeset" based group source using $CFGDIR/groups.d/local.cfg
# with backward support for /etc/clustershell/groups
map: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^$GROUP:\(.*\)/\1/p' $f
all: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^all:\(.*\)/\1/p' $f
list: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^\([0-9A-Za-z_-]*\):.*/\1/p' $f
[root@2218f7da4101 /]# nodeset  -ll
nodeset: Unknown group source: "<default>"
[root@2218f7da4101 /]# cat /usr/local/etc/clustershell/groups.conf
# ClusterShell node groups main configuration file
#
# Please see `man 5 groups.conf` and
# http://clustershell.readthedocs.org/en/latest/config.html#node-groups
# for further details.
#
# NOTE: This is a simple group configuration example file, not a
#       default config file. Please edit it to fit your own needs.
#
[Main]

# Default group source
default: local

# Group source config directory list (space separated, use quotes if needed).
# Examples are provided. Copy them from *.conf.example to *.conf to enable.
#
# $CFGDIR is replaced by the highest priority config directory found.
# Default confdir value enables both system-wide and user configuration.
confdir: /etc/clustershell/groups.conf.d $CFGDIR/groups.conf.d

# New in 1.7, autodir defines a directory list (space separated, use quotes if
# needed) where group data files will be auto-loaded.
# Only *.yaml file are loaded. Copy *.yaml.example files to enable.
# Group data files avoid the need of external calls for static config files.
#
# $CFGDIR is replaced by the highest priority config directory found.
# Default autodir value enables both system-wide and user configuration.
autodir: /etc/clustershell/groups.d $CFGDIR/groups.d

# Sections below also define group sources.
#
# NOTE: /etc/clustershell/groups is deprecated since version 1.7, thus if it
#       doesn't exist, the "local.cfg" file from autodir will be used.
#
# See the documentation for $CFGDIR, $SOURCE, $GROUP and $NODE upcall special
# variables. Please remember that they are substitued before the shell command
# is effectively executed.
#
[local]
# flat file "group: nodeset" based group source using $CFGDIR/groups.d/local.cfg
# with backward support for /etc/clustershell/groups
map: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^$GROUP:\(.*\)/\1/p' $f
all: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^all:\(.*\)/\1/p' $f
list: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^\([0-9A-Za-z_-]*\):.*/\1/p' $f

jehutyy avatar Jun 30 '20 08:06 jehutyy

It could be a side effect of pip install, but you said

On centos 7 I tried installing with yum and pip3

so I wanted to check things are working as expected for the YUM install, at least. This one should work for sure.

For the pip install, could you try:

nodeset --groupsconf=/usr/local/etc/clustershell/groups.conf -ll

and

nodeset -s local --groupsconf=/usr/local/etc/clustershell/groups.conf -ll

degremont avatar Jun 30 '20 08:06 degremont

Yeah indeed I just tested on centos 7 with yum, it works perfectly fine I may have tinkered a little bit too much, my bad... As for pip I tested the two command you provided and it works fine.

As workaround I'll copy content of /usr/local/etc/clustershell into /etc/clusterhell or even do a symlink, it seems to do the trick.

Is there a way to easily fix this behaviour ? Even though the workaround is not too much of a hassle, I would prefer not to link/copy directories around the filesystem.

Thank you very much for your help though :)

jehutyy avatar Jun 30 '20 09:06 jehutyy

Hi @jehutyy,

It looks like pip does not always install in the same location. For a system-wide install as root, could you please try:

pip install --prefix=/ clustershell

This should put the configuration files in /etc/clustershell/.

thiell avatar Jul 17 '20 04:07 thiell

Hi @thiell, I just tested what you proposed and it worked like a charm thank you very much !

jehutyy avatar Jul 17 '20 06:07 jehutyy