juju add-machine stops with chown invalid user syslog

Bug #1989168 reported by Vladkao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Hi,

When adding a machine to juju (ver. 2.9.34-ubuntu-amd64), the command exits with error "invalid user syslog:adm":

Created symlink /etc/systemd/system/multi-user.target.wants/ubuntu-fan.service → /lib/systemd/system/ubuntu-fan.service.
Processing triggers for dbus (1.12.20-2ubuntu4) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 5.15.0-47-generic
NEEDRESTART-KEXP: 5.15.0-47-generic
NEEDRESTART-KSTA: 1
NEEDRESTART-SVC: packagekit.service
NEEDRESTART-SVC: unattended-upgrades.service
chown: invalid user: ‘syslog:adm’
06:55:55 ERROR juju.environs.manual.sshprovisioner provisioner.go:23 provisioning failed, removing machine 1: subprocess encountered error code 1
06:55:55 ERROR juju.environs.manual.sshprovisioner provisioner.go:29 error cleaning up machine: <nil>
06:55:55 DEBUG juju.api monitor.go:35 RPC connection died
06:55:55 DEBUG juju.api monitor.go:35 RPC connection died
ERROR subprocess encountered error code 1
06:55:55 DEBUG cmd supercommand.go:537 error stack:
subprocess encountered error code 1
github.com/juju/juju/cmd/juju/machine.(*addCommand).tryManualProvision:449:

Workaround: add user syslog to the remote machine.

Installation is:

Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Ubuntu server, minimal install.

Tags: jammy juju
Changed in juju:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Yan Tetelepta (shinobicat) wrote :

Ubuntu minimal does not come with rsyslog installed by default thus the user syslog is not created, hence the error.

Please verify if rsyslog is installed on your remote host running ubuntu minimal:

- sudo apt list rsyslog -a
- sudo systemctl status rsyslog

If needed install on your remote host running ubuntu minimal with:

- sudo apt install rsyslog

Now verify again on your remote host running ubuntu minimal with:
- sudo systemctl status rsyslog
- id syslog

I believe we should mark this as invalid.

Revision history for this message
Vladkao (vladkao) wrote :

Thanks for the hints. rsyslog is installed and running:

user@s4:~$ sudo apt list rsyslog -a
Listing... Done
rsyslog/focal-updates,focal-security,now 8.2001.0-1ubuntu1.3 amd64 [installed,automatic]
rsyslog/focal 8.2001.0-1ubuntu1 amd64

user@s4:~$ sudo systemctl status rsyslog
● rsyslog.service - System Logging Service
     Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-05-21 10:49:01 UTC; 26min ago
TriggeredBy: ● syslog.socket
       Docs: man:rsyslogd(8)
             https://www.rsyslog.com/doc/
   Main PID: 130916 (rsyslogd)
      Tasks: 4 (limit: 9406)
     Memory: 1.6M
     CGroup: /system.slice/rsyslog.service
             └─130916 /usr/sbin/rsyslogd -n -iNONE

May 21 10:49:01 s4 systemd[1]: Starting System Logging Service...
May 21 10:49:01 s4 rsyslogd[130916]: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.2001.0]
May 21 10:49:01 s4 rsyslogd[130916]: rsyslogd's groupid changed to 110
May 21 10:49:01 s4 systemd[1]: Started System Logging Service.
May 21 10:49:01 s4 rsyslogd[130916]: rsyslogd's userid changed to 104
May 21 10:49:01 s4 rsyslogd[130916]: [origin software="rsyslogd" swVersion="8.2001.0" x-pid="130916" x-info="https://www.rsyslog.com"] start
user@s4:~$

And after adding the user, as in the initial bug report:

user@s4 ~$ id syslog
uid=104(syslog) gid=110(syslog) groups=110(syslog),4(adm),5(tty)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.