#6861 uninstall ipa client automount failed with RuntimeWarning
Closed: fixed 7 years ago Opened 7 years ago by gkaihoro.

When trying to uninstall automount client setting on the ipa-client its failing with RuntimeWarning.

:: [ BEGIN ] :: uninstall ipa client automount :: actually running 'ipa-client-automount --uninstall -U'
/usr/lib/python2.7/site-packages/ipaplatform/base/services.py:195: RuntimeWarning: RedHatService('sssd', api=None) is deprecated.
super(SystemdService, self).init(service_name, api=api)
Restoring configuration
Unable to restore SSSD configuration: 'Env' object has no attribute 'realm'
:: [ PASS ] :: uninstall ipa client automount (Expected 0, got 0)
:: [ BEGIN ] :: Restarting automount to fetch updated configuration :: actually running 'service autofs restart'
Redirecting to /bin/systemctl restart autofs.service
:: [ PASS ] :: Restarting automount to fetch updated configuration (Expected 0, got 0)
:: [ BEGIN ] :: Removed automount key :: actually running 'ipa automountkey-del direct_map_21468 auto.direct --key=/direct_map_21468/'
ipa: ERROR: Major (851968): Unspecified GSS failure. Minor code may provide more information, Minor (39756044): Credential cache is empty
:: [ FAIL ] :: Removed automount key (Expected 0, got 1)
:: [ BEGIN ] :: Removed automount location :: actually running 'ipa automountlocation-del direct_map_21468'
ipa: ERROR: Major (851968): Unspecified GSS failure. Minor code may provide more information, Minor (39756044): Credential cache is empty
:: [ FAIL ] :: Removed automount location (Expected 0, got 1)
'c91287af-23c1-43d2-bcf3-efc151d69096'
autofs-functional-test-offline-direct-map result: FAIL


There are three problems

  • root_logger.debug() in except clause is not called with exc_info=True. As a consequence the traceback of any failure is not logged. It makes it really hard understand the root cause of failures.
  • services.service('sssd') must be services.service('sssd', api=api) where api is an initialized ipalib.api object.
  • wait_for_sssd() requires an initialized ipalib.api but uninstall does not initialize the API (error: AttributeError: 'Env' object has no attribute 'realm')

Thanks Christian for the analysis. It is not very clear from the bug report what is happening and what is expected. So far the biggest issue seems to be the issue in wait_for_sssd() which causes failure of the script.

Petr,

the runtime warning is a red herring and not related to the bug at all. wait_for_sssd() is the root cause of the problem. Missing api argument to services.service('sssd') emits the runtime warning. Missing exc_info=True makes it harder to debug and understand the root cause.

Seems to be caused by https://pagure.io/freeipa/c/2d4d1a9dc0ef2bbe86751768d6e6b009a52c0dc9

IMO we should remove the wait_for_sssd() call. I don't see a reason why uninstaller should wait for restart of SSSD. Maybe, just in automation something subsequent might depend on it. But that is a problem of the other script.

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1445432

7 years ago

Metadata Update from @pvoborni:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1445432

7 years ago

Metadata Update from @pvoborni:
- Issue assigned to pvoborni

7 years ago

Metadata Update from @pvoborni:
- Custom field on_review adjusted to https://pagure.io/freeipa/issue/6861
- Issue priority set to: critical
- Issue set to the milestone: FreeIPA 4.5.1
- Issue tagged with: regression

7 years ago

Metadata Update from @pvoborni:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/735 (was: https://pagure.io/freeipa/issue/6861)

7 years ago

master:

  • b4e447f automount install: fix checking of SSSD functionality on uninstall

ipa-4-5:

  • ff513d6 automount install: fix checking of SSSD functionality on uninstall

Metadata Update from @mbasti:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

7 years ago

Log in to comment on this ticket.

Metadata