xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
369 stars 172 forks source link

/etc/init.d/xcatd missing the right path for RH9 (xCAT 2.16.5) #7343

Open bermang opened 1 year ago

bermang commented 1 year ago

Hello,

This might be solved already or i missed something (because RH9 install now working nicely, with epel9), but last checked, the right path for rhel9 is still missing on /etc/init.d/xcatd A simple code like the one below should be added. Also, initscripts is needed for this functions file.

elif [ -f /etc/rc.d/init.d/functions ]; then
  #echo RH9
  . /etc/rc.d/init.d/functions
  START_DAEMON=daemon
  STATUS=MStatus
  LOG_SUCCESS=RHSuccess
  LOG_FAILURE=RHFailure
  LOG_WARNING=passed

THX!

gurevichmark commented 1 year ago

@bermang Are you installing devel version of 2.16.5 using go-xcat? The #7323 should install initscripts, and with that existing /etc/init.d/xcatd works for me on RH9.0

bermang commented 1 year ago

Not with go-xcat, just standard install. And i had to add the change. There is no such file in RH9, no? Anyway, i can give it another try and report (next week). THX!

bermang commented 1 year ago

I looked again, i simply do not have the /etc/init.d/functions file in my system. Maybe go-xcat creates that link? Otherwise i do not understand how /etc/init.d/xcatd works.

gurevichmark commented 1 year ago

Latest version of go-xcat installs initscripts, which in turn prereqs chkconfig.

I think chkconfig creates /etc/rc.d/init.d, and links /etc/init.d to it. Then initscripts creates /etc/rc.d/init.d/functions and because of the link above, /etc/init.d/functions is visible.

bermang commented 1 year ago

Apparently initscriptsdo not mandate chkconfig. Not sure how go-xcat does it, but looks like we need either install chkconfigor add the lines above. each way works (although using chkconfigseems outdated :) ). I would add the lines and forget about it for the future as well.

[root@sr1 ~]# rpm -qa | grep initsc
initscripts-service-10.11.5-1.el9.noarch
initscripts-rename-device-10.11.5-1.el9.x86_64
initscripts-10.11.5-1.el9.x86_64
[root@sr1 ~]# rpm -qa | grep check
checkpolicy-3.4-1.el9.x86_64
[root@sr1 ~]# rpm -qa | grep chkconfig
[root@sr1 ~]#
gurevichmark commented 1 year ago

Odd. For me:

[root@vm-1705 yum.repos.d]# rpm --whatrequires -q chkconfig
initscripts-10.11.5-1.el9.x86_64
[root@vm-1705 yum.repos.d]#

And:

[root@vm-1705 yum.repos.d]# yum install initscripts
Updating Subscription Management repositories.

Dependencies resolved.
================================================================================
 Package             Architecture   Version                Repository      Size
================================================================================
Installing:
 initscripts         x86_64         10.11.5-1.el9          baseos         230 k
Installing dependencies:
 chkconfig           x86_64         1.20-2.el9             baseos         180 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 410 k
Installed size: 1.8 M
Is this ok [y/N]:
bermang commented 1 year ago

Indeed strange. i cannot explain it, honestly :) I have it installed (in several systems), did not pull chkconfig.

ocfmatt commented 8 months ago

I'm wondering how much work would be required to migrate away from initscripts and use systemd natively. Systemd has been around long enough now and the lack of initscripts on a core RHEL9 installation clearly signals where this mechanism is going.