[SOLVED] apt autoremove failed after upgrade to pve-manager/8.2.4

pvflick

New Member
Apr 26, 2024
7
0
1
The upgrade of my 3 node cluster to pve-manager version 8.2.4 went OK. After rebooting all 3 node there are no functional problems.
> pveversion
pve-manager/8.2.4/faa83925c9641325 (running kernel: 6.8.8-1-pve)

Although the cluster functions normally, only node2 seems to have a post-install issue (node1 and node3 have no issues at all)

Node2:
According to "apt update" all installed packages are up to date.

I get the following error message when running "apt autoremove" or "dpkg --configure pve-manager"
> apt autoremove
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
pve-manager (8.2.4) wird eingerichtet ...
sed: /root/sedseUZkS kann nicht umbenannt werden: Die Operation ist nicht erlaubt
dpkg: Fehler beim Bearbeiten des Paketes pve-manager (--configure):
»installiertes post-installation-Skript des Paketes pve-manager«-Unterprozess gab den Fehlerwert 4 zurück
Fehler traten auf beim Bearbeiten von:
pve-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)

GUI: Package versions
- proxmox-ve: 8.2.0 (running kernel: 6.8.8-1-pve)
- pve-manager: not correctly installed (running version: 8.2.4/faa83925c9641325)
...

So I guess the upgrade wasn't able to finish post-install procedures on that single node.

Any idea on how to fix this?
 
Last edited:
Further information:
- The only difference between node2 (besides HW/CPU) and the other two nodes is that node2 uses native ZFS encryption on rpool.
- Booting node2 with different kernels does not solve the issue.

Questions:
- I have searched the filesystem for the post-install scripts of pve-manager but have not found them. Does anyone know the name of the scripts and in which directory they are located?
- Does anyone know the meaning of "error exit status 4" when running dpkg ("subprocess installed post-installation script returned error exit status 4")

Any help is welcome
 
postinst scripts are located in /var/lib/dpkg/info/ .. but it's very likely not the script that is the issue here.. could you post the output of "ls -lha /root"?
 
  • Like
Reactions: pvflick
Thanks Fabian for your support

Code:
>ls -lha /root
insgesamt 92K
drwx------  6 root root   16 24. Jun 23:15 .
drwxr-xr-x 28 root root   36 24. Jun 07:56 ..
drwx------  3 root root    3 27. Okt 2022  .ansible
-rw-------  1 root root  12K 16. Apr 20:37 .bash_history
-rw-------  1 root root    0 20. Jul 2023  .bash_history-53372.tmp
-rw-r--r--  1 root root  569 16. Sep 2022  .bashrc
drwxr-xr-x  3 root root    3 19. Sep 2022  .cache
drwx------  3 root root    3 18. Sep 2022  .config
-rw-r--r--  1 root root   31 29. Mär 10:22 .forward
-rw-------  1 root root 2,6K 16. Apr 21:39 .joe_state
-rw-------  1 root root   91 24. Jun 22:36 .lesshsQ
-rw-------  1 root root   91 16. Apr 20:25 .lesshst
-rw-r--r--  1 root root  161  9. Jul 2019  .profile
-rw-------  1 root root 1,0K 16. Sep 2022  .rnd
-rw-r--r--  1 root root   69 25. Sep 2022  .selected_editor
drwxr-xr-x  2 root root   10 15. Apr 17:38 .ssh
 
If I comment out the line numbers 160-166 in the post-install-skript "/var/lib/dpkg/info/pve-manager.postinst"

After that the command "dpkg --configure pve-manager" finished without errors.
Both commands "apt upgrade" and "apt autoremove" finish without any error messages.

The content of file "/root/.forward" is
Code:
> cat /root/.forward
|/usr/bin/proxmox-mail-forward

The root cause is the sed command is in line 161.
> sed -i '\!|/usr/bin/pvemailforward!d' /root/.forward

Running it manually on the the cmdline does cause the error of the post-install-skript of pve-manager

Code:
>sed -i '\!|/usr/bin/pvemailforward!d' /root/.forward
sed: /root/sedon3HRM kann nicht umbenannt werden: Die Operation ist nicht erlaubt
 
Last edited:
Problem is a probably wrong readonly file attribute of "/root/.forward". I changed it with the command
"chattr -i /root/.forward"

Now the sed command executes flawlessly. I wonder how the wrong file attribute was applied.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!