leapp-repository icon indicating copy to clipboard operation
leapp-repository copied to clipboard

xfs_info_scanner - unable to open database file

Open atoomic opened this issue 2 years ago • 0 comments

This issue was reported as https://github.com/cpanel/elevate/issues/120

During the leapp update, we can see the following error while trying to open the sqlite database. It's unclear to me why it s failing to open the db

Log Extract

* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 60, in create_connection
* 16-08:05:25 (3372) [INFO]     return _initialize_database(sqlite3.connect(path))
* 16-08:05:25 (3372) [INFO] OperationalError: unable to open database file

Log from the leapp upgrade

* 16-07:58:55 (965) [INFO] Stage 3: skipping prep_for_leapp (already run)
* 16-07:58:55 (1485) [INFO] Running leapp upgrade
* 16-07:58:55 (3361) [INFO] Running: /usr/bin/leapp upgrade
* 16-07:58:55 (3362) [INFO]
* 16-07:59:16 (3372) [INFO] ==> Processing phase `configuration_phase`
* 16-07:59:16 (3372) [INFO] ====> * ipu_workflow_config
* 16-07:59:16 (3372) [INFO]         IPU workflow config actor
* 16-07:59:17 (3372) [INFO] ==> Processing phase `FactsCollection`
* 16-07:59:17 (3372) [INFO] ====> * repository_mapping
* 16-07:59:17 (3372) [INFO]         Produces message containing repository mapping based on provided file.
* 16-07:59:17 (3372) [INFO] ====> * tcp_wrappers_config_read
* 16-07:59:17 (3372) [INFO]         Parse tcp_wrappers configuration files /etc/hosts.{allow,deny}.
* 16-07:59:17 (3372) [INFO] ====> * rpm_scanner
* 16-07:59:17 (3372) [INFO]         Provides data about installed RPM Packages.
* 16-07:59:58 (3372) [INFO] Loaded plugins: versionlock
* 16-08:00:02 (3372) [INFO] ====> * common_leapp_dracut_modules
* 16-08:00:02 (3372) [INFO]         Influences the generation of the initram disk
* 16-08:00:03 (3372) [INFO] ====> * restricted_pcis_scanner
* 16-08:00:03 (3372) [INFO]         Provides data about restricted (unsupported or/and unavailable) devices.
* 16-08:00:03 (3372) [INFO] ====> * grubdevname
* 16-08:00:03 (3372) [INFO]         Get name of block device where GRUB is located
* 16-08:00:03 (3372) [INFO] ====> * root_scanner
* 16-08:00:03 (3372) [INFO]         Scan the system root directory and produce a message containing
* 16-08:00:03 (3372) [INFO] ====> * scanclienablerepo
* 16-08:00:03 (3372) [INFO]         Produce CustomTargetRepository based on the LEAPP_ENABLE_REPOS in config.
* 16-08:00:03 (3372) [INFO] ====> * scandasd
* 16-08:00:03 (3372) [INFO]         In case of s390x architecture, check whether DASD is used.
* 16-08:00:04 (3372) [INFO] ====> * scanmemory
* 16-08:00:04 (3372) [INFO]         Scan Memory of the machine.
* 16-08:00:04 (3372) [INFO] ====> * scancpu
* 16-08:00:04 (3372) [INFO]         Scan CPUs of the machine.
* 16-08:00:04 (3372) [INFO] ====> * scan_kernel_cmdline
* 16-08:00:04 (3372) [INFO]         No documentation has been provided for the scan_kernel_cmdline actor.
* 16-08:00:04 (3372) [INFO] ====> * scan_custom_repofile
* 16-08:00:04 (3372) [INFO]         Scan the custom /etc/leapp/files/leapp_upgrade_repositories.repo repo file.
* 16-08:00:05 (3372) [INFO] ====> * scan_files_for_target_userspace
* 16-08:00:05 (3372) [INFO]         Scan the source system and identify files that will be copied into the target userspace when it is created.
* 16-08:00:05 (3372) [INFO] ====> * system_facts
* 16-08:00:05 (3372) [INFO]         Provides data about many facts from system.
* 16-08:00:35 (3372) [INFO] ====> * network_manager_read_config
* 16-08:00:35 (3372) [INFO]         Provides data about NetworkManager configuration.
* 16-08:00:35 (3372) [INFO] ====> * get_installed_desktops
* 16-08:00:35 (3372) [INFO]         Actor checks if kde or gnome desktop environments
* 16-08:00:36 (3372) [INFO] ====> * removed_pam_modules_scanner
* 16-08:00:36 (3372) [INFO]         Scan PAM configuration for modules that are not available in RHEL-8.
* 16-08:00:36 (3372) [INFO] ====> * scan_sap_hana
* 16-08:00:36 (3372) [INFO]         Gathers information related to SAP HANA instances on the system.
* 16-08:00:36 (3372) [INFO] ====> * repositories_blacklist
* 16-08:00:36 (3372) [INFO]         Exclude target repositories provided by Red Hat without support.
* 16-08:00:36 (3372) [INFO] ====> * scan_subscription_manager_info
* 16-08:00:36 (3372) [INFO]         Scans the current system for subscription manager information
* 16-08:00:36 (3372) [INFO] ====> * pam_modules_scanner
* 16-08:00:36 (3372) [INFO]         Scan the pam directory for services and modules used in them
* 16-08:00:36 (3372) [INFO] ====> * transaction_workarounds
* 16-08:00:36 (3372) [INFO]         Provides additional RPM transaction tasks based on bundled RPM packages.
* 16-08:00:36 (3372) [INFO] ====> * read_openssh_config
* 16-08:00:36 (3372) [INFO]         Collect information about the OpenSSH configuration.
* 16-08:00:37 (3372) [INFO] ====> * selinuxcontentscanner
* 16-08:00:37 (3372) [INFO]         Scan the system for any SELinux customizations
* 16-08:00:57 (3372) [INFO] ====> * storage_scanner
* 16-08:00:57 (3372) [INFO]         Provides data about storage settings.
* 16-08:00:57 (3372) [INFO] ====> * firewalld_facts_actor
* 16-08:00:57 (3372) [INFO]         Provide data about firewalld
* 16-08:00:57 (3372) [INFO] ====> * pci_devices_scanner
* 16-08:00:57 (3372) [INFO]         Provides data about existing PCI Devices.
* 16-08:01:02 (3372) [INFO] ====> * authselect_scanner
* 16-08:01:02 (3372) [INFO]         Detect what authselect configuration should be suggested to administrator.
* 16-08:01:03 (3372) [INFO] ====> * check_kde_apps
* 16-08:01:03 (3372) [INFO]         Actor checks which KDE apps are installed.
* 16-08:01:04 (3372) [INFO] ====> * persistentnetnames
* 16-08:01:04 (3372) [INFO]         Get network interface information for physical ethernet interfaces of the original system.
* 16-08:01:04 (3372) [INFO] ====> * source_boot_loader_scanner
* 16-08:01:04 (3372) [INFO]         Scans the boot loader configuration on the source system.
* 16-08:01:05 (3372) [INFO] ====> * red_hat_signed_rpm_scanner
* 16-08:01:05 (3372) [INFO]         Provide data about installed RPM Packages signed by Red Hat.
* 16-08:01:06 (3372) [INFO] ====> * udevadm_info
* 16-08:01:06 (3372) [INFO]         Produces data exported by the "udevadm info" command.
* 16-08:02:21 (3372) [INFO] ====> * sssd_facts
* 16-08:02:21 (3372) [INFO]         Check SSSD configuration for changes in RHEL8 and report them in model.
* 16-08:02:21 (3372) [INFO] ====> * biosdevname
* 16-08:02:21 (3372) [INFO]         Enable biosdevname on the target RHEL system if all interfaces on the source RHEL
* 16-08:02:21 (3372) [INFO] ====> * sctp_read_status
* 16-08:02:21 (3372) [INFO]         Determines whether or not the SCTP kernel module might be wanted.
* 16-08:02:21 (3372) [INFO] ====> * used_repository_scanner
* 16-08:02:21 (3372) [INFO]         Scan used enabled repositories
* 16-08:02:21 (3372) [INFO] ====> * xfs_info_scanner
* 16-08:02:21 (3372) [INFO]         This actor scans all mounted mountpoints for XFS information
* 16-08:05:25 (3372) [INFO] Process Process-253:
* 16-08:05:25 (3372) [INFO] Traceback (most recent call last):
* 16-08:05:25 (3372) [INFO]   File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
* 16-08:05:25 (3372) [INFO]     self.run()
* 16-08:05:25 (3372) [INFO]   File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
* 16-08:05:25 (3372) [INFO]     self._target(*self._args, **self._kwargs)
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
* 16-08:05:25 (3372) [INFO]     actor_instance.run(*args, **kwargs)
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 335, in run
* 16-08:05:25 (3372) [INFO]     self.process(*args)
* 16-08:05:25 (3372) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/xfsinfoscanner/actor.py", line 23, in process
* 16-08:05:25 (3372) [INFO]     scan_xfs()
* 16-08:05:25 (3372) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/xfsinfoscanner/libraries/xfsinfoscanner.py", line 45, in scan_xfs
* 16-08:05:25 (3372) [INFO]     mountpoints_ftype0 = list(filter(is_xfs_without_ftype, mountpoints))
* 16-08:05:25 (3372) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/xfsinfoscanner/libraries/xfsinfoscanner.py", line 24, in is_xfs_without_ftype
* 16-08:05:25 (3372) [INFO]     for l in run(['/usr/sbin/xfs_info', '{}'.format(mp)], split=True)['stdout']:
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 203, in run
* 16-08:05:25 (3372) [INFO]     'process-result', {'id': _id, 'parameters': args, 'result': audit_result, 'env': env}
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 286, in create_audit_entry
* 16-08:05:25 (3372) [INFO]     'data': data
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 87, in store
* 16-08:05:25 (3372) [INFO]     with get_connection(db) as connection:
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 73, in get_connection
* 16-08:05:25 (3372) [INFO]     return create_connection(cfg.get('database', 'path'))
* 16-08:05:25 (3372) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 60, in create_connection
* 16-08:05:25 (3372) [INFO]     return _initialize_database(sqlite3.connect(path))
* 16-08:05:25 (3372) [INFO] OperationalError: unable to open database file
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] =================================================================================================
* 16-08:05:25 (3372) [INFO] Actor xfs_info_scanner unexpectedly terminated with exit code: 1 - Please check the above details
* 16-08:05:25 (3372) [INFO] =================================================================================================
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] Debug output written to /var/log/leapp/leapp-upgrade.log
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] ============================================================
* 16-08:05:25 (3372) [INFO]                            REPORT
* 16-08:05:25 (3372) [INFO] ============================================================
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] A report has been generated at /var/log/leapp/leapp-report.json
* 16-08:05:25 (3372) [INFO] A report has been generated at /var/log/leapp/leapp-report.txt
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] ============================================================
* 16-08:05:25 (3372) [INFO]                        END OF REPORT
* 16-08:05:25 (3372) [INFO] ============================================================
* 16-08:05:25 (3372) [INFO]
* 16-08:05:25 (3372) [INFO] Answerfile has been generated at /var/log/leapp/answerfile
* 16-08:05:25 (3382) [INFO]
* 16-08:05:25 (526) [ERROR] Sending notification: Fail to update to AlmaLinux 8
* 16-08:05:25 (527) [ERROR] The elevation process failed during stage 3.

You can continue the process after fixing the errors by running:

    /usr/local/cpanel/scripts/elevate-cpanel --continue

You can check the error log by running:

    /usr/local/cpanel/scripts/elevate-cpanel

Last Error:

The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:

    /scripts/elevate-cpanel --continue


You can read the full leapp report at: /var/log/leapp/leapp-report.txt



* 16-08:05:25 (400) [FATAL] The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:

    /scripts/elevate-cpanel --continue


You can read the full leapp report at: /var/log/leapp/leapp-report.txt

atoomic avatar Oct 07 '22 22:10 atoomic