2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-29 05:42:17 +00:00
Commit Graph

293 Commits

Author SHA1 Message Date
Vinícius Ferrão be8ce8b975 fix(probe): preserve Debian library directory permissions
The Debian package set the xCAT helper directory to 0644, preventing
unprivileged users from loading the probe modules.

Set library directories to 0755 and regular files to 0644. Repair the old
helper-directory mode during configuration because dpkg preserves existing
modes. Leave administrator overrides, other modes, and symlinks unchanged.
2026-10-14 12:37:33 -03:00
Vinícius Ferrão cce001abb8 refactor(dhcp): share the packet capture lifecycle
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 01:29:22 -03:00
Vinícius Ferrão c3c2351fd9 fix(probe): check the discovery scripts of the upstream loader
An unknown x86 client now fetches its Genesis script from
xcat/ipxe/nets. xcatprobe discovery checked the scripts of each network
under xcat/xnba/nets, and marked the boot loader stage only for a
download from there. It now checks xcat/ipxe/nets, and marks the stage
for a download from either directory.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão fae705d969 fix(probe): recognize the upstream loader download
osdeploy marked a node as loading its boot loader only when it fetched a
file under xcat/xnba, the POWER grub2 image, or yaboot. A node on the
upstream loader fetches xcat/ipxe/..., so osdeploy missed that stage.

Move the match into probe_utils and add xcat/ipxe/.
2026-10-02 23:58:13 -03:00
Vinícius Ferrão 955713c4b2 fix(detect_dhcpd): capture into a private file and stop only its own tcpdump
Both copies wrote the capture to /tmp/dhcpdumpfile.log, so a file left by
another user or an earlier root run blocked the probe and two runs
overwrote each other. tcpdump ran behind a shell, so the script killed it
by searching the process table for any tcpdump on the interface, and a
tcpdump that failed to start left an empty file that read as zero DHCP
servers. An interrupt left the capture running.

The capture file is now a private temporary file removed on every exit.
The child execs tcpdump itself, so the script stops and reaps exactly that
pid, and a tcpdump that ended before the window did fails the run. A
failed send and an INT or TERM stop the capture and exit 1 as well.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-10 03:12:16 -03:00
Vinícius Ferrão 20eef6d224 fix(detect_dhcpd): find tcpdump through PATH
Both copies refused to run unless /usr/sbin/tcpdump existed. Debian and Ubuntu
install it as /usr/bin/tcpdump, so the rogue DHCP detector never ran there and
the probe reported its tcpdump check as failed.

Resolve tcpdump through PATH and the standard system directories with
CommandUtils::find_executable, run the resolved path, and match that path when
the capture process is killed at the end.
2026-09-08 11:43:00 -03:00
Vinícius Ferrão 77c1694b03 refactor(utils): centralize executable lookup 2026-09-02 22:57:05 -03:00
Vinícius Ferrão 33d9ac6eeb refactor(networkutils): rename isIpaddr to isIpv4addr 2026-09-01 11:18:05 -03:00
Vinícius Ferrão b6d9bc6643 refactor(network): reuse shared netmask helpers 2026-08-23 13:50:00 -03:00
Vinícius Ferrão b22a19876a refactor(probe): reuse command capture for netplan 2026-07-22 23:30:45 -03:00
Vinícius Ferrão 6d59e60331 build(xcatprobe): declare listener tool dependency 2026-07-17 14:32:16 -03:00
Vinícius Ferrão 73b9368ff3 fix(xcatprobe): report listener inspection errors 2026-07-17 14:31:01 -03:00
Vinícius Ferrão 888f5360b8 fix(xcatprobe): prefer ss for listener checks 2026-07-16 21:31:08 -03:00
Vinícius Ferrão 701e9e00c0 Fix xcatprobe TFTP check failure with restrictive umask
The is_tftp_ready() function creates test files that inherit the
shell's umask. With umask 027, files get 640 permissions and the
TFTP daemon (running as nobody/tftp) cannot read them, causing a
false negative even when TFTP service is healthy.

Temporarily set umask to 022 during test file creation so files
are world-readable (644), then restore the original umask.

Fixes: https://github.com/xcat2/xcat-core/issues/7487
2026-05-11 13:13:05 -03:00
Vinícius Ferrão 219b0f1f5d Add networkd fallback for netplan static IP probe
Detect static netplan addresses on older Ubuntu netplan releases by falling back to generated systemd-networkd configuration when netplan get is unavailable. Keep netplan get authoritative when supported.

