2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-29 22:02:20 +00:00
Commit Graph

75 Commits

Author SHA1 Message Date
Daniel Hilst f4108a329e probe 2026-10-23 14:42:43 -03:00
Daniel Hilst 23afd1bae6 fix(xcat-core): a syslog target with a port is bracketed as if it were an IPv6 literal
site.master may carry a port. format_syslog_forward_target in
xCAT/postscripts/syslog bracketed any value containing a colon, so
MASTER=127.0.0.1:1515 rendered the rsyslog line as @[127.0.0.1:1515], which
rsyslog does not accept, and syslog_ng_udp_driver chose udp6 for an IPv4 peer.
format_syslog_server in the dracut_105 rsyslogd-start.sh carries its own copy of
the rule and had the same defect; it runs inside the initramfs and cannot source
the postscript, so the rule is held down twice on purpose.

An IPv4 address or a hostname with a port has exactly one colon and an IPv6
literal has at least two, so the test is now on two colons rather than one. A
value already starting with "[" is left alone whether or not a port follows it,
which the old pattern missed: it required a trailing "]" and so double-bracketed
[2001:db8::1]:514.

ipv6_syslog_forwarding.bats gains four cases. Without the fix, "a target with a
port is not mistaken for an IPv6 literal", "an already-bracketed target with a
port is left alone" and "the initrd launcher does not mistake a port for an IPv6
literal" all fail; the compressed-literal case passes either way and is there to
show the bracketing of ::1 did not regress.

Also: grub2_ipv6.t could not load grub2.pm once xcat-core/#7980 made it use
xCAT::DHCP::BootPolicy, which lives in perl-xCAT. The file died at compile time
and reported no plan at all, which in a prove summary reads as a count
discrepancy rather than a failure. It now puts perl-xCAT and the server perl
directory on @INC, as every other plugin test does.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-23 10:38:37 -03:00
Vinícius Ferrão 60beaecead fix(syslog): create the local log directory before setting its owner
Create missing Debian-family log directories before assigning their owner.
Use mode 0750 for syslog-owned directories. In the legacy reference-owner
path, copy the parent directory mode so group-writing daemons retain access.
Preserve existing directory modes, log files and forwarding policy.

Stop with an error before restarting syslog if the directory cannot be
created. Keep existing ownership-command failures nonfatal.
2026-10-22 15:01:47 -03:00
Vinícius Ferrão 3928c04507 feat(ipv6): add EL10 IPv6-only provisioning support
An IPv6-only provisioning network cannot deploy a node. The discovery and
credential callbacks open IPv4 sockets, the kickstart and boot templates
render an IPv4 address into every endpoint, and makehosts drops an IPv6
value because hosts.pm gates on isIpv4addr.

NetworkUtils gains the address helpers the rest of the change uses:
format_host_port, parse_host_port and format_uri_host bracket an IPv6
literal, getNodeNetworkCfg6 reads the static IPv6 configuration of a node,
my_ip_facing_family selects the management-node address of one family,
getIPv6ReverseZone builds a nibble-aligned reverse zone, and
node_is_ipv6_only and ipv6_server_for_node answer the two questions the
plugins used to answer for themselves. credentials.pm opens the callback
socket through IO::Socket::INET6 when the modules are present and keeps the
IPv4 path when they are not. Template.pm and anaconda.pm render an IPv6
kickstart network line and bracketed endpoints. The postscripts and the
stateless xcatroot format every endpoint through the bracketing helpers.

xCAT-server requires perl-IO-Socket-INET6 and perl-Socket6 on EL, and
libio-socket-inet6-perl and libsocket6-perl on Debian.

