You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request is not a duplicate of an existing issue
I have read the docs and followed them (if applicable)
I have seached the Roots Discourse for answers and followed them (if applicable)
This is not a personal support request that should be posted on the Roots Discourse community
Description
What's wrong?
After applying the latest Trellis on a staging server, apt update shows warnings for multiple times configured target packages/CNF.
(See the "Relevant Log Output" section below).
deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu focal nginx
deb http://nginx.org/packages/mainline/ubuntu focal nginx
Note: Admittedly this staging server had a quite old Trellis version: From about August of last year, 2021.
What have you tried?
Commenting out one of the duplicate line fixed the warning.
Purging all the managed and unmanaged files indiscriminately in /etc/apt/sources.list.d and re-provisioning also fixes the problem.
What insights have you gained?
A previously added apt source files for the previously used nginx fork becomes unmanaged and is not cleaned up when the new nginxapt source is added.
Possible solutions
Explicitly clean up the apt source file of previously used nginx fork in Trellis, so re-provisioning an existing Trellis server will not result in an unmanaged, left-over apt sources file that cause these apt warnings (and possible source inconsistencies when installing nginx packages).
Temporary workarounds
The apt warnings can probably be ignored. But there could be inconsistencies with nginx package versions and from where they will be installed. As a workaround, the duplicate lines mentioned in the apt update warnings can be commented out.
Steps To Reproduce
Provision a server with an earlier Trellis version / use an existing Trellis server that was provisioned by an earlier Trellis version.
Provision the server with latest Trellis version.
Invoke apt update for maintenance and updating system packages. Note the apt warnings about duplicate target packages/CNF.
Expected Behavior
No unmanaged, left-over apt source files with duplicate target packages/CNF;
no apt warnings after having re-provisioned an existing Trellis server with a newer Trellis version.
Actual Behavior
Unmanaged, left-over apt source files with duplicate target packages/CNF;
no apt warnings after having re-provisioned an existing Trellis server with a newer Trellis version.
Relevant Log Output
W: Target Packages (nginx/binary-amd64/Packages) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Packages (nginx/binary-all/Packages) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Translations (nginx/i18n/Translation-en_US) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Translations (nginx/i18n/Translation-en) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target CNF (nginx/cnf/Commands-amd64) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target CNF (nginx/cnf/Commands-all) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Packages (nginx/binary-amd64/Packages) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Packages (nginx/binary-all/Packages) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Translations (nginx/i18n/Translation-en_US) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target Translations (nginx/i18n/Translation-en) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target CNF (nginx/cnf/Commands-amd64) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
W: Target CNF (nginx/cnf/Commands-all) is configured multiple timesin /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:1 and /etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list:2
Versions
Create mysql my.cnf credentials file earlier (#1360)
The text was updated successfully, but these errors were encountered:
Fairly certain this is caused by the change in #1318
The apt warnings can probably be ignored. But there could be inconsistencies with nginx package versions and from where they will be installed.
I think they can be safely ignored since the only difference in sources in the architecture specified (amd64 vs all). Ubuntu automatically detects the architecture and picks the correct one anyway.
So I'm not sure if it's worth adding an explicit cleanup task or not.
Terms
Description
What's wrong?
After applying the latest
Trellis
on a staging server,apt update
shows warnings for multiple times configured target packages/CNF.(See the "Relevant Log Output" section below).
/etc/apt/sources.list.d/nginx_org_packages_mainline_ubuntu.list
:Note: Admittedly this staging server had a quite old
Trellis
version: From about August of last year, 2021.What have you tried?
Commenting out one of the duplicate line fixed the warning.
Purging all the managed and unmanaged files indiscriminately in
/etc/apt/sources.list.d
and re-provisioning also fixes the problem.What insights have you gained?
A previously added apt source files for the previously used
nginx
fork becomes unmanaged and is not cleaned up when the newnginx
apt
source is added.Possible solutions
Explicitly clean up the
apt
source file of previously usednginx
fork inTrellis
, so re-provisioning an existingTrellis
server will not result in an unmanaged, left-over apt sources file that cause theseapt
warnings (and possible source inconsistencies when installingnginx
packages).Temporary workarounds
The
apt
warnings can probably be ignored. But there could be inconsistencies withnginx
package versions and from where they will be installed. As a workaround, the duplicate lines mentioned in theapt update
warnings can be commented out.Steps To Reproduce
Trellis
version / use an existing Trellis server that was provisioned by an earlierTrellis
version.Trellis
version.apt update
for maintenance and updating system packages. Note theapt
warnings about duplicate target packages/CNF
.Expected Behavior
No unmanaged, left-over
apt
source files with duplicate target packages/CNF
;no
apt
warnings after having re-provisioned an existingTrellis
server with a newerTrellis
version.Actual Behavior
Unmanaged, left-over
apt
source files with duplicate target packages/CNF
;no
apt
warnings after having re-provisioned an existingTrellis
server with a newerTrellis
version.Relevant Log Output
Versions
Create mysql my.cnf credentials file earlier (#1360)
The text was updated successfully, but these errors were encountered: