Symptoms
Migration fails with the following error in the Plesk panel:
Failed to perform action: Restart IIS for IDN domains Exception: global name 'log_context' is not defined
Cause
Missing log_context variable in Migrator Extension settings.
Resolution
Such behavior was revised in the latest release of the Plesk Migrator extension. Consider updating it.
In case update is not possible and the issue persists, as a temporary workaround, apply the following steps:
1. Connect the server via SSH
2. Open the following file with any available text editor, vi for example:
# vi /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/migrator.py
3. Add the following string:
from parallels.core.logging import log_context
Example:
import errno
import os
import os.path
import sys
import time
from collections import defaultdict, namedtuple
from contextlib import contextmanager
try:
from ConfigParser import RawConfigParser, MissingSectionHeaderError
except ImportError:
from configparser import RawConfigParser, MissingSectionHeaderError
from parallels.core.logging import log_context
from parallels.core import MigrationError, get_logger
4. Save the file and re-run the migration.