plesk / centos2alma

CentOS 7 to AlmaLinux 8 conversion tool
Apache License 2.0
36 stars 7 forks source link

Running centos2alma shows error on actor check_bind #253

Closed MIJmker closed 1 month ago

MIJmker commented 1 month ago

Describe the bug When running ./centos2alma, the following error shows:

`====> * check_grub_core
        Check whether we are on legacy (BIOS) system and instruct Leapp to upgrade GRUB core
====> * check_bind
        Actor parsing BIND configuration and checking for known issues in it.
Process Process-456:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 290, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/checkbind/actor.py", line 32, in process
    facts = iscmodel.get_facts('/etc/named.conf')
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/checkbind/libraries/iscmodel.py", line 81, in get_facts
    parser.walk(cfg.root_section(), find_calls, state)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/isccfg.py", line 879, in walk
    for statement in it:
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/isccfg.py", line 223, in __next__
    statement = next(self.iter)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/isccfg.py", line 181, in __next__
    val = self.parser.find_next_key(cfg, index, self.section.end)
  File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/isccfg.py", line 689, in find_next_key
    while istr[index] in self.CHAR_KEYWORD and index < end_index:
IndexError: string index out of range

===========================================================================================
Actor check_bind unexpectedly terminated with exit code: 1 - Please check the above details
===========================================================================================

Debug output written to /var/log/leapp/leapp-preupgrade.log

Feedback archive centos.zip

Does anyone have an idea what causes this, and how to fix it?

Let me know if more details are required.

SandakovMM commented 1 month ago

It seems that leapp is having trouble parsing one of your configuration files for named. I was unable to reproduce the issue with the '/etc/named.conf' file from the feedback archive. Therefore, I believe the issue may be in the '/etc/named-user-options.conf' file, as it is the only included configuration file. Could you please share the '/etc/named-user-options.conf' file with me so that I can continue the investigation?

MIJmker commented 1 month ago

Hi, thx for checking. That file is empty however

SandakovMM commented 1 month ago

Oh, I understand. This is the cause of the problem. To resolve it, you need to add the following content to the file:

version "none";
auth-nxdomain no;
listen-on-v6 { any; };

Alternatively, you could simply remove the include "/etc/named-user-options.conf"; directive from the /etc/named.conf file.

I will solve the problem, likely by adding a prechecker. Additionally, I think the issue may have already been fixed on the elivate side, but I'm not certain. I will investigate further when we release the new version of centos2alma, where we plan to upgrade to the latest version of elivate.

MIJmker commented 1 month ago

Thanks, that seems to fix it (removing include of that file). The pre-upgrade error was gone so I migrated it and still have a database issue, but if I can't figure it out myself I'll open another ticket.

I'll close this one. Thanks for your help