package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade: installed systemd-resolved package post-installation script subprocess returned error exit status 1 [cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
High
|
Nick Rosbrook |
Bug Description
[Impact]
For users that disabled the stub-resolver, and in doing so also created a symlink /etc/resolv.conf -> /run/systemd/
cp: '/etc/resolv.conf' and '/run/systemd/
This logic in systemd-
[Test Plan]
Start a VM or container running Jammy. Disable the stub-resolver, and create the symlink /etc/resolv.conf -> /run/systemd/
$ mkdir -p /etc/systemd/
$ cat > /etc/systemd/
[Resolve]
DNSStubListener=no
EOF
$ ln -sf /run/systemd/
$ systemctl restart systemd-resolved
Then, run an upgrade to Noble:
$ do-release-upgrade --devel
NB that currently, even devel upgrades are disabled to from Jammy to Noble, so the upgrade would need to be run as:
$ wget http://
$ tar xf noble.tar.gz
$ ./noble
Inspect the relevant output and logs to ensure that systemd-resolved was upgraded successfully during the upgrade.
[Where problems could occur]
The fix is to make such a failure non-fatal. This is safe because although manually creating this symlink is not necessary, it will not impact the operation of systemd-resolved. Hence, failing to make this cp will not impact the user. Later in the postinst, we force the new symlink anyways.
If something was wrong with the change, it would likely cause the systemd-
[Original Description]
upgraded from 22.04 -> 24.04
ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: systemd-resolved 253.5-1ubuntu7
ProcVersionSign
Uname: Linux 6.2.0-39-generic x86_64
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Wed Jan 3 21:06:55 2024
ErrorMessage: installed systemd-resolved package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2023-02-27 (311 days ago)
InstallationMedia: Ubuntu-Server 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809)
Python3Details: /usr/bin/
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageV
dpkg 1.22.1ubuntu5
apt 2.7.6
SourcePackage: systemd
Title: package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade: installed systemd-resolved package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to noble on 2024-01-03 (0 days ago)
mtime.conffile.
affects: | ubuntu → systemd (Ubuntu) |
tags: | removed: need-duplicate-check |
summary: |
package systemd-resolved 253.5-1ubuntu7 failed to install/upgrade: installed systemd-resolved package post-installation script subprocess - returned error exit status 1 + returned error exit status 1 [cp: '/etc/resolv.conf' and + '/run/systemd/resolve/stub-resolv.conf' are the same file] |
tags: | added: mantic |
tags: | removed: foundations-todo |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Changed in systemd (Ubuntu Noble): | |
status: | Triaged → In Progress |
Status changed to 'Confirmed' because the bug affects multiple users.