#7896 ipa-server-upgrade fails with ConversionError: invalid 'cn': must be Unicode text
Closed: fixed by frenaud. Opened by frenaud.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1694596

Description of problem:
ipa-server-upgrade fails
Version-Release number of selected component (if applicable):
ipa-server-4.6.5-2.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. ipa-server-install --domain $DOMAIN --realm $REALM --setup-dns
--auto-forwarder --auto-reverse -a Secret123 -p Secret123 -U
2. ipa-server-upgrade
Actual results:
ipa-server-upgrade fails with:
[...]
[Create systemd-user hbac service and rule]
IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command
ipa-server-upgrade manually.
Unexpected error - see /var/log/ipaupgrade.log for details:
ConversionError: invalid 'cn': must be Unicode text
The ipa-server-upgrade command failed. See /var/log/ipaupgrade.log for more
information
Expected results:
ipa-server-upgrade should finish successfully
Additional info:
Extract of /var/log/ipaupgrade.log:
2019-04-01T08:25:08Z INFO [Create systemd-user hbac service and rule]
2019-04-01T08:25:08Z DEBUG raw: hbacsvc_add('systemd-user',
description='pam_systemd and systemd user@.service', version=u'2.230')
2019-04-01T08:25:08Z ERROR IPA server upgrade failed: Inspect
/var/log/ipaupgrade.log and run command ipa-server-upgrade manually.
2019-04-01T08:25:08Z DEBUG   File
"/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 178, in execute
    return_value = self.run()
  File
"/usr/lib/python2.7/site-packages/ipaserver/install/ipa_server_upgrade.py",
line 54, in run
    server.upgrade()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/upgrade.py",
line 2146, in upgrade
    upgrade_configuration()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/upgrade.py",
line 2033, in upgrade_configuration
    add_systemd_user_hbac()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/upgrade.py",
line 1697, in add_systemd_user_hbac
    description='pam_systemd and systemd user@.service'
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 450, in
__call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 471, in
__do_call
    params = self.convert(**params)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 672, in
convert
    (k, self.params[k].convert(v)) for (k, v) in kw.items()
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 672, in
<genexpr>
    (k, self.params[k].convert(v)) for (k, v) in kw.items()
  File "/usr/lib/python2.7/site-packages/ipalib/parameters.py", line 852, in
convert
    return convert(value)
  File "/usr/lib/python2.7/site-packages/ipalib/parameters.py", line 1571, in
_convert_scalar
    raise ConversionError(name=self.name, error=ugettext(self.type_error))
2019-04-01T08:25:08Z DEBUG The ipa-server-upgrade command failed, exception:
ConversionError: invalid 'cn': must be Unicode text
2019-04-01T08:25:08Z ERROR Unexpected error - see /var/log/ipaupgrade.log for
details:
ConversionError: invalid 'cn': must be Unicode text
2019-04-01T08:25:08Z ERROR The ipa-server-upgrade command failed. See
/var/log/ipaupgrade.log for more information

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

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.6.6

Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/2967

master:

  • d60122f9fba9fd9f74721763c4d5cf9f9f93986c ipa-server-upgrade: fix add_systemd_user_hbac

ipa-4-7:

  • 84197a03c764bfd66c91deb42f843662ec02582b ipa-server-upgrade: fix add_systemd_user_hbac

ipa-4-6:

  • 4c4d0841161b4cc774f2e4fe69531a7f144b2b2b ipa-server-upgrade: fix add_systemd_user_hbac

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

Metadata