#4668 ipa-restore crashes when ipa-server-trust-ad package is missing
Closed: Fixed None Opened 9 years ago by ksiddiqu.

Traceback on running "ipa-restore --help" and this occurs when ipa-server-trust-ad rpm not installed

IPA Version:
============
[root@dhcp207-187 ~]# rpm -q ipa-server
ipa-server-4.1.0-3.el7.x86_64
[root@dhcp207-187 ~]#

[root@dhcp207-187 ~]# ipa-restore --help
Traceback (most recent call last):
  File "/usr/sbin/ipa-restore", line 21, in <module>
    from ipaserver.install.ipa_restore import Restore
  File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_restore.py", line 40, in <module>
    from ipaserver.install import adtrustinstance
ImportError: cannot import name adtrustinstance
[root@dhcp207-187 ~]# rpm -q ipa-server-trust-ad
package ipa-server-trust-ad is not installed
[root@dhcp207-187 ~]#

Traceback not found when ipa-server-trust-ad is installed.

[root@dhcp207-187 ~]# rpm -q ipa-server-trust-ad
ipa-server-trust-ad-4.1.0-3.el7.x86_64
[root@dhcp207-187 ~]# ipa-restore --help
Usage: ipa-restore [options] backup

Restore IPA files and databases.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -p PASSWORD, --password=PASSWORD
                        Directory Manager password
  --gpg-keyring=GPG_KEYRING
                        The gpg key name to be used
  --data                Restore only the data
  --online              Perform the LDAP restores online, for data only.
  --instance=INSTANCE   The 389-ds instance to restore (defaults to all found)
  --backend=BACKEND     The backend to restore within the instance or
                        instances
  --no-logs             Do not restore log files from the backup
  -U, --unattended      Unattended restoration never prompts the user

  Logging and output options:
    -v, --verbose       print debugging information
    -d, --debug         alias for --verbose (deprecated)
    -q, --quiet         output only errors
    --log-file=FILE     log to the given file
[root@dhcp207-187 ~]#

Not only --help is affected:

# ipa-restore foo
Traceback (most recent call last):
  File "/usr/sbin/ipa-restore", line 21, in <module>
    from ipaserver.install.ipa_restore import Restore
  File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_restore.py", line 40, in <module>
    from ipaserver.install import adtrustinstance
ImportError: cannot import name adtrustinstance

Raising priority.

master:

  • a8e2a24 ipa-restore: Don't crash if AD trust is not installed

ipa-4-1:

  • d6b79a3 ipa-restore: Don't crash if AD trust is not installed

Metadata Update from @ksiddiqu:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 4.1.2

7 years ago

Login to comment on this ticket.

Metadata