websavers / centos2alma_openvz

A CentOS 7 to AlmaLinux 8 conversion utility for OpenVZ / Virtuozzo containers running Plesk
GNU General Public License v3.0
3 stars 0 forks source link

Command '['/sbin/vzctl', 'exec', 'xxxxxxxxxxxxxx', '/sbin/lsof', '-Pi']' returned non-zero exit status 8. #2

Closed d6v3w closed 2 months ago

d6v3w commented 2 months ago

Having a problem with the --convert stage;

Greetings again,

Virtuozzo release 7.5.4 (465)

Got as far as the ./centos2alma_openvz.sh $CTID --convert stage

snapshot is created but /root/almaconvert8-plesk fails with;

  File "/root/almaconvert8-plesk", line 769, in <module>
    args.func()
  File "/root/almaconvert8-plesk", line 284, in process_cts
    results = pool.map(process_single_ct, args.CT)
  File "/usr/lib64/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib64/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/lib64/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib64/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/root/almaconvert8-plesk", line 492, in process_single_ct
    old_ports_list = sorted(set(get_open_ports(ct, distro_kind)))
  File "/root/almaconvert8-plesk", line 242, in get_open_ports
    l = subprocess.check_output(['/sbin/vzctl', 'exec', ctid, lsof_path, '-Pi'])
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/sbin/vzctl', 'exec', 'xxxxxxxxxxxxxx', '/sbin/lsof', '-Pi']' returned non-zero exit status 8.
Failure running almaconvert8 - Exiting... to resume use --convert and --finish options

however running

/sbin/vzctl exec $CTID /sbin/lsof -Pi at the cli works

d6v3w commented 2 months ago

Fixed this by removing /root/almaconvert8-plesk rm -f /root/almaconvert8-plesk

uninstall vzdeploy8 yum remove vzdeploy8

installed an earlier version; yum install vzdeploy8-1.0.61-10.vl7

And ran the script again.

jas8522 commented 2 months ago

This sounds, much like the other issue you posted, like an issue with using a much older version of OpenVZ than current. Granted I'm sure the Virtuozzo devs should have made the version of vzdeploy8 dependent on newer packages.

Could you confirm the version of openvz with cat /etc/openvz-release?

redsuperstructure commented 2 months ago

I had the same problem. We are using latest Virtuozzo release 7.5.6 (87). This version is installed by default:

vzdeploy8.noarch 1.0.63-2.vl7 virtuozzolinux-base

After deleting the package and downloading the latest version here, it worked: https://repo.virtuozzo.com/vzlinux/vzdeploy/vzdeploy8.rpm

d6v3w commented 2 months ago

Yeah I think I need to update the platform, its not scheduled for a couple of weeks yet, will see if I can get it moved forward and test again. Thanks folks.

jas8522 commented 2 months ago

@redsuperstructure the latest version being vzdeploy8-1.0.66-4.vl7. If your default yum repo installed 1.0.63, then either you're not running the latest version of Virtuozzo or the Vz devs are holding back latest vzdeploy releases within the Virtuozzo repos.

According to Virtuozzo release info there have been two hotfixes since the version you mentioned above, that you have not installed yet. One of which has almaconvert8 fixes/changes: https://docs.virtuozzo.com/virtuozzo_advisory_archive/virtuozzo-hybrid-server/VZA-2024-010.html

So you need to update to latest release/hotfixes before proceeding.