diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-19 13:54:26 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-07-23 19:18:40 +0200 |
commit | 43e0c4bc01330d67c986b2f5863f0ca48ec2b87c (patch) | |
tree | d478ebcf4176eeda9106c99e577bea0bcbeb8b16 /smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py | |
parent | c2cc60cab8f3dd9e11419849ae76b7e33d6948b6 (diff) | |
download | vyos-1x-43e0c4bc01330d67c986b2f5863f0ca48ec2b87c.tar.gz vyos-1x-43e0c4bc01330d67c986b2f5863f0ca48ec2b87c.zip |
wireless: T6597: improve hostapd startup and corresponding smoketests
This was found during smoketesting as thoase started to repeadingly fail in the last weeks
File "/usr/libexec/vyos/tests/smoke/cli/test_interfaces_wireless.py", line 534, in test_wireless_security_station_address
self.assertTrue(process_named_running('hostapd'))
AssertionError: None is not true
Digging into this revealed that this is NOT related to the smoketest coding but
to hostapd/systemd instead. With a configured WIFI interface and calling:
"sudo systemctl reload-or-restart hostapd@wlan1" multiple times in a short
period caused systemd to report:
"Jul 18 16:15:32 systemd[1]: hostapd@wlan1.service: Deactivated successfully."
According to the internal systemd logic used in our version this is explained by:
/* If there's a stop job queued before we enter the DEAD state, we shouldn't act on Restart=, in order to not
* undo what has already been enqueued. */
if (unit_stop_pending(UNIT(s)))
allow_restart = false;
if (s->result == SERVICE_SUCCESS)
s->result = f;
if (s->result == SERVICE_SUCCESS) {
unit_log_success(UNIT(s));
end_state = SERVICE_DEAD;`
Where unit_log_success() generates the log message in question.
Improve the restart login in the wireless interface script and an upgrade to
hostapd solved the issue.
(cherry picked from commit a67f49d99eda00998c425f9a663e138dbd0f7755)
Diffstat (limited to 'smoketest/scripts/cli/test_service_monitoring_zabbix-agent.py')
0 files changed, 0 insertions, 0 deletions