Bug 45586 - join-script 79univention-printserver.inst failes after update to 4.2-2 in a memberserver
join-script 79univention-printserver.inst failes after update to 4.2-2 in a m...
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: Printserver
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Julia Bremer
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-24 12:30 CEST by Christina Scheinig
Modified: 2023-03-25 06:40 CET (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017102421000133
Bug group (optional):
Max CVSS v3 score:


Attachments
mark_models_as_deprecated.patch (706 bytes, patch)
2017-10-24 12:34 CEST, Felix Botner
Details | Diff
patch (2.13 KB, patch)
2017-10-24 15:34 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2017-10-24 12:30:34 CEST
The customer reported, the 79univention-printserver.inst failes after update to 4.2-2 on a memberserver with printserver installed caused by the following traceback.


WARNING: cannot append ['foomatic-rip/Panasonic-DP-C265-pxlcolor.ppd', 'Panasonic DP-C265 Foomatic/pxlcolor (recommended)'] to printmodel, value exists
No modification: cn=Panasonic,cn=cups,cn=univention,o=landtag,c=de
Traceback (most recent call last):
  File "/usr/lib/univention-printserver/univention-ppds/mark_models_as_deprecated.py", line 149, in <module>
    upm = UpdatePrinterModels(options, args)
  File "/usr/lib/univention-printserver/univention-ppds/mark_models_as_deprecated.py", line 48, in __init__
    self.ldap_connection()
  File "/usr/lib/univention-printserver/univention-ppds/mark_models_as_deprecated.py", line 54, in ldap_connection
    self.co = univention.admin.config.config()
  File "/usr/lib/pymodules/python2.7/univention/admin/config.py", line 40, in __init__
    base = univention.admin.uldap.getBaseDN(host)
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 132, in getBaseDN
    result = lo.search_s('', ldap.SCOPE_BASE, 'objectClass=*', ['NamingContexts'])
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 559, in search_s
    return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 918, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 865, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 839, in reconnect
    raise e
ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server"}
Comment 1 Christina Scheinig univentionstaff 2017-10-24 12:31:45 CEST
UCS: 4.2-2 errata203
App Center compatibility: 4
Installed: cups=1.7.5 samba-memberserver=4.6
Comment 2 Felix Botner univentionstaff 2017-10-24 12:34:20 CEST
Created attachment 9259 [details]
mark_models_as_deprecated.patch

univention.admin.config.config() uses localhost as default for ldap server. This does not work on member servers.

We have to fix this in mark_models_as_deprecated.py by calling config with host=ucr.get('ldap/master')
Comment 3 Florian Best univentionstaff 2017-10-24 12:54:41 CEST
(In reply to Felix Botner from comment #2)
> Created attachment 9259 [details]
> mark_models_as_deprecated.patch
> 
> univention.admin.config.config() uses localhost as default for ldap server.
> This does not work on member servers.
> 
> We have to fix this in mark_models_as_deprecated.py by calling config with
> host=ucr.get('ldap/master')
We should remove self.co completely instead. It is unused in UDM. See Bug #27804.
Comment 4 Stephan Hendl 2017-10-24 13:07:46 CEST
(In reply to Felix Botner from comment #2)
> Created attachment 9259 [details]
> mark_models_as_deprecated.patch
> 
> univention.admin.config.config() uses localhost as default for ldap server.
> This does not work on member servers.
> 
> We have to fix this in mark_models_as_deprecated.py by calling config with
> host=ucr.get('ldap/master')

Thanks a lot, patch worked for me!
Comment 5 Florian Best univentionstaff 2017-10-24 15:34:57 CEST
Created attachment 9260 [details]
patch
Comment 6 Julia Bremer univentionstaff 2018-11-27 12:18:24 CET
The code lines that caused the problem seem to have been removed and edited, to match the attached patch.
Comment 7 Christina Scheinig univentionstaff 2018-11-27 12:21:32 CET
Why is this bug marked as resolved worksforme?
Comment 8 Julia Bremer univentionstaff 2018-11-27 13:51:53 CET
The problem has been resolved by commit  
f8c434e2fe6
See Bug #47062
Comment 9 Arvid Requate univentionstaff 2018-11-28 19:03:20 CET
Verified:
* Since Bug #47062 has been fixed the error is not reproducable.