Closed strarsis closed 2 years ago
Fairly certain this is caused by the change in https://github.com/roots/trellis/pull/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.
Thanks for reporting this @strarsis but I'm going with "not worth fixing for now"
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
; noapt
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
; noapt
warnings after having re-provisioned an existingTrellis
server with a newerTrellis
version.Relevant Log Output
Versions
Create mysql my.cnf credentials file earlier (#1360)