Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeset: Unknown group source: "<default>" #441

Open
jehutyy opened this issue Jun 25, 2020 · 6 comments
Open

nodeset: Unknown group source: "<default>" #441

jehutyy opened this issue Jun 25, 2020 · 6 comments

Comments

@jehutyy
Copy link

jehutyy commented Jun 25, 2020

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

@degremont
Copy link
Collaborator

Hello

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

@jehutyy
Copy link
Author

jehutyy commented Jun 30, 2020

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

@degremont
Copy link
Collaborator

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

@jehutyy
Copy link
Author

jehutyy commented Jun 30, 2020

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 :)

@thiell
Copy link
Collaborator

thiell commented Jul 17, 2020

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/.

@jehutyy
Copy link
Author

jehutyy commented Jul 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants