maas packages incorrectly purge things needed by packages not being removed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Andres Rodriguez |
Bug Description
Let's say I have a region-and-rack controller, and I decide to make it a region-controller only:
% sudo apt-get purge maas-rack-
(I expect that anything to do with the rack controller will be gone, and that the region controller remains happy)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
maas* maas-rack-
0 upgraded, 0 newly installed, 2 to remove and 18 not upgraded.
After this operation, 159 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 162688 files and directories currently installed.)
Removing maas (2.0.0~
Purging configuration files for maas (2.0.0~
Removing maas-rack-
Purging configuration files for maas-rack-
dpkg: warning: while removing maas-rack-
(lets see what the logs have to say:)
% ls /var/log/maas
ls: cannot access '/var/log/maas': No such file or directory
There's bug 1.
Now let's reinstall the rack controller, because that was obviously a bad idea. (or we changed our mind and it really should now be a rack-n-region controller)
(Reading database ... 162641 files and directories currently installed.)
Preparing to unpack maas_2.
Unpacking maas (2.0.0~
Selecting previously unselected package maas-rack-
Preparing to unpack maas-rack-
Unpacking maas-rack-
Setting up maas-rack-
touch: cannot touch '/var/log/
dpkg: error processing package maas-rack-
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of maas:
maas depends on maas-rack-
Package maas-rack-
dpkg: error processing package maas (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
maas-rack-
maas
Turns out that maas-rack-
The directory should be delivered by all of the packages that create logs in it, and removed by none -- dpkg will remove it if it is empty at the time of purge. At most the packages should remove their own logs at purge, not everyone's.
Related branches
- Andres Rodriguez (community): Approve
- LaMont Jones (community): Needs Fixing
- Lee Trager (community): Needs Information
-
Diff: 502 lines (+133/-92)22 files modifieddebian/changelog (+5/-1)
debian/control (+0/-1)
debian/extras/99-maas (+0/-5)
debian/maas-common.dirs (+2/-0)
debian/maas-common.postinst (+13/-6)
debian/maas-common.postrm (+5/-1)
debian/maas-dhcp.dirs (+2/-0)
debian/maas-dhcp.maas-dhcpd6.service (+1/-1)
debian/maas-dhcp.postinst (+3/-0)
debian/maas-dhcp.postrm (+1/-2)
debian/maas-rack-controller.dirs (+2/-0)
debian/maas-rack-controller.maas-rackd.service (+2/-2)
debian/maas-rack-controller.postinst (+42/-11)
debian/maas-rack-controller.postrm (+25/-11)
debian/maas-region-api.install (+0/-1)
debian/maas-region-api.maas-regiond-worker@.service (+1/-1)
debian/maas-region-api.maas-regiond.service (+1/-1)
debian/maas-region-api.postinst (+15/-13)
debian/maas-region-api.postrm (+9/-2)
debian/maas-region-api.preinst (+4/-0)
debian/maas-region-controller.postinst (+0/-6)
debian/maas-region-controller.postrm (+0/-27)
Changed in maas: | |
assignee: | nobody → Andres Rodriguez (andreserl) |
Changed in maas: | |
milestone: | none → 2.0.0 |
Changed in maas: | |
status: | New → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |