Bug 2151607 - zezere doesn't implement defaults for config settings, so newly-added settings must be added to existing configs or it will break (e.g. secure_cookie)
Summary: zezere doesn't implement defaults for config settings, so newly-added setting...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: zezere
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Whalen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-07 15:52 UTC by Geoffrey Marr
Modified: 2023-11-23 20:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-23 20:40:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
openQA zezere traceback (60.37 KB, image/png)
2022-12-07 15:52 UTC, Geoffrey Marr
no flags Details

Description Geoffrey Marr 2022-12-07 15:52:14 UTC
Created attachment 1930833 [details]
openQA zezere traceback

Description of problem:
F37 IoT openQA tests of zezere have been failing for a few weeks due to zezere-manage looking for a field named "secure_key", when it should be named "secure_cookie". It seems that the failure started around the 20221118.0 compose and has been failing since. See attached image for traceback from openQA test.


Version-Release number of selected component (if applicable):
F37 IoT aarch64 and x86_64 20221118 to 20221207

Comment 1 Geoffrey Marr 2022-12-07 15:52:57 UTC
Link to latest openQA failure: [0]

[0] https://openqa.fedoraproject.org/tests/1633182#

Comment 2 Peter Robinson 2022-12-07 19:23:20 UTC
Are you not sure that's not the other way around? Grepping the code we've no mention of secure_key but do secure_cookie:

[perobins@localhost zezere (main %)]$ grep -R secure_key
[perobins@localhost zezere (main %)]$ grep -R secure_cookie
zezere/settings.py:SESSION_COOKIE_SECURE = getboolean("global", "secure_cookie", "SECURE_COOKIE")
zezere/default.conf:secure_cookie = yes

I wonder if the version of django changed in Fedora and something changed there, can you verify?

Comment 3 Adam Williamson 2022-12-09 22:48:25 UTC
Just for the record - the test that's failing here is the server end of the zezere tests, where we're ultimately checking that we can 'claim' a fresh IoT install. All the server end stuff does not actually run on the compose under test, though, since zezere *server* functionality isn't part of IoT's feature set. The server end stuff just runs on a minimal RPM install of "current Fedora", whatever current Fedora is when the test runs. This test started failing when Fedora 37 was released and our "current Fedora" became 37 instead of 36, so this test started running on 37 not 36. So deploying a zezere server works on F37 but not F36; we can't tell any more precisely than that when it broke, from the openQA results.

Comment 4 Adam Williamson 2023-03-02 20:02:44 UTC
So the current state is that deploying zezere on F37 is still failing, and it is because it's looking for `secure_cookie`:

No option 'secure_cookie' in section: 'global'

Comment 5 Adam Williamson 2023-03-02 20:05:14 UTC
This doesn't seem to involve django, AFAICS this is all internal to zezere, it's reading its own config file here.

Comment 6 Adam Williamson 2023-03-02 20:52:08 UTC
OK, so poking about a bit, this is probably just an issue in the openQA tests. In the openQA tests we run our own zezere server because we don't want to rely on the public one (it makes the tests a bit unpredictable). So there's a dedicated test just for running a zezere server, and it sets up its own config file. That config file doesn't have 'secure_cookie' in it (because when I wrote the test that setting didn't exist at all, it was added in 9bd7b170c8d5baa5c174f06616adae25639a600c ).

It might be nice if zezere's config handling could use defaults for values that aren't set in the config file at all, rather than requiring things to be explicitly set, e.g. by doing `parser["global"]["secure_cookie"] = "yes"` (and similar for other expected values) before reading the config file. Or, it seems like the intent is *kind of* that the `default.conf` file should provide defaults (it seems like settings_external.py expects to find it in the same directory as itself?), but it's not actually installed as part of the zezere package, so maybe it should be?

But I can easily enough update the test's config to include the required setting to resolve the immediate problem.

Comment 7 Peter Robinson 2023-03-03 08:48:38 UTC
We're doing a pretty big rewrite so we should address it then, would be great to have an upstream bug report with the details so it's not lost.

Comment 8 Aoife Moloney 2023-11-23 00:43:07 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Adam Williamson 2023-11-23 20:40:47 UTC
https://github.com/fedora-iot/zezere/issues/138

let's just track this upstream.


Note You need to log in before you can comment on or make changes to this bug.