<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>50885</bug_id>
          
          <creation_ts>2024-07-12 11:37:14 +0300</creation_ts>
          <short_desc>pcs host auth - cannot load such file -- childprocess (LoadError)</short_desc>
          <delta_ts>2024-08-07 13:36:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p10</product>
          <component>pcs</component>
          <version>не указана</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Oleg Kolesnichenko">kolesnichenko</reporter>
          <assigned_to name="qa-team@altlinux.org">qa-team</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>kolesnichenko</cc>
          
          <qa_contact name="qa-p10@altlinux.org">qa-p10</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>248762</commentid>
    <comment_count>0</comment_count>
    <who name="Oleg Kolesnichenko">kolesnichenko</who>
    <bug_when>2024-07-12 11:37:14 +0300</bug_when>
    <thetext>Альт Сервер 10.1 (обновлённый до 10.2)
$ cat /etc/os-release 
NAME=&quot;ALT Server&quot;
VERSION=&quot;10.2&quot;
ID=altlinux
VERSION_ID=10.2
PRETTY_NAME=&quot;ALT Server 10.2 (Mendelevium)&quot;
ANSI_COLOR=&quot;1;33&quot;
CPE_NAME=&quot;cpe:/o:alt:server:10.2&quot;
BUILD_ID=&quot;ALT Server 10.1&quot;
HOME_URL=&quot;https://basealt.ru/&quot;
BUG_REPORT_URL=&quot;https://bugs.altlinux.org/&quot;

Настройка corosync/pacemaker по инструкции
https://docs.altlinux.org/ru-RU/alt-server/10.2/html/alt-server/ch54s02.html

На этапе аутентификации:
# pcs --debug host auth node01 node02 node03 -u hacluster

Выходит ошибка:
--Debug Stderr Start--
&lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;: cannot load such file -- childprocess (LoadError)
	from &lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;
	from /usr/lib64/pcsd/pcs.rb:4:in `&lt;top (required)&gt;&apos;
	from &lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;
	from &lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;
	from /usr/lib64/pcsd/pcsd-cli-main.rb:7:in `&lt;top (required)&gt;&apos;
	from &lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;
	from &lt;internal:/usr/lib/ruby/rubygems/core_ext/kernel_require.rb&gt;:85:in `require&apos;
	from /usr/lib64/pcsd/pcsd-cli.rb:3:in `&lt;main&gt;&apos;
--Debug Stderr End--

Решается установкой модуля:
# gem install childprocess</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>248857</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2024-07-15 13:21:11 +0300</bug_when>
    <thetext>Не удалось воспроизвести.
Пакет gem-childprocess был установлен автоматически по зависимостям к пакету pcs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>249815</commentid>
    <comment_count>2</comment_count>
    <who name="Oleg Kolesnichenko">kolesnichenko</who>
    <bug_when>2024-08-07 13:34:05 +0300</bug_when>
    <thetext>Проверил на чистой системе:

После установки пакетов childprocess ставится по зависимостям, всё верно.
# apt-get install corosync resource-agents pacemaker pcs

И после установки можно проверить, он видится как модуль:

[root@pcstest ~]# rpm -q gem-childprocess
gem-childprocess-3.0.0-alt1.noarch

[root@pcstest ~]# gem list | grep child
childprocess (3.0.0)

Но модуль ставиться в директорию /usr/lib/ruby/gems/2.5.0/gems
https://packages.altlinux.org/ru/p10/binary/gem-childprocess/noarch/files/2508009460120180155

А в переменной GEM_PATH этой директории нет (есть только /usr/lib/ruby/gems/2.7.0/), в следствии чего, после перезагрузки или перелогина, модуль недоступен.

[root@pcstest ~]# cat /etc/bashrc.d/ruby.sh
export PATH=$PATH:/var/cache/ruby/gemie/bin:/usr/lib/ruby/bin
export GEM_VENDOR=/var/cache/ruby/gemie
export GEM_HOME=/var/cache/ruby/gemie
export GEM_PATH=/var/cache/ruby/gemie:/usr/lib/ruby/gemie:/usr/lib64/ruby/gemie:/usr/lib/ruby/gems/2.7.0/

И соответственно дальнейшая команда не работает:
[root@pcstest ~]# pcs host auth pcstest -u hacluster
Password:
Error: Unable to communicate with pcsd
[root@pcstest ~]#

Модуля нет в списке:

[root@pcstest ~]# gem list | grep child
[root@pcstest ~]#

Если прописать путь /usr/lib/ruby/gems/2.5.0/ в переменную GEM_PATH, то модуль снова виден.

[root@pcstest ~]# grep GEM_PATH /etc/bashrc.d/ruby.sh 
export GEM_PATH=/var/cache/ruby/gemie:/usr/lib/ruby/gemie:/usr/lib64/ruby/gemie:/usr/lib/ruby/gems/2.7.0/:/usr/lib/ruby/gems/2.5.0/

[root@pcstest ~]# gem list | grep child
childprocess (3.0.0)
[root@pcstest ~]#

[root@pcstest ~]# pcs host auth pcstest -u hacluster
Password: 
pcstest: Authorized
[root@pcstest ~]#</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>