Bug 50109 - 03_ucr/63checkucrwarning does not work at all since UCS-3.0
03_ucr/63checkucrwarning does not work at all since UCS-3.0
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UCR
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.4-1
Assigned To: Philipp Hahn
Felix Botner
:
Depends on: 23527
Blocks: 50112 50176 50110 50111
  Show dependency treegraph
 
Reported: 2019-09-05 12:42 CEST by Philipp Hahn
Modified: 2023-03-25 06:51 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
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 2019-09-05 12:42:12 CEST
Broken since ucs-3.0/ucs@33528 = git:a45114fe26a23f7eb0ab70ba661e8c88970f77ea

test/ucs-test/tests/03_ucr/63checkucrwarning:
   11 from univention.debhelper import parseRfc822
...
   53 »···for section in parseRfc822(data):                                                                                                                                                                                                                                    
   54 »···»···if section['Type'] == 'file':

base/univention-config-registry/python/univention/debhelper.py:
 77 def parseRfc822(f):
 78 »···# type: (str) -> List[Dict[str, List[str]]]
                                        ^^^^^   ^

After that:

Traceback (most recent call last):
  File "./63checkucrwarning", line 55, in <module>
    fn = '/%{File}s' % section
ValueError: unsupported format character '{' (0x7b) at index 2

After that:
 to-be-ignored:
  Error: Missing UCR header for /etc/docker/seccomp-systemd.json
  Error: Missing UCR header for /var/www/univention/languages.json
  Error: Missing UCR header for /usr/share/univention-web/js/umc/hooks.json
  Error: Missing UCR header for /etc/univention/directory/reports/default/de_DE/header.rml
  Error: Missing UCR header for /usr/share/univention-management-console/i18n/de/apps.mo
  Error: Missing UCR header for /etc/univention/directory/reports/default/en_US/footer.rml
  Error: Missing UCR header for /etc/univention/directory/reports/default/de_DE/footer.rml
  Error: Missing UCR header for /etc/univention/directory/reports/default/en_US/header.rml
  Error: Missing UCR header for /etc/listfilter.secret
  Error: Missing UCR header for /usr/share/univention-management-console/meta.json
  Error: Missing UCR header for /etc/welcome.msg
  Error: Missing UCR header for /usr/share/univention-portal/apps.json
 real bugs:
  Error: Missing UCR header for /etc/runit/univention-directory-listener/run
  Error: Missing UCR header for /etc/apache2/ucs-sites.conf.d/ucs-sites.conf
  Error: Missing UCR header for /etc/nagios-plugins/config/univention-samba.cfg
  Error: Missing UCR header for /etc/nagios-plugins/config/univention-s4-connector.cfg
Comment 1 Philipp Hahn univentionstaff 2019-09-05 13:07:10 CEST
[4.4-1] 5d663f5653 Bug #50109 test: Fix 03_ucr/63checkucrwarning
 test/ucs-test/debian/changelog               |  6 +++
 test/ucs-test/tests/03_ucr/63checkucrwarning | 66 ++++++++++++++++++----------
 2 files changed, 48 insertions(+), 24 deletions(-)

Package: ucs-test
Version: 9.0.3-41A~4.4.0.201909051253
Branch: ucs_4.4-0
Scope: errata4.4-1

QA: There might be more files missing the UCR header - lets wait for one Jenkins run next night and then add those files to the IGNORE list for now until the bug is fixed. I did that for the known issues and filed

>  Error: Missing UCR header for /etc/runit/univention-directory-listener/runBug #50110

>  Error: Missing UCR header for /etc/apache2/ucs-sites.conf.d/ucs-sites.confBug #50111

>  Error: Missing UCR header for /etc/nagios-plugins/config/univention-samba.cfg
>  Error: Missing UCR header for /etc/nagios-plugins/config/univention-s4-connector.cfgBug #50112
Comment 2 Philipp Hahn univentionstaff 2019-09-06 10:03:31 CEST
One more round - fails on missing files:
> Traceback (most recent call last):
>   File "63checkucrwarning", line 80, in <module>
>     with open(fn, 'r') as f:
> IOError: [Errno 2] No such file or directory: '/var/lib/univention-ldap/ldap/DB_CONFIG'

[4.4-1] 90c0e53710 Bug #50098 test: Fix 03_ucr/68check_univention-service.py
 test/ucs-test/debian/changelog               |  6 ++++++
 test/ucs-test/tests/03_ucr/63checkucrwarning |  8 +++++--
 test/ucs-test/tox.ini                        | 32 ++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)

Package: ucs-test
Version: 9.0.3-43A~4.4.0.201909061002
Branch: ucs_4.4-0
Scope: errata4.4-1
Comment 3 Felix Botner univentionstaff 2019-10-21 10:51:28 CEST
OK, test passes