wwclient uses WW_IPADDR, if set, to contact the Warewulf server.
- Closes: #1788 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Added `wwctl overlay import --overwrite` to overwrite existing overlay file.
|
- Added `wwctl overlay import --overwrite` to overwrite existing overlay file.
|
||||||
|
- wwclient uses `WW_IPADDR`, if set, to contact the Warewulf server. #1788
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -193,8 +193,12 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
var finishedInitialSync bool = false
|
var finishedInitialSync bool = false
|
||||||
|
ipaddr := os.Getenv("WW_IPADDR")
|
||||||
|
if ipaddr == "" {
|
||||||
|
ipaddr = conf.Ipaddr
|
||||||
|
}
|
||||||
for {
|
for {
|
||||||
updateSystem(conf.Ipaddr, conf.Warewulf.Port, wwid, tag, localUUID)
|
updateSystem(ipaddr, conf.Warewulf.Port, wwid, tag, localUUID)
|
||||||
if !finishedInitialSync {
|
if !finishedInitialSync {
|
||||||
// ignore error and status here, as this wouldn't change anything
|
// ignore error and status here, as this wouldn't change anything
|
||||||
_, _ = daemon.SdNotify(false, daemon.SdNotifyReady)
|
_, _ = daemon.SdNotify(false, daemon.SdNotifyReady)
|
||||||
|
|||||||
@@ -57,5 +57,6 @@ Filename: warewulf/init.d/80-wwclient
|
|||||||
# Only start if the systemd is not available
|
# Only start if the systemd is not available
|
||||||
test -e /usr/lib/systemd/systemd && exit 0
|
test -e /usr/lib/systemd/systemd && exit 0
|
||||||
echo "Starting wwclient"
|
echo "Starting wwclient"
|
||||||
|
if [ -r /etc/default/wwclient ]; then . /etc/default/wwclient; fi
|
||||||
nohup /warewulf/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
nohup /warewulf/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ After=local-fs.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=notify
|
||||||
|
EnvironmentFile=-/etc/default/wwclient
|
||||||
ExecStart=/warewulf/wwclient
|
ExecStart=/warewulf/wwclient
|
||||||
ExecReload=/bin/kill -s SIGHUP "$MAINPID"
|
ExecReload=/bin/kill -s SIGHUP "$MAINPID"
|
||||||
PIDFile=/var/run/wwclient.pid
|
PIDFile=/var/run/wwclient.pid
|
||||||
|
|||||||
@@ -5,4 +5,5 @@
|
|||||||
# Only start if the systemd is not available
|
# Only start if the systemd is not available
|
||||||
test -e /usr/lib/systemd/systemd && exit 0
|
test -e /usr/lib/systemd/systemd && exit 0
|
||||||
echo "Starting wwclient"
|
echo "Starting wwclient"
|
||||||
|
if [ -r /etc/default/wwclient ]; then . /etc/default/wwclient; fi
|
||||||
nohup {{ .Paths.WWClientdir }}/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
nohup {{ .Paths.WWClientdir }}/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ A node or profile can configure an overlay in two different ways:
|
|||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
wwctl profile set default \
|
wwctl profile set default \
|
||||||
--system-overlays="wwinit,,wwclient,fstab,hostname,ssh.host_keys,systemd.netname,NetworkManager" \
|
--system-overlays="wwinit,wwclient,fstab,hostname,ssh.host_keys,systemd.netname,NetworkManager" \
|
||||||
--runime-overlays="hosts,ssh.authorized_keys"
|
--runime-overlays="hosts,ssh.authorized_keys"
|
||||||
|
|
||||||
Multiple overlays can be applied to a single node, and overlays from multiple
|
Multiple overlays can be applied to a single node, and overlays from multiple
|
||||||
@@ -202,6 +202,10 @@ All configured overlays are provisioned initially along with the node image
|
|||||||
itself; but **wwclient** periodically fetches and applies the runtime overlay to
|
itself; but **wwclient** periodically fetches and applies the runtime overlay to
|
||||||
allow configuration of some settings without a reboot.
|
allow configuration of some settings without a reboot.
|
||||||
|
|
||||||
|
wwclient will contat the ``ipaddr`` value from ``warewulf.conf`` by default.
|
||||||
|
This can be overridden by specifying a ``WW_IPADDR`` environment variable, which
|
||||||
|
can be set via an overlay in ``/etc/default/wwclient``.
|
||||||
|
|
||||||
Network interfaces
|
Network interfaces
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user