Co-authored-by: karcaw <663031+karcaw@users.noreply.github.com>
2026-05-07 13:46:33 -03:00
Vinícius Ferrão 1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -03:00
Vinícius Ferrão c2a90293ea Address DHCP backend review findings 2026-04-23 18:41:42 -03:00
Vinícius Ferrão 6f3d9bb9d1 Add Kea DHCP backend 2026-04-23 02:01:33 -03:00
Markus Hilger f42011a493 Unify shebang lines 2024-05-07 16:43:07 +02:00
Mark Gurevich 5b5b54c3c3 Eliminate some duplicate output lines from xcatprobe osdeploy 2023-01-12 16:08:31 -05:00
Mark Gurevich 6f12483b79 Prevent rpmbuild from checking and modifying interpreter directives(2) 2022-08-12 08:38:29 -04:00
Mark Gurevich da113964b1 Better file linking for xCAT-probe 2022-06-10 10:46:17 -04:00
Mark Gurevich 47ec9264a1 Better formatting fox xcatprobe output 2022-06-06 10:06:44 -04:00
Mark Gurevich 4a6ccf0ca5 Update docker build containers to CentOS8 (3) 2022-05-13 13:05:11 -04:00
Mark Gurevich 47c02f43f4 Support xcat-core builds on CentOS8 2022-05-12 14:38:12 -04:00
Mark Gurevich 4614bbe515 Detect SLES15 when running detect_dhcpd xcatprobe 2022-03-07 15:17:07 -05:00
Mark Gurevich bc3894e6e1 Missing quote when checking for externaldns in xcatprobe 2021-10-04 12:56:58 -04:00
Mark Gurevich f6a81f14dd Better xcatprobe message when makedhpc -q returns no output 2021-09-27 10:21:58 -04:00
besawn fb036608aa Merge pull request #6953 from gurevichmark/iptables_xcatprobe
Improve xcatprobe check for firewall
2021-04-27 08:04:45 -04:00
Mark Gurevich 28fe1dfaad Improve xcatprobe check for firewall 2021-04-23 14:49:56 -04:00
Mark Gurevich af4507bc31 Make xcatprobe xcatmn recognize default SQLite DB 2021-04-13 16:01:02 -04:00
besawn aa087c98ef Merge pull request #6930 from gurevichmark/xcatprobe
xcatprobe fixes
2021-04-08 14:48:02 -04:00
Mark Gurevich f90883b31f Fixes after review 2021-04-06 13:44:26 -04:00
Mark Gurevich e4619859c0 Use correct Perl string compare operator 2021-04-02 13:13:27 -04:00
Mark Gurevich d1108776cd xcatprobe fixes 2021-03-25 16:02:51 -04:00
Mark Gurevich 272200b3e8 Install xCAT-client before xCAT-probe package 2020-07-27 11:03:25 -04:00
Mark Gurevich 465a4c90dc Add debug to xCAT-probe rpm installation 2020-07-14 15:28:02 -04:00
Mark Gurevich bb09d801df Enable clusterstatus xcatprobe on Perl 5.23 2020-07-08 13:59:33 -04:00
cxhong 42915fefe0 Use option type=A for nslookup 2019-11-13 09:24:57 -05:00
Mark Gurevich a93262d79c Just testing 2019-05-16 14:53:38 -04:00
Mark Gurevich 0aa94b362b Link switchprobe file when building xcatprobe on Ubuntu 2019-05-16 10:27:26 -04:00
Kurt H Maier e8aa0c8599 probe_utils: simplify selinux enforcing check 2019-05-07 14:05:25 -07:00
Kurt H Maier 59f8845d37 probe_utils: remove extraneous else block 2019-05-07 13:52:34 -07:00
Kurt H Maier e8fbb1e8af Merge branch 'master' into refactor-switch-statement 2019-05-07 13:04:19 -07:00
Kurt H Maier f89f611ca9 probe-utils.pm: refactor switch statement
switch() is only available if explicitly declared.  switch to
a for block using elsif to return a value.
2019-05-07 13:01:17 -07:00
xuweibj cf99d8cc97 Merge pull request #6280 from khm/xcatprobe-externaldns
xcatprobe xcatmn:  do not check DNS status on mn if site.externaldns=1
2019-05-06 13:24:31 +08:00
Kurt H Maier 761eb497ca xcatprobe xcatmn: warn on selinux permissive, fail on selinux enforcing 2019-05-01 13:23:53 -07:00
Kurt H Maier 330ada0a34 probe_utils: add check to see if selinux is enforcing (not just enabled) 2019-05-01 13:23:10 -07:00
Kurt H Maier 5f649d7861 xcatprobe xcatmn: do not check DNS status on mn if site.externaldns=1 2019-05-01 12:54:12 -07:00
xuweibj 0bb00bda17 Add DB pkgs check on SN for xcatprobe xcatmn 2019-04-17 04:28:03 -04:00