2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 17:02:15 +00:00
Commit Graph

39 Commits

Author SHA1 Message Date
Daniel Hilst 141f5b62ef Merge remote-tracking branch 'upstream/master' into feat/selinux-netboot
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>

# Conflicts:
#	.github/workflows/xcat_test.yml
2026-10-21 16:51:43 -03:00
Daniel Hilst 3d58aefcba fix(xcat-core): a relocated xcatd loads the modules of another installation
xcatd.service sets XCATROOT and PATH to the literal /opt/xcat. The
previous ExecStart sourced xcat.sh, which %post generates from
RPM_INSTALL_PREFIX0, so a relocated package got its own prefix. With the
package installed under /srv/xcat the daemon symlink reaches
/srv/xcat/sbin/xcatd and the Perl search path still names /opt/xcat, so
xcatd cannot load its own modules unless the administrator overrides the
environment or a default installation is left behind.

%post writes /etc/xcat/xcatroot.env with XCATROOT and PATH built from
RPM_INSTALL_PREFIX0, and the unit reads it with EnvironmentFile. The
order is the default in the unit, then that file, then
/etc/sysconfig/xcat, so the recorded prefix replaces the default and the
site file keeps the last word. ExecStart stays a direct call, so the
kernel still enters xcat_t on the xcatd script. %preun removes the file
on erase. The file is not in %files, so rpm --verify is unaffected.

xcatd_relocated_startup.t fails 3 checks of its /srv/xcat subtest
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 16:50:33 -03:00
Vinícius Ferrão 199e4733a7 feat(uftp): add the UFTP transfer listener
Booting nodes need a server that sends a published root image once to
every node that asks for it in a short window.

xcat-uftp-listener accepts HTTP/1.0 GET requests that name an image
path and its digest. It serves only an archive that packimage published
under the configured image roots, for a digest that the checksum file
lists. It keeps the archive open from the first request, so a later
packimage does not change the bytes of a queued batch. It collects the
requests for the same inode, digest and port for batch_delay seconds,
then runs one closed-group uftp session for the batch. Connections,
queued jobs, senders and receivers per job are limited.

The sender gets an argument vector built only from the configuration,
and signs the encrypted session with a persistent server key. It drops a
receiver that misses nearly every block of a section, so one node
without multicast cannot hold the session open. A sender that is not the
UFTP 5 build of xcat-dep is refused.

block_size allows larger packets on jumbo frame networks, up to the
8800-byte limit of uftp.

xCAT::UFTP holds the decisions of the listener: request checks, batches,
limits, timeouts and the runtime check. The script holds the sockets,
the key commands and the sender processes.

The packages install the service but do not enable it. Package removal
stops and disables it.
2026-10-21 11:44:21 -03:00
Daniel Hilst 07b7041011 docs(xcat-core): two comments name the domain xcatd no longer runs in
The unit file and xcatd_service_direct_exec.t said that a direct ExecStart
keeps xcatd out of initrc_t and in unconfined_service_t. The entrypoint of
the xcat_t domain is the xcatd script, so a shell in ExecStart now costs the
domain, not the confinement.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-14 16:55:48 -03:00
Daniel Hilst cdeec6668e fix(xcat-core): xcatd runs in initrc_t under SELinux
xcatd.service started xcatd through /bin/sh to read
/etc/profile.d/xcat.sh. systemd runs the shell in initrc_t, and xcatd
inherited that domain. initrc_t moves rsync, useradd, groupadd, hwclock
and setfiles into confined domains, so an enforcing management node
denies syncfiles, updatenode -F and genimage.

