AlmaLinux に nodesource から nodejs のリポジトリを追加すると failovermethod=priority が不正な設定値というエラーが出てた
install でも info でも何かの dnf コマンドを実行すると毎回表示される

# dnf install nodejs
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Last metadata expiration check: 0:00:36 ago on Thu Jan 27 03:21:10 2022.
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Installing:
nodejs x86_64 2:16.13.2-1nodesource nodesource 30 M
Installing dependencies:
platform-python-pip noarch 9.0.3-20.el8 baseos 1.7 M
python3-pip noarch 9.0.3-20.el8 appstream 19 k
python3-setuptools noarch 39.2.0-6.el8 baseos 162 k
python36 x86_64 3.6.8-38.module_el8.5.0+2569+5c5719bc appstream 18 k
Enabling module streams:
python36 3.6

Transaction Summary
========================================================================================================================
Install 5 Packages

Total download size: 32 M
Installed size: 92 M
Is this ok [y/N]:


# dnf info nodejs
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Last metadata expiration check: 0:01:03 ago on Thu Jan 27 03:21:10 2022.
Available Packages
Name : nodejs
Epoch : 2
Version : 16.13.2
Release : 1nodesource
Architecture : x86_64
Size : 30 M
Source : nodejs-16.13.2-1nodesource.src.rpm
Repository : nodesource
Summary : JavaScript runtime
URL : http://nodejs.org
License : MIT and ASL 2.0 and ISC and BSD
Description : Node.js is a platform built on Chrome's JavaScript runtime
: for easily building fast, scalable network applications.
: Node.js uses an event-driven, non-blocking I/O model that
: makes it lightweight and efficient, perfect for data-intensive
: real-time applications that run across distributed devices.

dnf では failovermethod オプションは削除されて使えないからみたい
https://bugzilla.redhat.com/show_bug.cgi?id=1961083

設定ファイルはこんな感じなので failovermethod の行を 2 箇所消せばこのエラー表示は消える

# cat /etc/yum.repos.d/nodesource-el8.repo
[nodesource]
name=Node.js Packages for Enterprise Linux 8 - $basearch
baseurl=https://rpm.nodesource.com/pub_16.x/el/8/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL

[nodesource-source]
name=Node.js for Enterprise Linux 8 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_16.x/el/8/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1

リポジトリを追加した手順は nodesource のリポジトリに書かれてる方法
https://github.com/nodesource/distributions#rpm

curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -

サポート対象に CentOS8, RHEL8, AlmaLinux, RockyLinux, Fedora35 などがあるので dnf を対象にしてるはずなのに・・・

探すと issue はあったけどまだ対応されてないみたい
https://github.com/nodesource/distributions/issues/1311

そもそも CentOS8 からは dnf module が使えて リポジトリの追加は必須じゃない
リポジトリ追加してない状態で 「dnf module list nodejs」 の結果

Name                Stream              Profiles                                          Summary
nodejs 10 [d] common [d], development, minimal, s2i Javascript runtime
nodejs 12 common [d], development, minimal, s2i Javascript runtime
nodejs 14 common [d], development, minimal, s2i Javascript runtime
nodejs 16 common [d], development, minimal, s2i Javascript runtime

10~16 までの LTS はどれでも選べる
CentOS7 だとリポジトリ追加が必要だったから移行時に 8 系の AlmaLinux でも追加してたけど こういうこともあるし追加無しで良さそう