The worker-id generation at boot, as done in commit
3639aac31f ("MINOR:
config: add a "worker-id" global keyword to identify the worker"), would
escape the file-less mode that is used with haterm and haload. There's
nothing dramatic in this, but it may end up being surprising with certain
corner-case configs that would want to exploit it (logging, header
contents etc), so better set it now for consistency between any worker
mode.
It was visible by running haterm:
$ ./haterm -L :8000 -G "stats socket /tmp/sock1 level admin"
and issuing:
$ socat - /tmp/sock1 <<< "show info"
which didn't show the Worker_id line before the fix. No backport is
needed.
}
last_defproxy = NULL; /* This variable is not used after parsing. */
+ /* In fileless mode (haterm, haload, ...) it's the only place where
+ * we'll be able to initialize the worker id.
+ */
+ if (!master)
+ init_worker_id();
+
if (global.tune.options & GTUNE_PURGE_DEFAULTS) {
/* destroy unreferenced defaults proxies */
defaults_px_destroy_all_unref();