[Freeipa-devel] [PATCH] 412 Remove entitlement support
Martin Kosek
mkosek at redhat.com
Thu Jun 27 14:56:54 UTC 2013
On 06/27/2013 12:32 PM, Jan Cholasta wrote:
> On 26.6.2013 14:03, Tomas Babej wrote:
>> On 06/19/2013 10:31 AM, Petr Vobornik wrote:
>>> On 06/19/2013 10:13 AM, Martin Kosek wrote:
>>>> Entitlements code was not tested nor supported upstream since
>>>> version 3.0. Remove the associated code.
>>>>
>>>> https://fedorahosted.org/freeipa/ticket/3739
>>>>
>>>> ----
>>>>
>>>> As agreed on Triage meeting, I plan to push this patch to ipa-3-2 and
>>>> master
>>>> branches.
>>>>
>>>> Martin
>>>>
>>>
>>>
>>> ACK on Web UI part.
>>
>> ACK on the IPA part
>>
>> Tomas
>>
>
> ipa-upgradeconfig fails for me when upgrading from version with entitlement
> plugin to version without entitlement plugin:
>
> 2013-06-26T22:22:43Z DEBUG /usr/sbin/ipa-upgradeconfig was invoked with
> options: {'debug': False, 'quiet': True}
> 2013-06-26T22:22:43Z DEBUG Loading Index file from
> '/var/lib/ipa/sysrestore/sysrestore.index'
> 2013-06-26T22:22:43Z DEBUG importing all plugin modules in
> '/usr/lib/python2.7/site-packages/ipalib/plugins'...
> <snip>
> 2013-06-26T22:22:43Z DEBUG importing plugin module
> '/usr/lib/python2.7/site-packages/ipalib/plugins/entitle.py'
> 2013-06-26T22:22:43Z DEBUG File
> "/usr/lib/python2.7/site-packages/ipaserver/install/installutils.py", line 614,
> in run_script
> return_value = main_function()
>
> File "/usr/sbin/ipa-upgradeconfig", line 872, in main
> api.finalize()
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 674, in
> finalize
> self.__do_if_not_done('load_plugins')
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 454, in
> __do_if_not_done
> getattr(self, name)()
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 613, in
> load_plugins
> self.import_plugins('ipalib')
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 655, in
> import_plugins
> __import__(fullname)
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugins/entitle.py", line 180,
> in <module>
> class entitle(LDAPObject):
>
> File "/usr/lib/python2.7/site-packages/ipalib/plugins/entitle.py", line 184,
> in entitle
> container_dn = api.env.container_entitlements
>
> 2013-06-26T22:22:43Z DEBUG The ipa-upgradeconfig command failed, exception:
> AttributeError: 'Env' object has no attribute 'container_entitlements'
>
> Honza
>
This happens because we run ipa-upgradeconfig in %post while there was still
entitlements plugin. I think that clean solution for this plugin (and also for
other future occurrences of this issue) is to run upgrade/server restart
process only in %posttrans.
In the end, I iterated to the attached patch. With this spec change, I was able
to upgrade from FreeIPA 3.2 to current master version without any entitlements
related upgrade error.
Adding Alexander and Rob to CC to double-check this upgrade-related change, I
want to be sure I didn't do something stupid.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-413-run-server-upgrade-and-restart-in-posttrans.patch
Type: text/x-patch
Size: 2810 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130627/acc31c15/attachment.bin>
More information about the Freeipa-devel
mailing list