ExecStart now runs /usr/sbin/xcatd directly. systemd starts the bin_t
binary in unconfined_service_t, which has none of these transitions. The
unit sets XCATROOT, PATH and PERL_BADLANG with Environment=, and
/etc/sysconfig/xcat can still override them. RPM and Debian packages ship
the same unit. The SysV script for hosts without systemd still reads the
profile.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-14 16:45:20 -03:00
Vinícius Ferrão 7897f30bfe Modernize xcatd service packaging 2026-05-04 18:13:23 -03:00
Vinícius Ferrão 5aa1cda179 feat: add openSUSE Leap 15 provisioning support 2026-05-02 16:57:46 -03:00
Daniel Hilst Selli 048d82768e doc: Add comments to /etc/init.d/xcatd changes
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-01-26 13:51:07 -03:00
Daniel Hilst Selli bfe52d03a7 fix: Fix build with mock
Add buildrpms.pl to build RPMs in parallel using mock
Add xCAT-buildkit to the build list
Fix build dependency in xCAT-buildkit.spec
Add fallback in /etc/init.d/xcatd for /etc/rc.d/init.d/functions

Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2025-12-05 00:33:47 -03:00
Markus Hilger b588c27005 Fix legacy PIDFile location
Fixes error:
/usr/lib/systemd/system/xcatd.service:8: PIDFile= references a path below legacy directory /var/run/, updating /var/run/xcatd.pid → /run/xcatd.pid; please update the unit file accordingly.
2022-09-30 14:42:14 +02:00
Jarrod Johnson ff37c2fd6a Extend timeout for xcatd
Particularly on service nodes, it takes longer to startup
and systemd needs to be more patient.
2021-05-04 11:56:05 -04:00
GONG Jie bf78ec7317 Remove trailing spaces in file xCAT-server/etc/init.d/xcatd 2017-12-31 23:59:59 +00:00
Bin Xu 57bc7c1f57 Add a default systemd unit file based on the auto-generated one from SysV (#5394)
* Add a default systemd unit file based on the auto-generated one from SysV

* modify the xcatd testcase when using systemd
2018-07-23 17:31:50 +08:00
chenglch af5a4c6670 Only try to kill ssl listener process at first
Previously service xcatd stop or systemctl stop xcatd.service
will send TERM signal to all the processes of xcatd on some
platform which support this feature.

Close-issue: #1008 #537
2016-07-07 23:15:29 -04:00
immarvin 03a5498534 fix issue Ubuntu Xenial: xcat-server needs to depend on openssh-server #1419 ; remove sshd from xcatd sysvinit file 2016-06-29 04:39:19 -04:00
wangxiaopeng d9519b6bd3 issue 1137: waiting longer for stopping xcatd when the system load of xCAT MN is heavy 2016-06-01 03:14:51 -04:00
hu-weihua 62753abcee uniform xcatd service naming, using lowercase 2016-03-25 01:27:09 -04:00
Victor Hu 6cb41ee27b Clean up some formatting issues with xcatd init.d script. 2015-06-04 14:25:39 -04:00
Jarrod Johnson 56556bdeec Fix xCAT init script status reporting
xCAT in some cases was reporting improper status for certain scenarios.
Risk being inaccure if no pid file exists so that it is accurate when it
does exist.
2014-02-07 17:37:56 -05:00
ligc 9e81eccc66 fix for bug 3951: remove the code to check xcat versions during xcatd restart/reload 2014-01-08 23:47:28 +08:00
ligc 66bb1bc712 do not use nodels --version in /etc/init.d/xcatd 2014-01-02 14:39:40 +08:00
xq2005 fb0ad21c3f /var/run is a symlink on /run and that's just a tmpfs, create this directory when xcatd starting
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14472 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-29 06:35:36 +00:00
xq2005 d8b9521d56 reload the xcatd on ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14156 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-10-30 09:26:17 +00:00
xq2005 c3c7e46312 change for ubuntu xcatd start
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14117 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-10-25 08:55:08 +00:00
lissav dfb8898ec2 remove postscripts.rules
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13835 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-09-18 10:48:57 +00:00
daniceexi 451b2e3f2a fix the defect that force to stop xcatd for each restart
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13796 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-09-14 03:14:45 +00:00
ericagar bb376d4928 Fix for defect 3393291: Fix bashisms in /etc/init.d/xcatd
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10310 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-17 19:42:11 +00:00
bp-sawyers 7b6db33399 Fixed more problems in xcatd init.d script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7860 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-10-14 19:55:18 +00:00
bp-sawyers 40ada950dd Fix syntax error in the xcatd init.d script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-10-14 19:07:39 +00:00
jbjohnso 9a70aa89b9 Init script changes for HA and non-stop exceptions on major version change
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7765 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-10-06 15:34:26 +00:00
jbjohnso 46d1dd9af2 -Rework init script to take advantage of 'nonstop' xcat
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6692 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-09 15:17:47 +00:00
bp-sawyers d17ea4a3f5 Cleaned up the output of the service start/stop on linux (because I'm OCD)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4210 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-09-23 14:09:12 +00:00
linggao 749eb124c9 added Required-Stop tag for /etc/init.d/xcatd because SLES 11 checks it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3143 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-04-08 22:38:16 +00:00
mxi1 ef32423408 remove vsftpd from Required-Start for SLES
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3014 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-27 12:59:16 +00:00
mxi1 5f5a95f7bd -bug #2709577 fixed; add Required-Start and Should-Start to xcatd, it's usefull for SLES system
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3010 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-27 07:14:52 +00:00
lissav 31fd3fa0ba add reload option to allow reload of xcatd on service nodes without restarting any services
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2819 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-03-02 15:32:34 +00:00
jbjohnso 6b11a47249 -xCATd init script polish for RH functions
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1776 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-06-26 14:45:51 +00:00
jbjohnso 787c5eb8ff -Change xcatd init script to prefer RH for variants that had poor LSB implementations earlier on
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1754 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-06-24 19:46:23 +00:00
jbjohnso e68fe9d2db -Move xCAT-server and client to not have 2.0 in name for trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-06-03 14:56:33 +00:00