OVS statistic collectd plugin tests.
Test Environment details:
- Bare Metal, Ubuntu 16.04.1 LTS
- Kernel version: 4.4.0-43-generic
Repo/branch used:
- collectd/master
Tests precondition:
OVS version - 2.5.2.
OpenvSwitch configuration:
- Start ovs: service openvswitch-switch start
- Add new bridge: ovs-vsctl add-br br0
- Allow connection to ovsdb-server: ovs-vsctl set-manager ptcp:6640
Ovs_stat configuration:
- Open collectd config file: vim /install_folder/etc/collectd.conf
- Uncomment LoadPlugin "ovs_stat" fields.
- Set up IP address, port, bridges (Address/port or OVS DB Socket):
- <Plugin ovs_stats>
- Port "6640"
- Address "127.0.0.1"
- Socket "/var/run/openvswitch/db.sock"
- Bridges "br0"
Table #1. OVS statistics collectd plugin tests results.
# | Test summary | Steps | Actual result | Expected result | Status - PASS/FAIL | Automated status | Comments |
---|---|---|---|---|---|---|---|
1 | Verify user can setup simple configuration for ovs_stat plugin. | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Navigate to: /tmp/hostname_folder/ 3. Check that separate files for all available interface monitoring statistic are present in folder : ls /ovs_stats-br0.br0 | Folder "ovs_stats-br0.br0" was created Collecd started. | Folder "ovs_stats-br0.br0" was created Collecd started. | PASS | Yes | |
2 | Check ovs_stat doesn't collect data when openvswitch is stopped | 1. Stop ovs: service openvswitch-switch stop 2. Start collecd deamon : /install_folder/sbin/collectd 3. Navigate to: /tmp/hostname_folder/ 4. Start ovs: service openvswitch-switch start 5. Navigate to: /tmp/hostname_folder/ovs_stats-br0.br0/ 6. Stop ovs: service openvswitch-switch stop 7. Execute command: tail -f /tmp/localhost/ovs_stats-br0.br0/if_packets-YYYY-MM-DD |
Folder "ovs_stats-br0.br0" wasn't created
Files in format $monitoring_metrics-YYYY-MM-DD were created New entry with data doesn't appear |
Folder "ovs_stats-br0.br0" wasn't created
Files in format $monitoring_metrics-YYYY-MM-DD were created New entry with data appears with last collected value | PASS
| Yes | |
3 | Verify user configurates ovs_stats with unsupported parameters collectd raise an error | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Set up OVS Server field in ovs_stats plugin section to $test_data 3. Start collecd deamon : /install_folder/sbin/collectd 4. Verify that collectd doesn't start and error raised. test_data = [ "fsdfs"; 1146546, 1.5; $%$] | Error raises for all $test_data and collectd doesn’t start | Error raises for all $test_data and collectd doesn’t start (need to be verified expected behavior) | PASS
| Yes | |
4 | Check new data are collected by ovs_stats with a defined interval | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Execute command: tail -f /tmp/localhost/ovs_stats-br0.br0/if_packets-2016-10-26 3. Verify that collected values were renewed and written every 10 second (default value). 4. Change Interval from 10 to 1 in /install_folder/etc/collectd.conf file 5. Restart collectd: service collectd restart 6. Execute command: tail -f /tmp/localhost/ovs_stats-br0.br0/if_packets-YYYY-MM-DD 7. Verify that collected values were renewed and written every 1 second. |
Every 10 second new data writes into file
Every 1 second new data writes into file |
Every 10 second new data writes into file
Every 1 second new data writes into file | PASSYes | ||
5 | Check if LoadPlugin section collectd.conf is commented out, warning message appears | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Configure ovs_stats: Comment out #LoadPlugin ovs_stats 3. Start collecd deamon : /install_folder/sbin/collectd | 1. Warning message appears: "Loadplugin Found a configuration for the `ovs_stats ' plugin, but the plugin isn't loaded or didn't register a configuration callback." 2. Collectd have started. | 1. Warning message appears: "Loadplugin Found a configuration for the `ovs_stats ' plugin, but the plugin isn't loaded or didn't register a configuration callback." 2. Collectd have started. | PASSYes | ||
6 | Verify if Address, Port, Bridges configuration is empty in collectd.conf default parameters take place | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Configure ovs_stats : leave Bridges section blank 3. Start collecd deamon : /install_folder/sbin/collectd 4. Configure ovs_stats : 5. Start collecd deamon : /install_folder/sbin/collectd | Collectd started with default parameters. | Collectd started with default parameters. | PASSYes | ||
7 | Verify if in ovs_stats section is present extra keyword with value, collectd fails and error message appears | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Configure ovs_stats : add extra key - value: Interval 1 3. Start collecd deamon : /install_folder/sbin/collectd | 1. Message: ovs_stats: option 'Interval' not allowed here 2. ovs_stats and collectd failled | 1. Message: ovs_stats: option 'Interval' not allowed here 2. ovs_stats and collectd failled | PASSYes | ||
8 | Check if LoadPlugin configutration section in collectd.conf is commented out, ovs_stats using default configuration values | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Comment out: 3. Start collecd deamon : /install_folder/sbin/collectd 4. Check that separate files for all available interface monitoring statistic are present in folder : ls /ovs_stats-br0.br0 | Files in format $monitoring_metrics-YYYY-MM-DD were created. Default values are used for OVS. monitoring_metrics if_collisions | Files in format $monitoring_metrics-YYYY-MM-DD were created. Default values are used for OVS. monitoring_metrics if_collisions | PASS | Yes | |
9 | Verify that ovs_stats supports complex (more than 1 bridge) configuration | 1. Add new openwswitch instance: ovs-vsctl add-br br1 2. Add created switch into ovs_stats configuration section: Brigdes "br0" "br1" 3. Start collecd deamon : /install_folder/sbin/collectd 4. Check that separate folders were created for each bridge in config. 5. Move to each created folder. | Folders: ovs_stats-br0.br0 , ovs_stats-br1.br1 were created Files in format $monitoring_metrics-YYYY-MM-DD were created into each folder | Folders: ovs_stats-br0.br0 , ovs_stats-br1.br1 were created Files in format $monitoring_metrics-YYYY-MM-DD were created into each folder | PASS | Yes | |
10 | Check that there are no double entries in data created files | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Execute command: cat /tmp/hostname_folder/ovs_stats-br0.br0/if_dropped-YYYY-MM-DD 3. Verify that there is only one entry for collected test data per interval. | One entry per time interval | One entry per time interval. | PASS Yes | ||
11 | Verify that ovs_stats collectd data from new bridges (brigde interfaces) when they were added after collectd and ovs_satst have started | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Add new bridge: ovs-vsctl add-br new_brigde 3. Navigate to: /tmp/hostname_folder/ 4. Check that separate files for all available interface monitoring statistic are present in folder : ls /ovs_stats-new_bridge.new_bridge 5. Add port to br0: ovs-vsctl add-port br0 test_port1 -- set interface test_port1 type=internal 6. Navigate to: /tmp/hostname_folder/ 7. Check that separate files for all available interface monitoring statistic are present in folder : ls /ovs_stats-br0.test_port1 |
Folder "ovs_stats-new_bridge.new_bridge" was created Files in format $monitoring_metrics-YYYY-MM-DD were created into folder Folder "ovs_stats-br0.test_port1" was created
Files in format $monitoring_metrics-YYYY-MM-DD were created into each folder |
Folder "ovs_stats-new_bridge.new_bridge" was created Files in format $monitoring_metrics-YYYY-MM-DD were created into folder Folder "ovs_stats-br0.test_port1" was created
Files in format $monitoring_metrics-YYYY-MM-DD were created into each folder | PASSYes | ||
12 | Check that ovs_stats collects data from ovsdb. | 1. Start python socket which emulates ovsdb replies. 2.Start collecd deamon : /install_folder/sbin/collectd 3. Send ovsdb reply with $test_data. 4. Check that sended $test_data was written in appropriate files fro br0.br0 interface: cat /ovs_stats-br0.br0/$monitoring_metrics files test_data: if_collisions 50 | $test_data was written into appropriate files | $test_data was written into appropriate files | PASSYes | ||
13 | Verify plugin stops collecting data for specific bridge when bridge is removed from ovs | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Check that ovs_stats collecting data: cat /ovs_stats-br0.br0/$monitoring_metricsfiles 3. Delete ovs: ovs-vsctl del-br br0. 4. Check that ovs_stats stop collecting data: cat /ovs_stats-br0.br0/$monitoring_metrics files |
New entry with data appears
New entry with data doesn't appear |
New entry with data appears
New entry with data doesn't appear | PASSYes | ||
14 | Check plugin stops collecting data for specific port when port is removed from bridge | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Add port to br0: ovs-vsctl add-port br0 test_port1 -- set interface test_port1 type=internal 3. Delete port: ovs-vsctl del-port test_port1 4. Check that ovs_stats stop collecting data: cat /ovs_stats-br0.test_port1/$monitoring_metrics files |
Folder "ovs_stats-br0.test_port1" was created
New entry with data doesn't appear |
Folder "ovs_stats-br0.test_port1" was created
New entry with data doesn't appear | PASS | Yes | |
15 | Ovs_stats plugin: overflow stats counter | 1. Start python socket which emulates ovsdb replies. 2. Set if_rx_errors-over value > 2^63 3. Start collecd deamon : /install_folder/sbin/collectd 4. Check handled data. | New entry with value 2^63-1 appears into if_rx_errors-over file. Errors or exceptions weren't raised. Counter's values should wrap around (max value, zero, one, so on) | New entry with value 2^63-1 appears into if_rx_errors-over file. Errors or exceptions weren't raised. Counter stuck at max value. | PASS | Yes | |
16 | Verify OVS stats IP address field could be set up to work in either IPv4 or IPv6 |
|
|
| PASS | Yes | |
17 | Verify OVS stats updated only for bridges are written to the collectd.conf |
|
|
| PASS Yes | ||
18 | Verify OVS stats statistic is updated over socket created by address/port pair |
|
|
| PASS Yes | ||
19 | Verify OVS stats statistic Rx packets and bytes counters sent from Ixia and read from CSV plugin. |
|
|
| PASS Yes | ||
20 | Verify bad CRC packets correct counting by OVS plugin. |
|
|
| PASS Yes | ||
21 | Verify rx dropped packets correct counting by OVS plugin. |
|
|
| PASS | Yes |
OVS events collectd plugin tests.
Test Environment details:
- Bare Metal, Ubuntu 16.04.1 LTS
- Kernel version: 4.4.0-43-generic
Repo/branch used:
- collectd/master
Tests precondition:
OpenvSwitch configuration:
- Start ovs: service openvswitch-switch start
- Add new bridge: ovs-vsctl add-br br0
- Allow connection to ovsdb-server: ovs-vsctl set-manager ptcp:6640
Ovs_events configuration:
- Open collectd config file: vim /install_folder/etc/collectd.conf
- Uncomment LoadPlugin "ovs_events" fields.
- Set up Port "6640", Address "127.0.0.1", Interfaces "br0"
Ovs_events configuration:
- Open collectd config file: vim /install_folder/etc/collectd.conf
- Uncomment LoadPlugin "ovs_events" fields.
- Set up Port "6640", Address "127.0.0.1", Interfaces "br0"
Exec plugin configuration:
- Create non root user (example "test") and put bash file:
#!/bin/bash
rm -f /tmp/notifications
while read x y
do
echo $x$y >> /tmp/notifications
done - Open collectd config file: vim /install_folder/etc/collectd.conf
- Configure exec plugin: <LoadPlugin exec>
<Plugin exec>
Exec "user_name:user_group" "path_to_bash_script"
NotificationExec "user_name:user_group" "path_to_bash_script"
</Plugin>
Syslog plugin configuration:
- Configure:
<Plugin syslog>
LogLevel debug
NotifyLevel "OKAY"
</Plugin>
Table #2. OVS events collectd plugin tests results.
# | Test summary | Steps | Actual result | Expected result | Status - PASS/FAIL | Automated status | Comments |
---|---|---|---|---|---|---|---|
1 | Verify user can setup simple configuration for ovs_events plugin. | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Navigate to: /tmp/hostname_folder/ 3. Check that file with link status was created: ls /ovs_events-br0 | Folder "ovs_events-br0" was created. File in format "gauge-link_status-YYYY-MM-DD" was created | Folder "ovs_events-br0" was created. File in format "gauge-link_status-YYYY-MM-DD" was created | PASSYES | ||
2 | Check ovs_events doesn't collect data when openvswitch is stopped | 1. Stop ovs: service openvswitch-switch stop 2. Start collecd deamon : /install_folder/sbin/collectd 3. Navigate to: /tmp/hostname_folder/ 4. Start ovs: service openvswitch-switch start 5. Navigate to: /tmp/hostname_folder/ovs_events-br0/ 6. Stop ovs: service openvswitch-switch stop 7. Execute command: tail -f /tmp/localhost/ovs_events-br0/gauge-link_status-YYYY-MM-DD |
Folder "ovs_events-br0" wasn't created
File in format "gauge-link_status-YYYY-MM-DD" was created New entry with data appears with last collected value |
Folder "ovs_events-br0" wasn't created
File in format "gauge-link_status-YYYY-MM-DD" was created New entry with data appears with last collected value | PASSYES | ||
3 | Check new data are collected by ovs_events with a defined interval | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Execute command: tail -f /tmp/localhost/ovs_events-br0/gauge-link_status-YYYY-MM-DD 3. Verify that collected values were renewed and written every 10 second (default value). 4. Change Interval from 10 to 1 in /install_folder/etc/collectd.conf file 5. Restart collectd: service collectd restart 6. Execute command: tail -f /tmp/localhost/ovs_events-br0/gauge-link_status-YYYY-MM-DD 7. Verify that collected values were renewed and written every 1 second. |
Every 10 second new data writes into file
Every 1 second new data writes into file |
Every 10 second new data writes into file
Every 1 second new data writes into file | PASSYES | ||
4 | Check if Plugin configutration section in collectd.conf is commented out, ovs_events using default configuration values | 1. Open collecd.conf file: vim /install_folder/etc/collectd.conf 2. Comment out: 3. Start collecd deamon : /install_folder/sbin/collectd 4. Check that file for interface is present in folder : ls /ovs_events-br0 |
default values:
File in format "gauge-link_status-YYYY-MM-DD" was created |
default values:
File in format "gauge-link_status-YYYY-MM-DD" was created | PASSYES | ||
5 | Verify that ovs_events supports complex (more than 1 bridge) configuration | 1. Add new openwswitch instance: ovs-vsctl add-br br1 2. Add created switch into ovs_events configuration section: Brigdes "br0" "br1" 3. Start collecd deamon : /install_folder/sbin/collectd 4. Check that separate folders were created for each bridge in config. 5. Move to each created folder. |
Folders: ovs_events-br0, ovs_events-br1 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder |
Folders: ovs_events-br0, ovs_events-br1 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder | PASS | YES | |
6 | Check that there are no double entries in data created files | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Execute command: cat /tmp/hostname_folder/ovs_events-br0/gauge-link_status-YYYY-MM-DD 3. Verify that there are only one entry for collected test data per interval. | One entry per time interval | One entry per time interval | PASS | YES | |
7 | Verify that ovs_events collectd data from new bridges (brigde interfaces) when they were added after collectd and ovs_eventst have started | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Add new bridge: ovs-vsctl add-br new_brigde 3. Navigate to: /tmp/hostname_folder/ 4. Check that file with link status was created: ls /ovs_events-new_brigde 5. Add port to br0: ovs-vsctl add-port br0 test_port1 -- set interface test_port1 type=internal 6. Navigate to: /tmp/hostname_folder/ 7. Check that file with link status was created: ls /ovs_events-test_port1 | Folder "ovs_events-new_bridge" was created File in format "gauge-link_status-YYYY-MM-DD" was create Folder "ovs_events-test_port1" was created File in format "gauge-link_status-YYYY-MM-DD" was created | Folder "ovs_events-new_bridge" was created File in format "gauge-link_status-YYYY-MM-DD" was create Folder "ovs_events-test_port1" was created File in format "gauge-link_status-YYYY-MM-DD" was created | PASSYES | ||
8 | Check that ovs_events collect data from ovsdb | 1. Start python socket which emulates ovsdb replies. 2.Start collecd deamon : /install_folder/sbin/collectd 3. Send ovsdb reply with "link_state":"up". 4. Check that sended $test_data was written in appropriate files fro br0 interface: cat /ovs_events-br0/gauge-link_status-YYYY-MM-DD |
Link status was changed from 0 to 1 |
Link status was changed from 0 to 1 | PASS- | ||
9 | Verify plugin stops collecting data for specific bridge when bridge is removed from ovs | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Check that ovs_events collecting data: cat /ovs_events-br0/gauge-link_status-YYYY-MM-DD 3. Delete ovs: ovs-vsctl del-br br0. 4. Check that ovs_events stop collecting data: cat /ovs_events-br0/gauge-link_status-YYYY-MM-DD |
New entry with data appears
New entry with data doesn't appear |
New entry with data appears
New entry with data doesn't appear | PASSYES | ||
10 | Check plugin stops collecting data for specific port when port is removed from bridge | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Add port to br0: ovs-vsctl add-port br0 test_port1 -- set interface test_port1 type=internal 3. Delete port: ovs-vsctl del-port test_port1 4. Check that ovs_events stop collecting data: cat /ovs_events-br0.test_port1/gauge-link_status-YYYY-MM-DD |
Folder "ovs_events-test_port1" was created
New entry with data doesn't appear |
Folder "ovs_events-test_port1" was created
New entry with data doesn't appear | PASS- | ||
11 | Verify that user can set up into Address : network hostname, IPv4 numbers-and-dots notation or IPv6 hexadecimal string format | 1. Start collecd deamon : /install_folder/sbin/collectd 2. Check that ovs_events collecting data: cat /ovs_events-br0.test_port1/gauge-link_status-YYYY-MM-DD 3. Set up Address "$hostname", where hostname is name of linux machine (ex: silpixa00397261) 4. Restart collectd: service collectd restart 5. Check that ovs_events collecting data: cat /ovs_events-br0.test_port1/gauge-link_status-YYYY-MM-DD 6. Allow connection to ovsdb-server using ipv6: ovs-vsctl set-manager ptcp:6640:[::1] 7. Set up Address "::" 8. Restart collectd: service collectd restart 9. Check that ovs_events collecting data: cat /ovs_events-br0.test_port1/gauge-link_status-YYYY-MM-DD | New entry with data appears | New entry with data appears | PASS | YES | |
12 | Check if Socket path is set, Address and Port options are ignored | 1. Set up Address "192.168.0.1", Port "8956" and Socket "/var/run/openvswitch/db.sock" 2.Start collecd deamon : /install_folder/sbin/collect 3. Check that ovs_events collecting data: cat /ovs_events-br0.test_port1/gauge-link_status-YYYY-MM-DD | Set up for Address and Port was ignored and ovs_events using Socket options. New entry with data appears | Set up for Address and Port was ignored and ovs_events using Socket options. New entry with data appears | PASS | YES | |
13 | Verify if SendNotification disabled ovs_events doesn’t send any notifications | 1. Set up SendNotification false. 2. Set up NotifyLevel OKAY for syslog plugin. 3. Start collecd deamon : /install_folder/sbin/collect 4. Run command: tail -f /var/log/syslog 5. Enable br0 intarface: ifconfig br0 up |
Notification message does't appear into syslog file |
Notification message does't appear into syslog file | PASS | YES | |
14 | Check if SendNotification enabled ovs_events send notifications when | 1. Set up SendNotification true. 2. Set up NotifyLevel OKAY for syslog plugin. 3. Start collecd deamon : /install_folder/sbin/collect 4. Run command: tail -f /var/log/syslog 5. Enable br0 intarface: ifconfig br0 up 6. Stop ovs: service openvswitch-switch stop |
Notification message about link status appears into syslog file Notification message about ovsdb connection appears into syslog file |
Notification message about link status appears into syslog file Notification message about ovsdb connection appears into syslog file | PASSYES | ||
15 | Check if "Interface" is commented out all available interfaces are monitored | 1. Add new openwswitch instance: ovs-vsctl add-br br1 2. Comment out #Interfaces and set SendNotification true 3. Enable exec plugin. 4. Run command: tail -f /var/log/syslog 5. Start collecd deamon : /install_folder/sbin/collect 6. Check that ovs_events collecting link status and metadata for br0 and br1 : cat path_to_exec_write_file. | Notification message about link status appears into syslog file for br0 and br1 interfaces Uuid and vm-uuid are present in meta field New entry with data appears | Notification message about link status appears into syslog file for br0 and br1 interfaces Uuid and vm-uuid are present in meta field New entry with data appears | PASSYES | ||
16 | Verify that only specified interface names in Interface field are monitored by ovs_events plugin | 1. Add new openwswitch instance: ovs-vsctl add-br br1 2. Set Interface "br0" 3. Start collecd deamon : /install_folder/sbin/collect 4. Check that ovs_events collecting link status and metadata only for br0 :cat path_to_exec_write_file. 5. Add port br1 into Interface section. 6. Restart collectd. 7. Check that ovs_events collecting link status and metadata for br0 and br1 : cat path_to_exec_write_file. | Uuid and vm-uuid are present in meta field New entry with data appears
Uuid and vm-uuid are present in meta field | Uuid and vm-uuid are present in meta field New entry with data appears
Uuid and vm-uuid are present in meta field | PASSYES | ||
17 | Check that metadata are present when notification raises | 1. Set SendNotification true. 2. Enable exec plugin for handling metadata. 3. Start collecd deamon : /install_folder/sbin/collect 4. Execute: ifconfig br0 up 5. Check that notification raises. 6. Verify matadata collected by exec. |
Notification message about link status appears into syslog file br0 interfaces _uuid = uuid collected by exec, vm-uuid = vm_uuid collected by exec |
Notification message about link status appears into syslog file br0 interfaces _uuid = uuid collected by exec, vm-uuid = vm_uuid collected by exec | PASSYES | ||
18 | Verify that ovs_events collecting data from ovs patch interfaces | 1. Add new openwswitch instance: ovs-vsctl add-br br1 2. Add patch interfaces to br0 and br1: ovs-vsctl add-port br0 test_1 – set Interface test_1 type=patch options:peer=test_2 ovs-vsctl add-port br1 test_2 – set Interface test_2 type=patch options:peer=test_1 3. Add br1, test_1, test2 to collectd.conf 4. Start collecd deamon : /install_folder/sbin/collect 5. Check that separate folders were created for each bridge in config. 6. Move to each created folder. |
Folders: ovs_events-br0, ovs_events-br1, ovs_events-test1, ovs_events - test_2 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder |
Folders: ovs_events-br0, ovs_events-br1, ovs_events-test1, ovs_events - test_2 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder | PASS | YES | |
19 | Check ovs_events handle data from ovs dpdk interfaces | 1. Configure ovs with dpdk (https://github.com/jrfastab/OVS/blob/master/INSTALL.DPDK.md) 2. Add 2 dpdk ports into ovs. 3. Start collecd deamon : /install_folder/sbin/collect 4. Check that separate folders were created for each bridge in config. 5. Move to each created folder. |
Folders: ovs_events-br0, ovs_events-dpdk0, ovs_events-dpdk1 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder |
Folders: ovs_events-br0, ovs_events-dpdk0, ovs_events-dpdk1 were created File in format "gauge-link_status-YYYY-MM-DD" was created for each folder | PASS | YES | |
20 | Verify if DispatchValues disabled ovs_events does not handle data about link status | 1. Set up DispatchValues false. 2. Start collecd deamon : /install_folder/sbin/collect. 3. Check that link status from ovsdb does not handle. 4. Set up DispatchValues true. 5. Restart collectd: service collectd restart |
Data about link status does't collect
Data about link status collected |
Data about link status does't collect
Data about link status collected | PASSYES | ||
21 | Check ovs_events handle data about link status and events from 30 openvswitch bridges | 1. Add 30 ovs-bridges. 2. Start collecd deamon : /install_folder/sbin/collect. 3. Check that link status from ovsdb handle by ovs_events. 4. Change link status to up. |
Link status for all 30 bridges was handled Link status for all 30 bridges was changed to "Up" 30 events appeared in syslog |
Link status for all 30 bridges was handled Link status for all 30 bridges was changed to "Up" 30 events appeared in syslog | PASSYES | ||
22 | Verify ovs_events handle data about link status every 0.005 sec | 1. Set Interval = 0.005 2. Start collecd deamon : /install_folder/sbin/collect. 3. Check that link status from ovsdb handle by ovs_events every 0.005 sec. |
Data about link status appears every 0.005 sec |
Data about link status appears every 0.005 sec | PASSYES | ||
23 | Verify ovs_events does not handle data when invalid socket path is set | 1. Set up Socket to invalid link "/var/test/openvswitch/db.sock" 2. Start collecd deamon : /install_folder/sbin/collect |
Folders and file for ovs_events were not created Collectd have started |
Folders and file for ovs_events were not created Collectd have started | PASS YES | ||
24 | Verify ovs_events event time less or equal to 0.005 seconds | 1. Add linux port to ovs 2. Change port status to UP 3. Compare result from kernel log and raised event. 4. Set up port status DOWN 5. Compare result from kernel log and raised event. |
Event raised time less or equal 0.005 sec Event raised time less or equal 0.005 sec |
Event raised time less or equal 0.005 sec Event raised time less or equal 0.005 sec | PASS | YES | event time ~ 0.001-0.002 sec |
25 | Verify that ovs_events handle data from virtual function interfaces | 1. Create max VF for interfaces with 'i40e' and 'ixgbe' 2. Change port status to UP 3. Set up port status DOWN |
Port status for selected VM changed to 1 Port status for selected VM changed to 0 |
Port status for selected VM changed to 1 Port status for selected VM changed to 0 | PASS | YES | |
26 | Check if NotifyInterfaceAdd set to False notification message after port/interface added didn't appear | 1. Add new port to ovs bridge: ovs-vsctl add-port br0 test_port 2. Using exec plugin handle notification. 3. Remove test_port from ovs. 4. Set NotifyInterfaceAdd false. 5. Restart collectd: service collectd restart |
Notification message with test_port state changed to "DOWN" appears
Notification message didn't appear |
Notification message with test_port state changed to "DOWN" appears
Notification message didn't appear | PASS | NO |
OVS statistic SNMP tests.
Important:
OvS stats can be read directly from OvS using standard SNMP MIBs (IF_MIB) and this does not require OvS plugin availability.
Tests precondition:
- SNMP installed and configured.
- OvS installed and running.
- Standard SNMP MIBS are installed.
- Important NOTE: No need in OvS plugin.
Useful information:
- IF-MIB starting OID
.1.3.6.1.2.1.2
Reading list of interfaces from Standard IF_MIB
snmpwalk -v2c -cpublic localhost .1.3.6.1.2.1.2.2.1.2- Actual OID for OvS interfaces will be stable during current system run, but will differs between different system runs. For example:
....................................................................iso.3.6.1.2.1.2.2.1.2.311 = STRING: "br0"
iso.3.6.1.2.1.2.2.1.2.314 = STRING: "test_port1" - List of Counters means simple counters, not detailed.
For example:iso.3.6.1.2.1.2.2.1.10.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.11.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.12.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.13.311 = Counter32: 6524
iso.3.6.1.2.1.2.2.1.14.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.15.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.16.311 = Counter32: 6025
iso.3.6.1.2.1.2.2.1.17.311 = Counter32: 48
iso.3.6.1.2.1.2.2.1.18.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.19.311 = Counter32: 0
iso.3.6.1.2.1.2.2.1.20.311 = Counter32: 0
Table #3. SNMP: OVS statistic tests results.
# | Test case title | Priority | Steps | Expected result | Actual result | Status | Environment | Is automated | Automation result | Comments |
---|---|---|---|---|---|---|---|---|---|---|
1 | Verify that SNMP wlil return all interfaces including OvS interfaces by SNMPWALK standard IF_MIB | High |
| OvS interfaces are available in output | OvS interfaces are available in output | PASS | TBD | No | NA | |
2 | Verify that SNMP can GET interface info of OvS interfaces from standard IF_MIB | High |
| Interface name, counters can be get by appropriate OID number | Interface name, counters returned by appropriate OID number | PASS | TBD | No | NA | |
3 | Verify that reading SNMP value using GETNEXT behaves correctly | High |
| Value next after specified is returned | Value next after specified is returned | PASS | TBD | No | NA | |
4 | Verify that SET doesn't work on counters. | High |
| Attempt failed with correct error message | Attempt failed | PASS | TBD | No | NA | |
5 | Verify that counters can be read if multiple OvS interfaces are available | High |
| Appropriate values for expected interface is returned | Appropriate values for expected interface is returned | PASSTBD | No | NA |
OVS events multi instance collectd plugin tests.
Ovs_events configuration:
- Open collectd config file: vim /install_folder/etc/collectd.conf
- Uncomment LoadPlugin "ovs_events" fields.
- Uncomment
<Plugin ovs_events>
<Instance hostname>
DispatchValues true
</Instance>
SendNotification true
</Plugin>
OpenvSwitch configuration:
- Start ovs: service openvswitch-switch start
- Add new bridge: ovs-vsctl add-br br0
- Allow connection to ovsdb-server: ovs-vsctl set-manager ptcp:6640
Table #4. OVS events multi instance collectd plugin tests results.
# | Test summary | Steps | Actual result | Expected result | Status - PASS/FAILAutomated status | Comments | |
---|---|---|---|---|---|---|---|
1 | Verify user can setup simple configuration of ovs_events for DUT | 1. Start collectd daemon : /install_folder/sbin/collectd 2. Navigate to: /tmp/hostname_folder/ 3. Check that file with link status was created: ls /ovs_events-br0 | Folder "ovs_events-br0" was created.
File in format "gauge-link_status-YYYY-MM-DD" was created | Folder "ovs_events-br0" was created.
File in format "gauge-link_status-YYYY-MM-DD" was created | PASS | ||
2 | Check ovs_events handle data from remote DUT | 1. Add Address = "address of remote DUT" 2. On remote DUT add ovs bridge br0. 3. Start collectd daemon : /install_folder/sbin/collectd 4. Navigate to: /tmp/hostname_folder/ 5. Check that file with link status was created: ls /ovs_events-br0 6. Change link status of br0 to UP. |
Folder "ovs_events-br0" was created
File in format "gauge-link_status-YYYY-MM-DD" was created New entry with data appears with last collected value 1 |
Folder "ovs_events-br0" was created
File in format "gauge-link_status-YYYY-MM-DD" was created New entry with data appears with last collected value 1 | PASS | ||
3 | Verify user can setup multi instance configuration for ovs_events plugin | 1. Add new instance for remote DUT: <Instance remote_host> 2. On remote DUT add ovs bridge br0. 3. Start collectd daemon : /install_folder/sbin/collectd 4. Navigate to: /tmp/hostname_folder/ 5. Change link status of br0 on DUT and remote DUT to UP.
|
Folders with appropriate files in /tmp/hostname_folder/ and /tmp/remote_host were created New entry with data appears with last collected value 1 for local and remote DUT |
Folders with appropriate files in /tmp/hostname_folder/ and /tmp/remote_host were created New entry with data appears with last collected value 1 for local and remote DUT | PASS | ||
4 | Check ovs_events plugin multi instance configuration handle notification events | 1. Add new instance for remote DUT: <Instance remote_host> 2. On remote DUT add ovs bridge br0. 3. Start collectd daemon : /install_folder/sbin/collectd 4. Change link status of br0 on DUT to UP. 5. Using exec plugin handle notification. 6. Change link status of br0 on remote DUT to UP. |
Notification message with data from local DUT appears
Notification message with data from remote DUT appears |
Notification message with data from local DUT appears
Notification message with data from remote DUT appears | PASS | ||
5 | Verify user can not create duplicate instances for ovs_events plugin | 1. Add new instance for remote DUT same as local DUT: <Instance hostname> 2. Start collectd daemon : /install_folder/sbin/collectd |
Error message appears in syslog. Collectd does not start |
Error message appears in syslog. Collectd does not start | PASS | ||
6 | Check user can setup multi instance configuration for 30 ovs instances for ovs_events plugin | 1. Add 30 ovs docker containers. 2. Add ovs bridge and port to each container. 3. Add new instances in collectd conf: <Instance docker_host_0> <Instance docker_host_29> 4. Start collectd daemon : /install_folder/sbin/collectd 5. Change link status of interface on all ovs instances UP. 6. Using exec plugin handle notification. |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears | PASS | ||
7 | Verify ovs_events handle data about link status every 0.005 sec | 1. Set Interval = 0.005 2. Add new instance for remote DUT: <Instance remote_host> 3. Start collectd daemon : /install_folder/sbin/collect. 4. Check that link status from ovsdb handle by ovs_events every 0.005 sec. |
Data about link status appears every 0.005 sec |
Data about link status appears every 0.005 sec | PASS | ||
8 | Check ovs_events plugin multi instance default configuration | 1. Comment Plugin ovs_events section in collectd.conf. 2. Start collectd daemon : /install_folder/sbin/collect. 3. Change link status of br0 on DUT to UP. 4. Using exec plugin handle notification. |
Notification message with data from local DUT appears Data about link status didn't handle by ovs_evets plugin |
Notification message with data from local DUT appears Data about link status didn't handle by ovs_evets plugin | PASS | ||
9 | Verify ovs_events handle data about link status from 12 instances with 1 VF and 4 local port into each instance | 1. Create 12 VF from active interface. 2. Add VFs to ovs-instances and 4 local port. 3. Add new instances to collectd plugin: <Instance remote_host> 4. Start collectd daemon : /install_folder/sbin/collect. 5. Check that link status from ovsdb handle by ovs_events every 0.005 sec. 6. Change link status of interface on all ovs instances UP. 7. Using exec plugin handle notification. |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances Data about link status appears every 0.005 sec
New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances Data about link status appears every 0.005 sec
New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears | PASS | ||
10 | Check ovs_events plugin multi instance with physical interfaces | 1. Get names of available NIC (except management interface). 2. Add 1 NIC port 4 local (internal) ovs ports to ovs-instance. 3. Add new instances to collectd plugin: <Instance remote_host> 4. Start collectd daemon: /install_folder/sbin/collect. 5. Check that link status from ovsdb handle by ovs_events every 0.005 sec. 6. Change link status of interface on all ovs instances UP. 7. Using exec plugin handle notification. |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances Data about link status appears every 0.005 sec
New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears |
Folders with appropriate files in /tmp/docker_folder/ for each instance were created New entry with data appears with last collected value 0 for all ovs instances Data about link status appears every 0.005 sec
New entry with data appears with last collected value 1 for all ovs instances Notification message with data from each instance appears | PASS | ||
11 | Check ovs_events plugin multi instance start/stop ovs instance | 1. Add 10 ovs containers. 2. Add ovs bridge and port to each container. 3. Add new instances in collectd conf: <Instance docker_host_0> <Instance docker_host_9> 4. Start collectd daemon : /install_folder/sbin/collectd 5. Change link status of interface on all ovs instances UP. 6. Stop 5 ovs containers. 7. Start 5 ovs containers. |
New entry with data appears with last collected value 1 for all ovs instances ovs_events stop collecting data from stopped ovs instances ovs_events collecting data from started ovs instances
|
New entry with data appears with last collected value 1 for all ovs instances ovs_events stop collecting data from stopped ovs instances ovs_events collecting data from started ovs instances | PASS |
OVS stats multi instance collectd plugin tests.
Ovs_stats configuration:
- Open collectd config file: vim /install_folder/etc/collectd.conf
- Uncomment LoadPlugin "ovs_stats" fields.
- Uncomment
<Plugin ovs_stats>
<Instance hostname>
</Instance>
</Plugin>
OpenvSwitch configuration:
- Start ovs: service openvswitch-switch start
- Add new bridge: ovs-vsctl add-br br0
- Allow connection to ovsdb-server: ovs-vsctl set-manager ptcp:6640
Table #5. OVS stats multi instance collectd plugin tests results.
Test summary
Comments | # | Test summary | Steps | Actual result | Expected result | Status - PASS/FAIL | Automated status | Comments |
---|---|---|---|---|---|---|---|---|
1 | Verify ovs_stats when extra keyword present in collectd.conf | 1. Configure ovs_stats section and add extra values: 2. Start collectd |
Collectd crashes after start |
| PASSHAA-1809
| |||
2 | Verify user can setup multi instance configuration for ovs_stats plugin | 1. Add new instance for remote DUT: <Instance remote_host> 2. On remote DUT add ovs bridge br0. 3. Start collectd daemon : /install_folder/sbin/collectd 4. Navigate to: /tmp/hostname_folder/ 5. Change link status of br0 on DUT and remote DUT to UP.
|
Folders with appropriate files in /tmp/hostname_folder/ and /tmp/remote_host were created New entry with data appears with last collected value 1 for local and remote DUT |
Folders with appropriate files in /tmp/hostname_folder/ and /tmp/remote_host were created New entry with data appears with last collected value 1 for local and remote DUT | PASSHAA-1812
| |||
3 | Verify user can not create duplicate instances for ovs_stats plugin | 1. Add new instance for remote DUT same as local DUT: <Instance hostname> 2. Start collectd daemon : /install_folder/sbin/collectd |
Error message appears in syslog. Collectd does not start |
Error message appears in syslog. Collectd does not start | PASS | |||
4 | Check ovs_stats plugin multi instance default configuration | 1. Comment Plugin ovs_stats section in collectd.conf. 2. Start collectd daemon : /install_folder/sbin/collect. |
Plugin start handling data from available ovs_instance. Collectd started |
Plugin start handling data from available ovs_instance. Collectd started | PASS | |||
5 | Verify ovs_stats handle data from ovs-dpdk ports | 1. Add dpdk port to open virtual bridge. 2. Start collectd daemon : /install_folder/sbin/collect. |
Plugin start handling data from dpdk port. Files for all available dpdk statistics are present. |
Plugin start handling data from dpdk port. Files for all available dpdk statistics are present. | PASS | OvS Stats Plugin | ||
6 | Check that ovs_stats handle data after openvswitchd stop/start/restart | 1. Stop openvswitchd: systemctl stop openvswitch-switch.service. 2. Start openvswitch: systemctl start openvswitch-switch.service. 3.Restart openvswitch: systemctl restart openvswitch-switch.service. | Ovs-stats plugin stop collecting data from stopped ovsswitchd.
Ovs-stats plugin start collecting data after time Interval. Ovs-stats plugin stop and than start collecting data after time Interval. | Ovs-stats plugin stop collecting data from stopped ovsswitchd.
Ovs-stats plugin start collecting data after time Interval. Ovs-stats plugin stop and than start collecting data after time Interval. | PASS | |||
7 | Verify ovs_stats plugin monitors 20 ovs-instances with 50 ovs-internal ports each | 1. Create 20 ovs instances (separate docker containers with ovs). 2. Add 50 ports to each ovs instance. 3. Start collectd. |
Folders with appropriate files were created for each ovs instance and for all 50 internal ports |
Folders with appropriate files were created for each ovs instance and for all 50 internal ports | PASS |