Univention Bugzilla – Bug 52814
During upgrade to UCS 5.0: AttributeError: 'IPv4Interface' object has no attribute 'masked'
Last modified: 2023-05-02 18:06:45 CEST
The updater.log contains these tracebacks during upgrade of univention-base-files: Traceback (most recent call last): File "<stdin>", line 16, in <module> AttributeError: 'IPv4Interface' object has no attribute 'masked' Traceback (most recent call last): File "<stdin>", line 16, in <module> AttributeError: 'IPv4Interface' object has no attribute 'masked' Traceback (most recent call last): File "<stdin>", line 30, in <module> AttributeError: 'IPv4Interface' object has no attribute 'prefixlen' Full log in attachment 10626 [details]. This comes from the UCR templates: services/univention-printserver/conffiles/etc/cups/cupsd.conf.d/01cupsd-base: print(' Allow From %s' % (iface.ipv4_address().masked().with_netmask,)) services/univention-printserver/conffiles/etc/cups/cupsd.conf.d/01cupsd-base: print(' Allow From %s' % (iface.ipv4_address().masked().with_netmask,)) and: services/univention-squid/conffiles/etc/squid/squid.conf: return (str(ip.network_address), ip.prefixlen) services/univention-squid/conffiles/etc/squid/squid.conf: myNetworks[str(ipv4_address.network)] = ipv4_address.prefixlen services/univention-squid/conffiles/etc/squid/squid.conf: myNetworks.update({str(ip.network): ip.prefixlen for ip in ipv6_addresses if ip}) Currently I am unsure how to solve this.
Keep it simple by just making the templates forward-compatible. No merge to UCS 5 necessary. univention-squid.yaml 37ee8e7261f1 | YAML Bug #52814 univention-squid (12.0.2-2) 957723506f7a | Bug #52814: make UCR template compatible with UCS 5.0/Python 3 univention-printserver.yaml 37ee8e7261f1 | YAML Bug #52814 univention-printserver (12.0.1-17) ef2b987b3ece | Bug #52814: make UCR template compatible with UCS 5.0/Python 3
Fixed a problem in squid.conf: [4.4-7 f1a27dfed3] Bug #52814: fix double netmask e.g. 1.2.3.4/24/24 [4.4-7 c1e597301f] Bug #52814: yaml What I tested: with python2 (on a ucs4 system) and python3 (python3 on a ucs5 system) "ucr commit /etc/cups/cupsd.conf /etc/squid/squid.conf" -> OK yaml -> OK jenkins -> OK -> verified
<https://errata.software-univention.de/#/?erratum=4.4x923> <https://errata.software-univention.de/#/?erratum=4.4x924>