Bug 44719 - Incompatible change in UCS 4.2 causes that 4.1 appliances cannot join UCS 4.2 systems
Incompatible change in UCS 4.2 causes that 4.1 appliances cannot join UCS 4.2...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-31 17:04 CEST by Florian Best
Modified: 2017-07-17 13:23 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017053121000371, 2017053121000559,
Bug group (optional): Appliance
Max CVSS v3 score:
best: Patch_Available+


Attachments
Screenshot (23.69 KB, image/jpeg)
2017-05-31 17:04 CEST, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-05-31 17:04:03 CEST
Created attachment 8890 [details]
Screenshot

If a UCS 4.2 DC Master is installed and you want to install a UCS 4.1 Appliance it is impossible to join into the UCS 4.2 domain.

The appliance dialog then shows the following error message (the screenshot):

Authentication failed: {"status": 406, "message": "Specified locale is not available", "location": "https://****/univention/auth"}

The old UMC library in UCS 4.1 doesn't send any Accept-Language header along with the request while the UCS 4.2 server expects one.

Fix:
diff --git a/management/univention-management-console/univention-management-console-web-server b/management/univention-management-console/univention-management-console-web-server
index 818cc1b..ded528b 100755
--- a/management/univention-management-console/univention-management-console-web-server
+++ b/management/univention-management-console/univention-management-console-web-server
@@ -808,7 +808,7 @@ class CPgeneric(Ressource):
 »   »   »   languages = []
 
 »   »   # pre parse the HTTP syntax so that the UMC-Server doesn't need to do this (because there are no utility functions there)
-»   »   request.headers['Accept-Language'] = ', '.join(languages)
+»   »   request.headers['Accept-Language'] = ', '.join(languages) or 'en-US'
 
 
 class CPGet(CPgeneric):
Comment 1 Florian Best univentionstaff 2017-05-31 17:06:53 CEST
Additionally the UCS 4.2 systems needs to disable the security checks (UCR umc/server/disable-security-restrictions) otherwise a traceback is shown in UMC:

Version: 4.1-3 errata239 (Vahr)

Die Ausführung des Kommandos setup/check/license wizard ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 774, in domain_has_activated_license
    return util.domain_has_activated_license(nameserver, username, password)
  File "%PY2.7%/univention/management/console/modules/setup/util.py", line 1043, in domain_has_activated_license
    result = connection.request('udm/license/info')
  File "%PY2.7%/univention/lib/umc_connection.py", line 142, in request
    raise NotImplementedError('command forbidden: %s' % url)
NotImplementedError: command forbidden: udm/license/info
Comment 2 Erik Damrose univentionstaff 2017-05-31 17:23:59 CEST
Is that restricted to ucs 4.1 appliances, or any ucs 4.1 system that wants to join into a ucs 4.2 master during system setup?
Comment 3 Florian Best univentionstaff 2017-05-31 17:37:09 CEST
(In reply to Erik Damrose from comment #2)
> Is that restricted to ucs 4.1 appliances, or any ucs 4.1 system that wants
> to join into a ucs 4.2 master during system setup?
It's only because the app appliances try to check if the master has a valid license installed.
Comment 4 Johannes Keiser univentionstaff 2017-07-03 15:46:46 CEST
(In reply to Florian Best from comment #0)
> diff --git
> a/management/univention-management-console/univention-management-console-web-
> server
> b/management/univention-management-console/univention-management-console-web-
> server
> index 818cc1b..ded528b 100755
> ---
> a/management/univention-management-console/univention-management-console-web-
> server
> +++
> b/management/univention-management-console/univention-management-console-web-
> server
> @@ -808,7 +808,7 @@ class CPgeneric(Ressource):
>  »   »   »   languages = []
>  
>  »   »   # pre parse the HTTP syntax so that the UMC-Server doesn't need to
> do this (because there are no utility functions there)
> -»   »   request.headers['Accept-Language'] = ', '.join(languages)
> +»   »   request.headers['Accept-Language'] = ', '.join(languages) or 'en-US'
>  
>  
>  class CPGet(CPgeneric):

Applied patch:

r 80791
univention-management-console (9.0.80-53) 
* Bug #44719: Applied patch from Florian Best - Fix UCS 4.1 appliances
not being able to join UCS 4.2 systems.

YAML: r 80792
Comment 5 Florian Best univentionstaff 2017-07-03 17:44:02 CEST
OK: HTTP requests without Accept-Language header uses english language
OK: license request with old library
OK: YAML (adjusted in r80805)
Comment 6 Janek Walkenhorst univentionstaff 2017-07-05 13:06:38 CEST
<http://errata.software-univention.de/ucs/4.2/81.html>