inverse-inc / packetfence

PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful BYOD management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.
https://packetfence.org
GNU General Public License v2.0
1.39k stars 291 forks source link

tests: maintenance/13.0 security_event_suricata looks broken on inline tests for el8 #8130

Open JeGoi opened 7 months ago

JeGoi commented 7 months ago

Describe the problem

TASK [Run Venom testsuites] ****************************************************
Wednesday 01 May 2024  08:45:57 -0400 (0:00:01.231)       0:00:40.799 ********* 
changed: [pfel8dev] => (item=configurator_inline)
changed: [pfel8dev] => (item=inline/l3)
changed: [pfel8dev] => (item=inline/l3/teardown)
changed: [pfel8dev] => (item=inline/l2)
changed: [pfel8dev] => (item=inline/l2/teardown)
make[1]: *** [Makefile:32: run] Terminated
make: *** [Makefile:161: inline_el8] Terminated
$ JOB_STATUS=$EXIT_CODE timeout ${PIPELINE_TIMEOUT_CLEANUP} ${TESTCIDIR}/clean-test-environment.sh
========================================================================

Mandatory informations

Symptoms How the problem can be identified if it appears again ? Yes

JeGoi commented 7 months ago
May  1 19:19:25.942^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable inline_l3.pf_portal: 192.168.1.1
May  1 19:19:25.942^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable get_node01_current_ip.: map[:map[result:map[pf_api_nodes_search_mac_address_online_:{"items":[{"ip4log.ip":"192.168.3.10"}],"prevCursor":0,"status":200}]] __len__:1 __len__json:1 __type__:Map json:map[result:map[pf_api_nodes_search_mac_address_online_:{"items":[{"ip4log.ip":"192.168.3.10"}],"prevCursor":0,"status":200}]] result:map[pf_api_nodes_search_mac_address_online_:{"items":[{"ip4log.ip":"192.168.3.10"}],"prevCursor":0,"status":200}] result.__len__:1 result.__len__json:1 result.__type__:Map result.pf_api_nodes_search_mac_address_online_:{"items":[{"ip4log.ip":"192.168.3.10"}],"prevCursor":0,"status":200} result.pf_api_nodes_search_mac_address_online_json:map[items:[map[ip4log.ip:192.168.3.10]] prevCursor:0 status:200] resultjson:map[pf_api_nodes_search_mac_address_online_:{"items":[{"ip4log.ip":"192.168.3.10"}],"prevCursor":0,"status":200}]]
May  1 19:19:25.942^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable wired_dot1x_eap_tls_scep.profiles.wired.filters.connection_sub_type: EAP-TLS
May  1 19:19:25.942^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable venom.testsuite: Create event in fifo
May  1 19:19:25.942^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable dot1x_eap_peap.sources.ad_machine.name: dot1x_eap_peap_machine_auth
May  1 19:19:25.943^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mRunning testcase with variable wired_dot1x_eap_tls_pki.certs.organisation: Inverse
May  1 19:19:26.057^[[36m [INFO] [Create event in fifo] [create_suricata_event_in_fifo] ^[[0mStep #0 content is: "{\"script\":\"echo \\\"04/18/2018-10:48:17.643084 [**] [1:2002878:7] ET POLICY iTunes User Agent [**] [Classification: Potential Corporate Privacy Violation] [Priority: 1] {TCP} 192.168.3.10:52801 -\\u003e 165.254.0.105:80\\\" \\u003e /usr/local/pf/var/suricata\",\"type\":\"exec\"}"
May  1 19:19:26.059^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] [exec] ^[[0mwork with tmp file /tmp/venom-163799725
May  1 19:19:26.059^[[37m [DEBU] [Create event in fifo] [create_suricata_event_in_fifo] [exec] ^[[0mteststep exec '/bin/sh /tmp/venom-163799725'

Weird... No timeout.

JeGoi commented 7 months ago

It looks like it is related to the multilines section and check about service restarted: https://github.com/inverse-inc/packetfence/blob/devel/t/venom/lib/systemctl_service_status.yml#L16 which is really bad...

JeGoi commented 7 months ago

It should be like that: https://github.com/inverse-inc/packetfence/blob/feature/INV-41/t/venom/lib/systemctl_service_status.yml#L16