canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
3k stars 884 forks source link

Log information on ubuntu login screen #3878

Open ubuntu-server-builder opened 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1929802

Launchpad details
affected_projects = ['ubuntu']
assignee = None
assignee_name = None
date_closed = None
date_created = 2021-05-27T09:11:19.577196+00:00
date_fix_committed = None
date_fix_released = None
id = 1929802
importance = wishlist
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1929802
milestone = None
owner = waveform
owner_name = Dave Jones
private = False
status = triaged
submitter = sergiyts
submitter_name = Sergiy Tsarenok
tags = ['bot-comment', 'raspi-image']
duplicates = []

Launchpad user Sergiy Tsarenok(sergiyts) wrote on 2021-05-27T09:11:19.577196+00:00

After start-up information of server, which is Raspberry Pi 4 Computer Model B with Ubuntu 21.04 server, when already appeared user login request, I’m getting 3 lines of Cloud-init log:

[ 52.081950] cloud-init[2018]:Cloud-init v. 21.1-19-gbad84ad4-0ubuntu3 running 'modules:config' at Wed, 26 May 2021 19:23:18 +0000. Up 51.89 seconds. [ 53.647359] cloud-init[2026]:Cloud-init v. 21.1-19-gbad84ad4-0ubuntu3 running 'modules:final' at Wed, 26 May 2021 19:23:20 +0000. Up 53.44 seconds. [ 53.764273] cloud-init[2026]:Cloud-init v. 21.1-19-gbad84ad4-0ubuntu3 finished at Wed, 26 May 2021 19:23:20 +0000. Datasource DataSourceCloud [seed=/dev/mmcblk0k1][dsmode=net]. Up 53.44 seconds.

I don’t know if it causes any problem to system, but it is definitely not a right place to print this information. Here is some additional information which I collected according to ReportingBugs instruction: Description: Ubuntu 21.04 Release: 21.04

cloud-init: Installed: 21.1-19-gbad84ad4-0ubuntu3 Candidate: 21.1-19-gbad84ad4-0ubuntu3 Version table: *** 21.1-19-gbad84ad4-0ubuntu3 500 500 http://ports.ubuntu.com/ubuntu-ports hirsute-updates/main arm64 Packages 100 /var/lib/dpkg/status 21.1-19-gbad84ad4-0ubuntu2 500 500 http://ports.ubuntu.com/ubuntu-ports hirsute/main arm64 Packages

I discovered the issue occasionally when connected my Raspberry to monitor. Before I used SSH (PuTTY) to work with it. Thus, I don't know if it was from very first start of the server or appeared after update or installed package. I did not install any packages outside of official repositories. I do not use any Cloud functionality on my server and did not touch Cloud-init. I'm not using (not installed) GUI.

ubuntu-server-builder commented 1 year ago

Launchpad user Ubuntu Foundations Team Bug Bot(crichton) wrote on 2021-05-27T12:33:56.277526+00:00

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1929802/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

ubuntu-server-builder commented 1 year ago

Launchpad user Dave Jones(waveform) wrote on 2021-05-27T20:04:48.242048+00:00

The Ubuntu Pi images are modified Ubuntu Cloud images and as such they use cloud-init for their initial configuration. On the very first boot, there's quite a bit more output than this (from cloud-init) confirming it's created users, imported SSH keys, or whatever else it's been set up to do (via user-data on the boot partition). However, on subsequent boots it also outputs these lines indicating that it's run but had nothing to do (cloud-init can be set to run things on subsequent boots but doesn't by default).

I don't know the reason for this specifically, but I'd hazard a guess that the fact it's on the console would be for debugging reasons. For the very first boot it's actually rather useful given that getty (the process that produces the login prompt) typically executes before cloud-init completes and thus the cloud-init output serves to prompt when the initial user has been created (permitting login). However, on subsequent boots it is (at least superficially) needless output.