%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 188.40.95.74 / Your IP : 216.73.216.142 Web Server : Apache System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64 User : vlasotin ( 1054) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/leapp-repository/repositories/system_upgrade/common/actors/satellite_upgrader/ |
Upload File : |
from leapp.actors import Actor from leapp.libraries.stdlib import api, CalledProcessError, run from leapp.models import SatelliteFacts from leapp.tags import FirstBootPhaseTag, IPUWorkflowTag class SatelliteUpgrader(Actor): """ Execute installer in the freshly booted system, to finalize Satellite configuration """ name = 'satellite_upgrader' consumes = (SatelliteFacts, ) produces = () tags = (IPUWorkflowTag, FirstBootPhaseTag) def process(self): facts = next(self.consume(SatelliteFacts), None) if not facts or not facts.has_foreman: return if facts.postgresql.local_postgresql: api.current_actor().show_message('Re-indexing the database. This can take a while.') try: run(['sed', '-i', '/data_directory/d', '/var/lib/pgsql/data/postgresql.conf']) run(['systemctl', 'start', 'postgresql']) run(['runuser', '-u', 'postgres', '--', 'reindexdb', '-a']) if facts.postgresql.has_pulp_ansible_semver: run(['runuser', '-c', 'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;" | psql pulpcore', 'postgres']) except CalledProcessError as e: api.current_logger().error('Failed to reindex the database: {}'.format(str(e))) installer_cmd = ['foreman-installer'] if facts.has_katello_installer: installer_cmd.append('--disable-system-checks') api.current_actor().show_message('Running the installer. This can take a while.') try: run(installer_cmd) except OSError as e: api.current_logger().error('Failed to run `foreman-installer`: {}'.format(str(e))) except CalledProcessError: api.current_logger().error( 'Could not run the installer, please inspect the logs in /var/log/foreman-installer!' )