(cherry picked from commits c0a69bb5a and caa8ca790)
Ported onto upstream master ee6b4f532. The two commits are folded because the
second refactors the first. Master is kept where it has a newer form of the
same thing: the getipaddr cache guard, the Kea control_socket_path helper, the
netboot method list, install_device_params, the modern_installer test and the
isValidIp validator, which replaces the isValidIPAddress this branch added.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 18:59:05 -03:00
Vinícius Ferrão 29ff3ab3f2 fix(syslog): guard expanded configuration cleanup 2026-09-25 01:29:34 -03:00
Vinícius Ferrão 263239e988 feat(openeuler): configure logging and SSH host keys 2026-09-15 00:33:39 -03:00
Mark Gurevich 71d3b76881 Check SUSE-brand file on SLES 2022-08-15 10:16:22 -04:00
Mark Gurevich 9e7d11e221 Prevent comment character removal from /etc/rsyslog.conf 2022-04-19 14:30:32 -04:00
Mark Gurevich 67aa8a23ea syslog postscript check for config files 2021-11-17 11:22:12 -05:00
cxhong c29d7cafea parse the rsyslog version 2020-07-21 17:01:36 -04:00
cxhong 142c6d6492 support syslog for sle15 2020-01-16 16:32:38 -05:00
Gᴏɴɢ Jie aafa9287d6 Fix rsyslog.conf syntax error on RHEL 8 (#5950) 2019-01-28 16:18:16 +08:00
Yuan Bai e7176d7093 log tag support for common scripts (#5743)
* log tag support for common scripts

* enhancements

* typo fixed
2018-10-30 16:57:39 +08:00
GONG Jie 6df5d9b648 Remove trailing spaces in file xCAT/postscripts/syslog 2017-12-31 23:59:59 +00:00
Sebastian Thorarensen fc58a8e872 Do not comment out rsyslog /var/log/messages on MN (#4527)
Since commit 1219fdd23f, the rsyslog rule
"*.debug /var/log/messages" is no longer added to rsyslog.conf on the
MN. However, any rule ending with "/var/log/messages" is still commented
out. This leads to xCAT removing all output to /var/log/messages, except
for the daemon and ftp facilities that are enabled by
/etc/rsyslog.d/xcat-debug.conf!

This commit
 - stops commenting out rules ending with "/var/log/messages" in
   rsyslog.conf
 - stops adding adding the comment "#*.debug /var/log/messages" to
   rsyslog.conf
 - changes "daemon.debug" to "daemon.=debug" in xcat-debug.conf to avoid
   duplicate daemon log lines with most Linux distributions' default
   rsyslog.conf.

The 'ftp.* rule in xcat-debug.conf is possibly no longer needed, and
will lead to duplicate ftp messages with most distributions, but it is
left untouched in this commit.
2018-01-10 21:00:59 -06:00
yangsong a183e3b8f2 support local syslog:1)ship logrotate and log filter rule files in xCATsn;2)refine syslog script to enable log filter and rotate rules (#3921) 2017-09-15 16:03:43 +08:00
immarvin a58e9b4f2e fix issue [FVT] Failed to generate computes.log in rhels7.4GA #3561 2017-07-31 04:21:08 -04:00
Casandra Qiu bc913e0464 checking if /etc/os-release/ file is existed 2017-03-10 15:54:32 -05:00
immarvin 17e382f5a0 support cumulus os in syslog postscript 2017-01-10 00:51:04 -05:00
WangXiaoPeng d1e63367f5 issue 1245, add the missing $ in the regular expression 2016-07-05 22:58:01 -04:00
Mark Gurevich 4646631416 Remove old version xCAT settings from rsyslog.conf file 2016-07-01 11:17:38 -04:00
Mark Gurevich 8d0bc5dee8 Give user info about replacement of entries 2016-06-09 13:11:29 -04:00
Mark Gurevich 6c4668840b Remove only xCAT entries from rsyslog.conf file 2016-06-08 16:05:51 -04:00
immarvin de21a76fdb fix issue#1159@github,add support for udp/tcp syslog reception for rsyslog shipped in ubuntu16.04 2016-05-20 02:14:37 -04:00
penguhyang 8f765ced7e correct the logs can't be forward the mn 2016-05-05 01:52:13 -04:00
XuWei ee67e2eafd Add node attribute 'syslog', avoid the syslog configuration for certain node 2016-03-25 03:53:55 -04:00
GONG Jie c4367da51e Dirty hack, fix the permission of direcotry /var/log/xcat 2015-11-23 14:40:51 +08:00
GONG Jie 1219fdd23f Avoid the original rsyslog.conf changing. Since xCAT has new rsyslog strategy. 2015-11-06 14:25:25 +08:00
immarvin a4e502c1ec listen on tcp port to enable receiving the xcat debug logs forwarded via tcp protocol;comment out the rules which will write logs to /var/log/messages to prevent duplicate logs after script is run;correct the code logic in config_rsyslog_V8 enable the log receiving and forwarding 2015-09-28 22:34:57 -04:00
GONG Jie ca4437270a Fix sourceforge bug #4691 Use a consistent log tag for xCAT log 2015-07-01 18:03:36 +08:00
immarvin ec80327962 turn on tcp syslog reception to receive syslog from anaconda 2015-06-17 10:07:39 -04:00
ligc 22cb84d357 fix for bug 4478: setup syslog v8 on MN to receive syslog entries from remote hosts 2015-04-21 04:52:21 -04:00
ligc a7ee19d740 fix for bug 4448: check rsyslogd existence before running rsyslogd 2015-01-19 14:22:49 +08:00
ligc 1e83fdea72 rsyslog configuration on Ubuntu, the file ownership of /var/log/messages should be syslog:adm 2015-01-08 16:23:29 +08:00
Casandra Qiu 28d2110a5e fix bug#4366 change /bin/sh to /bin/bash 2014-11-19 09:42:19 -05:00
lissav be7dea96d5 add setup of MN/SN SLES12/rsyslog 8 support defect 4311 2014-10-23 09:20:13 -04:00
lissav 75f15ce9b7 SLES12/rsyslog 8 support defect 4311 2014-10-22 07:42:42 -04:00
immarvin 8b362709b4 fix defect #4233 syslog changes give syntax error on AIX 2014-07-22 23:20:03 -07:00
immarvin f7b9a9a40b replace the service/chkconfig related stuff with newly added subroutine in xCAT::Utils 2014-06-10 08:56:11 -07:00
immarvin adb04f1651 fedora19/fedora20 diskful support 2014-01-02 23:52:13 -08:00
immarvin bd36de6f1b fix syntax error if is blank 2013-12-19 04:27:16 -08:00
immarvin 01e0c1c6f5 fix defect #3599 syslog-ng is shutting down in sles xCAT MN Edit, enable the settings that will log to local files in syslog-ng
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16457 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-05-29 12:14:13 +00:00
xq2005 e1da3e4124 rsyslog support on debian
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14773 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2013-01-07 07:35:23 +00:00
linggao a886000855 fixed a problem that still logs to localhost for syslog-ng
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13147 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-06-21 20:05:22 +00:00
immarvin 7bf6ed963a fix defect :change all logger calls to put xcat msgs into local4 - ID: 3513525
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12687 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-15 03:41:53 +00:00
immarvin 1a90296659 fixed defect ID: 3509605 xcatconfig will not setup syslog for xCAT on linux
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12252 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-17 13:01:34 +00:00
arifali 5006b9db5f fix rsyslog for ubuntu on MN, and don't need to do it in posinst
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12247 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-16 19:40:18 +00:00
ligc 5b0b967a30 fix for bug 3495915: env var SVLOCAL might be empty
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11720 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-01 09:03:55 +00:00
ericagar cede69d8d7 Fix for defect 3419745: Fix Method to Determine if System is Ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10710 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-06 17:45:08 +00:00
otubo e4e977649f Adding support for Ubuntu on syslog script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10665 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-28 19:14:42 +00:00