Installation fails when files associated to package ubuntu-advantage-tools have local changes (e.g. juju managed files)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-ubuntu-advantage |
In Progress
|
Undecided
|
Jose Guedez |
Bug Description
While replacing the `canonical-
Using current edge channel, code seems to match commit 5d93cdba18d77c1
For example:
(initial install of canonical-
juju remove-relation <app>:juju-info canonical-
juju add-relation <app>:juju-info ubuntu-
The new ubuntu-advantage/X unit enters ERROR state with this stacktrace:
2022-02-25 03:50:14 INFO unit.ubuntu-
2022-02-25 03:50:15 WARNING unit.ubuntu-
2022-02-25 03:50:17 WARNING unit.ubuntu-
2022-02-25 03:50:17 ERROR unit.ubuntu-
Traceback (most recent call last):
File "./src/charm.py", line 170, in <module>
main(
File "/var/lib/
_emit_
File "/var/lib/
event_
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "./src/charm.py", line 89, in config_changed
self.
File "./src/charm.py", line 121, in _handle_
install_
File "./src/charm.py", line 34, in install_package
subprocess.
File "/usr/lib/
raise CalledProcessEr
subprocess.
Running the command manually shows the actual error which is that file `/etc/logrotate
root@prometheus
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up ubuntu-
Configuration file '/etc/logrotate
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** ubuntu-
--- /etc/logrotate.
+++ /etc/logrotate.
@@ -1,6 +1,8 @@
-# Configuration file maintained by Juju. Local changes may be overwritten
-/var/log/
- rotate 1
+# use the root group by default, since this is the owning group
+# of /var/log/
+/var/log/
+ su root root
+ rotate 6
monthly
compress
delaycompress
Related branches
- Tom Haddon: Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 1548 lines (+1363/-45)4 files modifiedlib/charms/operator_libs_linux/v0/apt.py (+1329/-0)
run_tests (+4/-3)
src/charm.py (+3/-13)
tests/test_charm.py (+27/-29)
summary: |
- Installation fails when files associated to package ubuntu-advantage - tools have local changes + Installation fails when files associated to package ubuntu-advantage- + tools have local changes (e.g. juju managed files) |
Changed in charm-ubuntu-advantage: | |
assignee: | nobody → Jose Guedez (jfguedez) |
status: | New → In Progress |
I've released revision 17 to the edge channel which should address this. Please give it a try and confirm, once we've done that we can promote that release to the stable channel.