Symptoms

A task for VPS creation fails with the following error:

Internal error: <<< ERROR msg: Container has unsupported OS platform

On the target hardware node there's a remnant of the private area of a deleted container:

[root@vz ~]# ls -lh /vz/private/101
total 12K
drwx------   2 root root 4.0K Jul 30 12:43 root.hdd

[root@vz ~]# ls -lh /vz/private/101/root.hdd/
total 75G
-rw------- 1 root root  75G Jul 14 12:12 root.hds

And a link to the configuration file, which no longer exists:

[root@vz ~]# ls -al /etc/vz/conf/101.conf
lrwxrwxrwx 1 root root 25 May  8 14:13 /etc/vz/conf/101.conf -> /vz/private/101/ve.conf

The mounted container FS is held by an unfinished process:

[root@vz ~]# lsof /vz/root/101
COMMAND    PID USER  FD   TYPE     DEVICE SIZE/OFF   NODE NAME
rpmq    181095 root mem    REG 182,164497          532790 (deleted)/vz/root/101/var/lib/rpm/__db.003 (stat: No such file or directory)
rpmq    181095 root mem    REG 182,164497          532783 (deleted)/vz/root/101/var/lib/rpm/__db.002 (stat: No such file or directory)
rpmq    181095 root mem    REG 182,164497          531612 (deleted)/vz/root/101/var/lib/rpm/__db.001 (stat: No such file or directory)

Cause

RPM database corruption inside the container caused the failure to delete the container gracefully.

Resolution

Kill the stuck RPM process:

[root@vz ~]# kill -9 181095

Unmount the ploop that belongs to the container:

[root@vz ~]# ploop list | grep 101
ploop10281   /vz/private/101/root.hdd/root.hds

[root@vz ~]# ploop umount -d /dev/ploop10281
Unmounting file system at /vz/root/101
Unmounting device /dev/ploop10281

Clean up the remnants:

[root@vz ~]# rm -rf /vz/private/101
[root@vz ~]# unlink /etc/vz/conf/101.conf

Resubmit the task.

Internal content