opencompute-developers team mailing list archive
-
opencompute-developers team
-
Mailing list archive
-
Message #00302
[Merge] lp:~sophia-wu/opencompute/add-ocp-system-event-log-job into lp:opencompute/checkbox
Sophia Wu has proposed merging lp:~sophia-wu/opencompute/add-ocp-system-event-log-job into lp:opencompute/checkbox.
Requested reviews:
Jeff Lane (bladernr)
For more details, see:
https://code.launchpad.net/~sophia-wu/opencompute/add-ocp-system-event-log-job/+merge/213419
Verify the system event log must be capable of saving at least 256 entries
--
https://code.launchpad.net/~sophia-wu/opencompute/add-ocp-system-event-log-job/+merge/213419
Your team Open Compute Developers is subscribed to branch lp:opencompute/checkbox.
=== added file 'data/whitelists/opencompute-certify-remoteME.whitelist'
--- data/whitelists/opencompute-certify-remoteME.whitelist 1970-01-01 00:00:00 +0000
+++ data/whitelists/opencompute-certify-remoteME.whitelist 2014-03-31 08:50:05 +0000
@@ -0,0 +1,46 @@
+## This whitelist is intended for use inside Canonical's test labs. The tests
+## conained in this list are the same as those contained in the
+## server-selftest.whitelist file that OEMs may use. The difference here is that
+## some of these tests depend on a specific network environment and may not run
+## properly in your test environment. To avoid false failures, please use the
+## server-selftest.whitelist instead.
+# Resource Jobs
+block_device
+cdimage
+cpuinfo
+device
+dmi
+dpkg
+efi
+environment
+gconf
+lsb
+meminfo
+module
+optical_drive
+package
+sleep
+uname
+#Info attachment jobs
+__info__
+cpuinfo_attachment
+dmesg_attachment
+dmi_attachment
+dmidecode_attachment
+efi_attachment
+lspci_attachment
+meminfo_attachment
+modprobe_attachment
+modules_attachment
+sysctl_attachment
+sysfs_attachment
+udev_attachment
+lsmod_attachment
+acpi_sleep_attachment
+info/hdparm
+info/hdparm_.*.txt
+installer_debug.gz
+info/disk_partitions
+# Actual test cases
+__TC-002-0011-System_Log__
+TC-002-0011-001-System_Log_Entries
=== added file 'debian/changelog'
--- debian/changelog 1970-01-01 00:00:00 +0000
+++ debian/changelog 2014-03-31 08:50:05 +0000
@@ -0,0 +1,86 @@
+checkbox (1.16.13~OCP) UNRELEASED; urgency=low
+
+ [ Sophia Wu ]
+ * data/whitelists/opencompute-certify-remoteME.whitelist - added a new whitelist for Intel ME
+ * jobs/TC-002-0011-System_Log.txt - added a new IPMI out-of-band test which is related to system log on Intel ME
+ * jobs/local.txt.in - added job to parse System Event Log job
+ * scripts/ipmi_sel_entries - added a new script to verify entry number of system event log
+ * examples/me.cfg - added new config file for Intel ME test
+
+ [ Nelson Chu ]
+ * data/whitelists/opencompute-certify-local.whitelist - Added Hardware
+ Information jobs to OCP certification whitelist
+ * jobs/TC-003-0001-Hardware_Information.txt - Added new jobs for Hardware
+ Information test cases
+ * jobs/local.txt.in - Added job to parse new Hardware Information job file
+ * scripts/disk_info - new script to gather disk infomation
+ * scripts/bios_info - new script to gather BIOS infomation
+ * scripts/raid_info - new script to gather RAID infomation
+ * data/whitelists/opencompute-certify-local.whitelist - Added PCH jobs to
+ OCP certification whitelist
+ * jobs/TC-001-0002-Platform_Controller_Hub.txt - Added new jobs for PCH
+ test cases
+ * jobs/local.txt.in - Added job to parse new PCH job file
+ * scripts/check_sata_port - new script to verify SATA port speed
+ * scripts/check_usb_port - new script to verify USB version
+ * data/whitelists/opencompute-certify-local.whitelist - Added CPU and Memory
+ jobs to OCP certification whitelist
+ * jobs/TC-001-0001-CPU_Memory.txt.in - Added new jobs for CPU and Memory
+ test cases
+ * jobs/local.txt.in - Added job to parse new CPU and Memory job file
+ * scripts/cpu_info - new script to gather CPU information
+ * scripts/memory_info - new script to gather memory information
+ * scripts/processor_topology - Revised script to match certification criteria
+
+ [ Jeff Marcom ]
+ * Updated scripts/network script from lp:checkbox
+
+ -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Tue, 5 Nov 2013 11:12:04 -0400
+
+checkbox (1.16.12~OCP) UNRELEASED; urgency=low
+
+ [ Jeff Marcom ]
+ * Added googlestress app memory tests
+ * Updated plainbox based on version 0.4.dev in lp:checkbox (16.12)
+ * Updated checkbox OCP intro prompt
+ * Updated Open Compute ready whitelist with new power management, cpu stress, and networking tests"
+ * Added 12hr idle verification test and sylog check for PCI/Device errors
+ * Removed launchpad prompt
+
+ [ Jeff Lane ]
+ * Updated OCP Checkbox to latest checkbox trunk, 0.16.11 revno 2353
+ * Enabled bonnie++ tests after noting that bonnie++ is available via yum and
+ apt. Added new disk io_stress jobs and disk_stress script to add disk
+ testing via stressapptest.
+ * debian/control: promoted several packages from suggest to depends to ensure
+ they are installed along with checkbox-ocp (LP: #1233333)
+ * Cherry pick new iperf functionality in network testing from checkbox trunk
+
+ -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Wed, 2 Oct 2013 10:13:04 -0400
+
+checkbox (1.16.6~OCP) UNRELEASED; urgency=low
+
+ [ Jeff Marcom ]
+ * Added checkbox-ocp package
+
+ -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Wed, 21 Aug 2013 12:20:24 -0400
+
+
+checkbox (0.16.6~OCPubuntu1) UNRELEASED; urgency=low
+
+ * INITIAL RELEASE:
+ based on checkbox 0.16.6 from lp:checkbox with modificiations specific to
+ the Open Compute Project
+
+ [ Jeff Marcom ]
+ * jobs/ipmi_out_of_band.txt.in - added new out of band ipmi tests
+ * jobs/dcmi_in_band.txt.in - added new inband DCMI tests
+
+ [ Jeff Lane ]
+ * data/ - Cleanup, removed unnecessary data files, dirs and whitelists
+ bin/ - all checkbox launchers now default to
+ opencompute-ready-local.whitelist
+ * jobs/, po/, scripts/ - Cleanup, removed unnecessary job and scritp files
+ and their references in po/POTFILES.in
+ checkbox/tests/ - Cleaned up unit tests that were looking for things
+ removed in this merge.
=== removed file 'debian/changelog'
--- debian/changelog 2014-03-18 07:59:11 +0000
+++ debian/changelog 1970-01-01 00:00:00 +0000
@@ -1,79 +0,0 @@
-checkbox (1.16.13~OCP) UNRELEASED; urgency=low
-
- [ Nelson Chu ]
- * data/whitelists/opencompute-certify-local.whitelist - Added Hardware
- Information jobs to OCP certification whitelist
- * jobs/TC-003-0001-Hardware_Information.txt - Added new jobs for Hardware
- Information test cases
- * jobs/local.txt.in - Added job to parse new Hardware Information job file
- * scripts/disk_info - new script to gather disk infomation
- * scripts/bios_info - new script to gather BIOS infomation
- * scripts/raid_info - new script to gather RAID infomation
- * data/whitelists/opencompute-certify-local.whitelist - Added PCH jobs to
- OCP certification whitelist
- * jobs/TC-001-0002-Platform_Controller_Hub.txt - Added new jobs for PCH
- test cases
- * jobs/local.txt.in - Added job to parse new PCH job file
- * scripts/check_sata_port - new script to verify SATA port speed
- * scripts/check_usb_port - new script to verify USB version
- * data/whitelists/opencompute-certify-local.whitelist - Added CPU and Memory
- jobs to OCP certification whitelist
- * jobs/TC-001-0001-CPU_Memory.txt.in - Added new jobs for CPU and Memory
- test cases
- * jobs/local.txt.in - Added job to parse new CPU and Memory job file
- * scripts/cpu_info - new script to gather CPU information
- * scripts/memory_info - new script to gather memory information
- * scripts/processor_topology - Revised script to match certification criteria
-
- [ Jeff Marcom ]
- * Updated scripts/network script from lp:checkbox
-
- -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Tue, 5 Nov 2013 11:12:04 -0400
-
-checkbox (1.16.12~OCP) UNRELEASED; urgency=low
-
- [ Jeff Marcom ]
- * Added googlestress app memory tests
- * Updated plainbox based on version 0.4.dev in lp:checkbox (16.12)
- * Updated checkbox OCP intro prompt
- * Updated Open Compute ready whitelist with new power management, cpu stress, and networking tests"
- * Added 12hr idle verification test and sylog check for PCI/Device errors
- * Removed launchpad prompt
-
- [ Jeff Lane ]
- * Updated OCP Checkbox to latest checkbox trunk, 0.16.11 revno 2353
- * Enabled bonnie++ tests after noting that bonnie++ is available via yum and
- apt. Added new disk io_stress jobs and disk_stress script to add disk
- testing via stressapptest.
- * debian/control: promoted several packages from suggest to depends to ensure
- they are installed along with checkbox-ocp (LP: #1233333)
- * Cherry pick new iperf functionality in network testing from checkbox trunk
-
- -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Wed, 2 Oct 2013 10:13:04 -0400
-
-checkbox (1.16.6~OCP) UNRELEASED; urgency=low
-
- [ Jeff Marcom ]
- * Added checkbox-ocp package
-
- -- Jeff Marcom <jeff.marcom@xxxxxxxxxxxxx> Wed, 21 Aug 2013 12:20:24 -0400
-
-
-checkbox (0.16.6~OCPubuntu1) UNRELEASED; urgency=low
-
- * INITIAL RELEASE:
- based on checkbox 0.16.6 from lp:checkbox with modificiations specific to
- the Open Compute Project
-
- [ Jeff Marcom ]
- * jobs/ipmi_out_of_band.txt.in - added new out of band ipmi tests
- * jobs/dcmi_in_band.txt.in - added new inband DCMI tests
-
- [ Jeff Lane ]
- * data/ - Cleanup, removed unnecessary data files, dirs and whitelists
- bin/ - all checkbox launchers now default to
- opencompute-ready-local.whitelist
- * jobs/, po/, scripts/ - Cleanup, removed unnecessary job and scritp files
- and their references in po/POTFILES.in
- checkbox/tests/ - Cleaned up unit tests that were looking for things
- removed in this merge.
=== modified file 'debian/checkbox.install'
--- debian/checkbox.install 2013-07-05 20:01:00 +0000
+++ debian/checkbox.install 2014-03-31 08:50:05 +0000
@@ -8,6 +8,7 @@
usr/share/checkbox/examples/checkbox.ini
usr/share/checkbox/examples/network.cfg
usr/share/checkbox/examples/virtualization.cfg
+usr/share/checkbox/examples/me.cfg
usr/share/checkbox/examples/org.freedesktop.policykit.checkbox.policy usr/share/polkit-1/actions/
usr/share/checkbox/install/*
usr/share/checkbox/jobs/*
=== modified file 'debian/checkbox.postinst'
--- debian/checkbox.postinst 2013-07-05 16:43:48 +0000
+++ debian/checkbox.postinst 2014-03-31 08:50:05 +0000
@@ -5,5 +5,6 @@
cp /usr/share/checkbox/examples/network.cfg /etc/checkbox.d/
cp /usr/share/checkbox/examples/virtualization.cfg /etc/checkbox.d/
+cp /usr/share/checkbox/examples/me.cfg /etc/checkbox.d/
#DEBHELPER#
=== added file 'examples/me.cfg'
--- examples/me.cfg 1970-01-01 00:00:00 +0000
+++ examples/me.cfg 2014-03-31 08:50:05 +0000
@@ -0,0 +1,15 @@
+#Please config ME IP of server that you want to test
+#for example, if ME ip of your server is 10.0.0.1,
+#then you must replace x.x.x.x to 10.0.0.1 in [Targets]
+
+[Targets]
+Target1: x.x.x.x
+
+#please config ME account(USER/PASSWORD) of server that you want to test
+#for example, if ME account of your server is ADMIN/ADMIN,
+#then you must replace OCP/OCP to ADMIN/ADMIN in [Account]
+
+[Account]
+USER: OCP
+PASSWORD: OCP
+
=== added file 'jobs/TC-002-0011-System_Log.txt.in'
--- jobs/TC-002-0011-System_Log.txt.in 1970-01-01 00:00:00 +0000
+++ jobs/TC-002-0011-System_Log.txt.in 2014-03-31 08:50:05 +0000
@@ -0,0 +1,11 @@
+plugin: shell
+name: TC-002-0011-001-System_Log_Entries
+requires: package.name == 'ipmitool'
+user: root
+command: ipmi_sel_entries
+description:
+ 1. Use ipmitool to collect event log information
+ 2. Calculate entries number of system event log
+ 3. Criteria: the A log must be capable of saving at least 256 entries
+
+
=== modified file 'jobs/local.txt.in'
--- jobs/local.txt.in 2014-03-18 07:59:11 +0000
+++ jobs/local.txt.in 2014-03-31 08:50:05 +0000
@@ -124,9 +124,18 @@
shopt -s extglob
cat $CHECKBOX_SHARE/jobs/TC-001-0002-Platform_Controller_Hub.txt?(.in)
+name: __TC-002-0011-System_Log__
+plugin: local
+_description: System Event Log
+command:
+ shopt -s extglob
+ cat $CHECKBOX_SHARE/jobs/TC-002-0011-System_Log.txt?(.in)
+
name: __TC-003-0001-Hardware_Information__
plugin: local
_description: Verify hardware information
command:
shopt -s extglob
cat $CHECKBOX_SHARE/jobs/TC-003-0001-Hardware_Information.txt?(.in)
+
+
=== added file 'scripts/ipmi_sel_entries'
--- scripts/ipmi_sel_entries 1970-01-01 00:00:00 +0000
+++ scripts/ipmi_sel_entries 2014-03-31 08:50:05 +0000
@@ -0,0 +1,147 @@
+#!/usr/bin/env python3
+"""
+Copyright (C) 2010-2013 by Cloud Computing Center for Mobile Applications
+Industrial Technology Research Institute
+
+File Name
+ ipmi_sel_entries
+ 1. Use ipmitool to collect event log information
+ 2. Calculate entries number of system event log
+ 3. Criteria: the A log must be capable of saving at least 256 entries
+
+Description
+ Use ipmitool to get system event log info and calculate whether
+ total number of entries is more than 256.
+
+Authors
+ Sophia Wu <Sophia.Wu@xxxxxxxxxxx>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3,
+as published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+import sys
+import time
+import shlex
+import re
+import subprocess
+from subprocess import (
+ CalledProcessError,
+ check_call,
+ check_output
+)
+from argparse import (
+ ArgumentParser,
+ RawTextHelpFormatter
+)
+import configparser
+
+#Retrieve entries number that already used
+def get_entry_used(output):
+ entry_used = re.search(r'Entries\D*([0-9 ]+)', output)
+ return entry_used.group(1).strip()
+
+#Retrieve free entries that available
+def get_entry_free(output):
+ entry_free = re.search(r'# Free Units\D*([0-9 ]+)', output)
+ return entry_free.group(1).strip()
+
+#Use ipmitool to retrieve sel information
+def get_sel_info(host_ip, user, password):
+ cmd = 'ipmitool -H {} -U {} -P {} sel'.format(host_ip, user, password)
+ ipmi_sel_return = check_output(shlex.split(cmd), universal_newlines=True)
+ return ipmi_sel_return
+
+def sel_entry_test(args):
+
+ #Default config file to config requirement info for DCMI in-band/out-of-band access
+ DEFAULT_CFG = "/etc/checkbox.d/me.cfg"
+ if not "config" in vars(args):
+ config_file = DEFAULT_CFG
+ else:
+ config_file = args.config
+
+ config = configparser.RawConfigParser()
+
+ try:
+ config.readfp(open(config_file))
+ except IOError:
+ print("No config file found")
+ return 10
+
+ # Acquire ME IP/Credential parameters from config file
+ try:
+ targets_options = config.options('Targets')
+ targets_list = []
+ for target_key in targets_options:
+ targets_list.append(config.get('Targets', target_key))
+ if not targets_list:
+ print("Invalid or Empty targets")
+ return 20
+ except configparser.Error:
+ print("Invalid or Empty targets")
+ return 30
+
+ try:
+ user_value = config.get('Account', 'USER')
+ passwd_value = config.get('Account', 'PASSWORD')
+ except configparser.Error:
+ print("Invalid or Empty credential info")
+ return 40
+
+ for target in targets_list:
+
+ if not target or not user_value or not passwd_value:
+ print("Require Taget IP, Account(USER/PASSWORD) for DCMI out-of-band access")
+ return 50
+ else:
+ print("SUT =", target)
+
+ try:
+ sel_return = get_sel_info(target, user_value, passwd_value)
+ time.sleep(5)
+ except CalledProcessError as command_exception:
+ print("Failed executing ipmi command, Reason: %s." %(command_exception))
+ return 60
+
+ try:
+ print("Used Entry:", int(get_entry_used(sel_return)))
+ print("Free Entry:", int(get_entry_free(sel_return)))
+ except:
+ print("Error to parse SEL info")
+ return 70
+
+ try:
+ entry_space = int(get_entry_used(sel_return))+int(get_entry_free(sel_return))
+ except ArithmeticError:
+ print("Arithmetic Error")
+ return 80
+
+ if entry_space < 256:
+ print("Entries Number:", int(entry_space), "Entries Number is less than 256")
+ return 90
+ else:
+ print("Entries Number of SUT is more than 256.")
+ return 0
+
+def main():
+
+ intro_message = "Default config location is /etc/checkbox.d/me.cfg"
+ parser = ArgumentParser(description=intro_message,
+ formatter_class=RawTextHelpFormatter)
+ parser.add_argument('--config', default="/etc/checkbox.d/me.cfg",
+ help="Supply config file for getting default credential")
+ args = parser.parse_args()
+ return sel_entry_test(args)
+
+if __name__ == "__main__":
+ sys.exit(main())
Follow ups