#4857 ipa-restore crashes if replica is unreachable
Closed: Fixed None Opened 4 years ago by mkosek.

Transcript:

# ipa-restore --data --online /var/lib/ipa/backup/ipa-data-2015-01-19-23-02-40 --debug
Directory Manager (existing master) password:

ipa.ipaserver.install.ipa_restore.Restore: DEBUG: Logging to /var/log/iparestore.log
ipa.ipaserver.install.ipa_restore.Restore: DEBUG: ipa-restore was invoked with arguments ['/var/lib/ipa/backup/ipa-data-2015-01-19-23-02-40'] and options: {'log_file': None, 'data_only': True, 'verbose': True, 'gpg_keyring': None, 'quiet': False, 'instance': None, 'no_logs': False, 'online': True, 'password': None, 'unattended': False, 'backend': None}
ipa.ipaserver.install.ipa_restore.Restore: DEBUG: IPA version 4.1.2.201501140350GIT6950e7b-0.fc21
ipa: DEBUG: importing all plugin modules in '/usr/lib/python2.7/site-packages/ipalib/plugins'...
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/aci.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/automember.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/automount.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/baseldap.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/batch.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/cert.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/config.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/delegation.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/dns.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/group.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/hbacrule.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/hbacsvc.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/hbacsvcgroup.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/hbactest.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/host.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/hostgroup.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/idrange.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/idviews.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/internal.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/kerberos.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/krbtpolicy.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/migration.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/misc.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/netgroup.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/otpconfig.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/otptoken.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/otptoken_yubikey.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/passwd.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/permission.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/ping.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/pkinit.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/privilege.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/pwpolicy.py'
ipa: DEBUG: Starting external process
ipa: DEBUG: args='klist' '-V'
ipa: DEBUG: Process finished, return code=0
ipa: DEBUG: stdout=Kerberos 5 version 1.12.2

ipa: DEBUG: stderr=
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/radiusproxy.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/realmdomains.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/role.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/rpcclient.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/selfservice.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/selinuxusermap.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/service.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/sudocmd.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/sudocmdgroup.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/sudorule.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/user.py'
ipa: DEBUG: importing plugin module '/usr/lib/python2.7/site-packages/ipalib/plugins/virtual.py'
ipa.ipaserver.install.ipa_restore.Restore: INFO: Preparing restore from /var/lib/ipa/backup/ipa-data-2015-01-19-23-02-40 on ipa.mkosek-f21.test
ipa: DEBUG: Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index'
ipa.ipaserver.install.ipa_restore.Restore: INFO: Performing DATA restore from DATA backup
ipa.ipaplatform.base.tasks: DEBUG: group dirsrv exists
ipa.ipaplatform.base.tasks: DEBUG: user dirsrv exists
ipa: DEBUG: Starting external process
ipa: DEBUG: args='tar' '--xattrs' '--selinux' '-xzf' '/var/lib/ipa/backup/ipa-data-2015-01-19-23-02-40/ipa-data.tar' '.'
ipa: DEBUG: Process finished, return code=0
ipa: DEBUG: stdout=
ipa: DEBUG: stderr=
Restoring data will overwrite existing live data. Continue to restore? [no]: y
ipa.ipaserver.install.ipa_restore.Restore: INFO: Each master will individually need to be re-initialized or
ipa.ipaserver.install.ipa_restore.Restore: INFO: re-created from this one. The replication agreements on
ipa.ipaserver.install.ipa_restore.Restore: INFO: masters running IPA 3.1 or earlier will need to be manually
ipa.ipaserver.install.ipa_restore.Restore: INFO: re-enabled. See the man page for details.
ipa.ipaserver.install.ipa_restore.Restore: INFO: Disabling all replication.
ipa.ipapython.ipaldap.SchemaCache: DEBUG: flushing ldapi://%2fvar%2frun%2fslapd-MKOSEK-F21-TEST.socket from SchemaCache
ipa.ipapython.ipaldap.SchemaCache: DEBUG: retrieving schema for SchemaCache url=ldapi://%2fvar%2frun%2fslapd-MKOSEK-F21-TEST.socket conn=<ldap.ldapobject.SimpleLDAPObject instance at 0x7f0ba5a04098>
ipa: DEBUG: wait_for_open_ports: vm-089.idm.lab.bos.redhat.com [636] timeout 10
ipa.ipaserver.install.ipa_restore.Restore: CRITICAL: Unable to disable agreement on vm-089.idm.lab.bos.redhat.com: 
ipa.ipaserver.install.ipa_restore.Restore: DEBUG:   File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 171, in execute
    return_value = self.run()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_restore.py", line 349, in run
    self.disable_agreements()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_restore.py", line 464, in disable_agreements
    services = repl.conn.get_entries(master_dn,

ipa.ipaserver.install.ipa_restore.Restore: DEBUG: The ipa-restore command failed, exception: UnboundLocalError: local variable 'repl' referenced before assignment
ipa.ipaserver.install.ipa_restore.Restore: ERROR: local variable 'repl' referenced before assignment

Requested by downstream release.

master:

  • deb70d5 Do not crash when replica is unreachable in ipa-restore

ipa-4-1:

  • 74853b6 Do not crash when replica is unreachable in ipa-restore

Metadata Update from @mkosek:
- Issue assigned to jcholast
- Issue set to the milestone: FreeIPA 4.1.3

2 years ago

Login to comment on this ticket.

Metadata