This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2179056 - [leapp] Failed to read machine ID from container image: Invalid argument
Summary: [leapp] Failed to read machine ID from container image: Invalid argument
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.9
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Leapp Notifications Bot
QA Contact: upgrades-and-conversions
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-16 14:22 UTC by Christophe Besson
Modified: 2023-09-12 13:23 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-12 13:23:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OAMG-8715 0 None None None 2023-03-16 14:23:43 UTC
Red Hat Issue Tracker   RHEL-3340 0 None Migrated None 2023-09-12 13:21:00 UTC
Red Hat Issue Tracker RHELPLAN-152093 0 None None None 2023-03-16 14:23:31 UTC
Red Hat Knowledge Base (Solution) 7003087 0 None None None 2023-03-16 14:22:29 UTC

Description Christophe Besson 2023-03-16 14:22:30 UTC
Description of problem:
If the /etc/machine-id file is not well-formed, systemd-nspawn used by leapp exits with a -1 return code, leading to the emergency shell. This is harmless as it happens very early and the system is untouched.

Version-Release number of selected component (if applicable):
leapp-upgrade-el7toel8-0.17.0-1.el7_9

How reproducible:
Always

Steps to Reproduce:
1. echo >> /etc/machine-id
2. leapp upgrade

Actual results:
[    2.462635] upgrade[691]: Failed to read machine ID from container image: Invalid argument
[    2.476214] upgrade[690]: (sd-namespace) failed with exit status 1.

Expected results:
Possibly an inhibitor.

Additional info:
* Never observed such an issue, hence very low sev. This file should not have been touched (by a human or a script).
* Probably the same for IPU 8>9.
* The KCS I linked could be enough.
* Some systemd-nspawn excerpt:

	systemd-239/src/nspawn/nspawn.c:
	2187 static int setup_machine_id(const char *directory) {
	 :
	2198 
	2199         etc_machine_id = prefix_roota(directory, "/etc/machine-id");
	2200 
	2201         r = id128_read(etc_machine_id, ID128_PLAIN, &id);
	2202         if (r < 0) {
	2203                 if (!IN_SET(r, -ENOENT, -ENOMEDIUM)) /* If the file is missing or empty, we don't mind */
	2204                         return log_error_errno(r, "Failed to read machine ID from container image: %m");

	systemd-239/src/libsystemd/sd-id128/id128-util.c:
	 82 int id128_read_fd(int fd, Id128Format f, sd_id128_t *ret) {
	 :
	102         case 33: /* plain UUID with trailing newline */
	103                 if (buffer[32] != '\n')
	104                         return -EINVAL;
	105 
	106                 _fallthrough_;
	107         case 32: /* plain UUID without trailing newline */
	108                 if (f == ID128_UUID)
	109                         return -EINVAL;
	110 
	111                 buffer[32] = 0;
	112                 break;
	113 
	114         case 37: /* RFC UUID with trailing newline */
	115                 if (buffer[36] != '\n')
	116                         return -EINVAL;
	117 
	118                 _fallthrough_;
	119         case 36: /* RFC UUID without trailing newline */
	120                 if (f == ID128_PLAIN)
	121                         return -EINVAL;

Comment 3 RHEL Program Management 2023-09-12 13:16:23 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-12 13:23:03 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.