Bug 31673 - Expired License breaks UMC App-Center module and UMC License Dialog
Expired License breaks UMC App-Center module and UMC License Dialog
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: License
UCS 3.1
All Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Stefan Gohmann
Lukas Walter
:
: 29741 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 12:11 CEST by Philipp Hahn
Modified: 2013-08-28 13:42 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-06-07 12:11:43 CEST
The Ad-Takeover-CloudFormation template has an expired License:

# univention-license-check 
Base DN: dc=ucscompany,dc=com
Checking searchpath... OK
Checking basedn    ... OK
Checking enddate   ... FAILED
Checking signature ... OK
Users:                       4 of        50... OK
Servers:                     1 of        50... OK
Managed Clients:             0 of        50... OK
Corporate Clients:           0 of        50... OK
DVS Users:                   0 of         0... OK
DVS Clients:                 0 of         0... OK
Has expired on: 2013-05-31                  -- EXPIRED

Opening UMC → wheel -> License shows the following message:
> Notification
> Updating the license information has failed
After that the dialog box to upload a new license is shown

Opening the UMC → App-Center shows the following message:
> Notification
> Could not fulfill the request.
> Server error message:
> The command has failed: Could not query App Center: <urlopen error [Errno -2] Name or service not known>
After that the Apps-list is empty.

management-console-module-appcenter.log:
07.06.13 11:20:13.343  DEBUG_INIT
07.06.13 11:20:34.430  MODULE      ( PROCESS ) : The command has failed: Could not query App Center: <urlopen error [Errno -2] Name or service not known>
07.06.13 11:30:31.023  MAIN        ( WARN    ) : Shutting down all open connections
07.06.13 12:05:06.033  DEBUG_INIT
Comment 1 Philipp Hahn univentionstaff 2013-06-10 08:16:20 CEST
(In reply to Philipp Hahn from comment #0)
> 07.06.13 11:20:34.430  MODULE      ( PROCESS ) : The command has failed:
> Could not query App Center: <urlopen error [Errno -2] Name or service not
> known>

That was a 2nd problem with the DNS configuration of that EC2 instance. The DNS resolve error should be caught and translated to a proper user understandable error message.

The problem with expired licenses is probably a duplicate of Bug #29741.
Comment 2 Stefan Gohmann univentionstaff 2013-08-27 07:31:25 CEST
*** Bug 29741 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Gohmann univentionstaff 2013-08-27 07:51:44 CEST
The problem is the way in which the license module works. The module uses the C lib to load the license. If the license is invalid the C lib does not return the license values. There was already code for this case. Now I changed it that all values are loaded.

Code 3.1-1: r43456
YAML 3.1-1: r43459
Code 3.2: r43457
Changelog 3.2: r43458
Comment 4 Stefan Gohmann univentionstaff 2013-08-27 14:23:33 CEST
3.1-1 Update: r43475
3.2-0 Update: r43474
3.2-0 YAML: r43478
Comment 5 Lukas Walter univentionstaff 2013-08-27 17:12:51 CEST
Seems to be working with v2 licenses, but not with v1:
======================================================
dn: cn=admin,cn=license,cn=univention,dc=ucs,dc=devTraceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 128, in wrapper_func
    _licenseCheck = univention.admin.license.init_select(lo, 'admin')
  File "/usr/lib/pymodules/python2.6/univention/admin/license.py", line 317, in init_select
    self.select( module, lo )
  File "/usr/lib/pymodules/python2.6/univention/admin/license.py", line 178, in select
    self.set_values(lo, module)
  File "/usr/lib/pymodules/python2.6/univention/admin/license.py", line 263, in set_values
    self.__readLicense()
  File "/usr/lib/pymodules/python2.6/univention/admin/license.py", line 425, in __readLicense
    self.version = self.__getValue( 'univentionLicenseVersion', '1', 'Version', None)
  File "/usr/lib/pymodules/python2.6/univention/admin/license.py", line 414, in __getValue
    value = self.searchResult[0][1].get( key )[0]
TypeError: 'NoneType' object is unsubscriptable


License used:
=============
objectClass: top
objectClass: univentionLicense
univentionLicenseEndDate: 23.08.2013
univentionLicenseModule: admin
cn: admin
univentionLicenseBaseDN: dc=ucs,dc=dev
univentionLicenseAccounts: 1000
univentionLicenseClients: 1000
univentionLicenseGroupwareAccounts: 1000
univentionLicenseuniventionDesktops: 1000
univentionLicenseType: UCS
univentionLicenseSignature: rBK708Wp1m/Y1r4ftt5MyobcOzlsa937xvWZ+88v8GzfoNk0ACEOk9bjmivxP+l8JgEueGMd+DgMK6cs+BUprETDApcWUU+2YKd11jT1GnS+vdazXdO9PIeP0PZN72NwMAXPsiRZUIvRERdpstuUUzl2Ugy8gK5Uz6xJVxKJEnwKlzyoEYbaR3/kH/51Iw16wkO+IxopUUTVjLhbYjS+p8t6gNFOUkaiezfw62lzxy9ZEnjeyUNnw993rup15J7NFs4rGAhnbVdSMUqgmt+2p8Q7S3rNlhyIAQawDCR4kTzdpVQN39A/PexECOAx8WZI4YMeo8FI4xcbALAo1+outA==
Comment 6 Stefan Gohmann univentionstaff 2013-08-27 20:59:21 CEST
(In reply to Lukas Walter from comment #5)
> Seems to be working with v2 licenses, but not with v1:

Should be fixed with:

3.1-1 Update: r43491
3.2-0 Update: r43492
3.2-0 YAML: r43493
Comment 7 Lukas Walter univentionstaff 2013-08-28 10:10:32 CEST
functionality: (3.1-1, 3.2-0): OK
changelog 3.2: ok
YAML: ok
Comment 8 Moritz Muehlenhoff univentionstaff 2013-08-28 13:42:11 CEST
http://errata.univention.de/ucs/3.1/174.html