Merge pull request #1707 from anderbubble/remove-syslog

Remove `warewulf.conf:syslog`
This commit is contained in:
Xu YANG
2025-02-07 12:08:48 +09:00
committed by GitHub
24 changed files with 26 additions and 60 deletions

View File

@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Document defining kernel args that include commas. #1679
- Recommend installing ipmitool with Warewulf package. #970
- Add completion for profile list. #1695
- Add OPTIONS argument for `warewulfd.service`. #1707
### Changed
@@ -41,6 +42,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix log output formatting during overlay build.
- Prevent merging of zero-value net.IP fields. #1710
### Removed
- Remove `warewulf.conf:syslog`. #1606
## v4.6.0rc1, 2025-01-29
### Added

View File

@@ -103,14 +103,6 @@ updated by \fBwwctl-configure(1)\fP.
Default: true
.IP
.TP
\fBsyslog\fP
When true, Warewulf server logs are written to syslog.
Default: false
.IP
.TP
\fBdatastore\fP
@@ -260,7 +252,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
datastore: ""
dhcp:
enabled: true

View File

@@ -5,7 +5,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 10.0.1.1

View File

@@ -9,7 +9,7 @@ Type=exec
EnvironmentFile=-/etc/default/warewulfd
User=root
Group=root
ExecStart=@BINDIR@/wwctl server
ExecStart=@BINDIR@/wwctl server $OPTIONS
ExecReload=/bin/kill -HUP "$MAINPID"
Restart=always

View File

@@ -34,7 +34,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -45,7 +45,6 @@ type WarewulfConf struct {
UpdateInterval int `yaml:"update interval,omitempty" default:"60"`
AutobuildOverlaysP *bool `yaml:"autobuild overlays,omitempty" default:"true"`
EnableHostOverlayP *bool `yaml:"host overlay,omitempty" default:"true"`
SyslogP *bool `yaml:"syslog,omitempty" default:"false"`
GrubBootP *bool `yaml:"grubboot,omitempty" default:"false"`
}
@@ -61,10 +60,6 @@ func (this WarewulfConf) EnableHostOverlay() bool {
return BoolP(this.EnableHostOverlayP)
}
func (this WarewulfConf) Syslog() bool {
return BoolP(this.SyslogP)
}
func (this WarewulfConf) GrubBoot() bool {
return BoolP(this.GrubBootP)
}

View File

@@ -15,7 +15,6 @@ func TestDefaultWarewulfYaml(t *testing.T) {
assert.Equal(t, 60, conf.Warewulf.UpdateInterval)
assert.True(t, conf.Warewulf.AutobuildOverlays())
assert.True(t, conf.Warewulf.EnableHostOverlay())
assert.False(t, conf.Warewulf.Syslog())
assert.True(t, conf.DHCP.Enabled())
assert.Equal(t, "default", conf.DHCP.Template)
@@ -80,7 +79,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 192.168.200.50
@@ -121,7 +119,6 @@ image mounts:
assert.Equal(t, 60, conf.Warewulf.UpdateInterval)
assert.True(t, conf.Warewulf.AutobuildOverlays())
assert.True(t, conf.Warewulf.EnableHostOverlay())
assert.False(t, conf.Warewulf.Syslog())
assert.True(t, conf.DHCP.Enabled())
assert.Equal(t, "192.168.200.50", conf.DHCP.RangeStart)

View File

@@ -106,7 +106,9 @@ func (this *WarewulfConf) Upgrade() (upgraded *config.WarewulfConf) {
upgraded.UpdateInterval = this.UpdateInterval
upgraded.AutobuildOverlaysP = this.AutobuildOverlays
upgraded.EnableHostOverlayP = this.EnableHostOverlay
upgraded.SyslogP = this.Syslog
if this.Syslog != nil {
wwlog.Warn("syslog configuration ignored: all logs now go to stdout/stderr")
}
upgraded.GrubBootP = this.GrubBoot
return upgraded
}

View File

@@ -150,7 +150,6 @@ warewulf:
secure: true
update interval: 60
autobuild overlays: true
syslog: false
dhcp:
enabled: true
template: default
@@ -216,7 +215,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
template: default
@@ -281,7 +279,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 192.168.200.50
@@ -360,7 +357,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 10.0.1.1
@@ -454,7 +450,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 10.0.1.1

View File

@@ -2,7 +2,6 @@ package warewulfd
import (
"fmt"
"log/syslog"
"os"
"os/exec"
"strconv"
@@ -10,7 +9,6 @@ import (
"time"
"github.com/pkg/errors"
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
"github.com/warewulf/warewulf/internal/pkg/util"
"github.com/warewulf/warewulf/internal/pkg/wwlog"
)
@@ -55,22 +53,6 @@ func DaemonInitLogging() error {
wwlog.SetLogLevel(wwlog.INFO)
}
conf := warewulfconf.Get()
if conf.Warewulf.Syslog() {
wwlog.Debug("Changing log output to syslog")
logwriter, err := syslog.New(syslog.LOG_NOTICE, "warewulfd")
if err != nil {
return fmt.Errorf("Could not create syslog writer: %w", err)
}
wwlog.SetLogFormatter(wwlog.DefaultFormatter)
wwlog.SetLogWriter(logwriter)
}
loginit = true
return nil

View File

@@ -83,7 +83,6 @@ data from other structures.
- UpdateInterval: 60
- AutobuildOverlays: true
- EnableHostOverlay: true
- Syslog: false
### Network

View File

@@ -25,7 +25,6 @@ data from other structures.
- UpdateInterval: {{ .Warewulf.UpdateInterval }}
- AutobuildOverlays: {{ .Warewulf.AutobuildOverlays }}
- EnableHostOverlay: {{ .Warewulf.EnableHostOverlay }}
- Syslog: {{ .Warewulf.Syslog }}
### Network

View File

@@ -7,7 +7,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -7,7 +7,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -7,7 +7,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
template: static

View File

@@ -7,7 +7,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -7,7 +7,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -66,7 +66,6 @@ warewulf:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: true
dhcp:
enabled: true
range start: 192.168.0.100

View File

@@ -23,7 +23,6 @@ Warewulf (4.6.0):
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 10.0.1.1
@@ -111,9 +110,6 @@ explained as follows:
configuration. (The host overlay is used to configure the dependent
services.)
* ``warewulf:syslog``: This determines whether Warewulf server logs go
to syslog.
* ``nfs:export paths``: Warewulf can automatically set up these NFS
exports.

View File

@@ -1,6 +1,23 @@
Troubleshooting
===============
warewulfd
---------
The Warewulf server (``warewulfd``) sends logs to the systemd journal.
.. code-block::
journalctl -u warewulfd.service
To increase the verbosity of the log, specify either ``--verbose`` or
``--debug`` in the warewulfd OPTIONS.
.. code-block::
echo "OPTIONS=--debug" >>/etc/default/warewulfd
systemctl restart warewulfd.service
iPXE
----

View File

@@ -199,7 +199,6 @@ Vagrantfile
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 192.168.200.50

View File

@@ -74,7 +74,6 @@ address of your cluster's private network interface:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 192.168.200.50

View File

@@ -67,7 +67,6 @@ address of your cluster's private network interface.
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
datastore: /usr/share
grubboot: false
dhcp:

View File

@@ -55,7 +55,6 @@ address of your cluster's private network interface:
update interval: 60
autobuild overlays: true
host overlay: true
syslog: false
dhcp:
enabled: true
range start: 192.168.200.50