Bug 1107841
Summary: | Spacewalk returning error 500 when receiving audit result | |||
---|---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Francis Lacoste <flacoste.c> | |
Component: | Clients | Assignee: | Matej Kollar <mkollar> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 2.2 | CC: | bobg, cperry, jchaloup, mkollar, mzazrivec, pascal.gamelkoorn, slukasik, tr | |
Target Milestone: | --- | Keywords: | Regression | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | spacewalk-oscap-2.3.1-1 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1142808 (view as bug list) | Environment: | ||
Last Closed: | 2015-04-14 19:04:03 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1207293 |
Description
Francis Lacoste
2014-06-10 18:38:28 UTC
Actually, same as: https://www.redhat.com/archives/spacewalk-list/2014-May/msg00059.html Any news on this? We are facing the same problem. I believe this is a regression against previous versions of Spacewalk. Some output from oscap from client is like this: <?xml version="1.0" encoding="UTF-8"?>\n<benchmark-resume xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xccdf_12="http://checklists.nist.gov/xccdf/1.2" id="first" version="1.0"><profile title="Tailored profile" id=""/><TestResult id="xccdf_org.open-scap_testresult_default-profile" start-time="2014-08-15T09:44:42" end-time="2014-08-15T09:44:42"><pass><rr id="no_hashes_outside_shadow"><ident system="http://cce.mitre.org">CCE-14300-8</ident></rr></pass><fail/><error/><unknown/><notapplicable/><notchecked/><notselected/><informational/><fixed/></TestResult></benchmark-resume> It contains <profile title="Tailored profile" id=""/> where id attribute is empty string. Now, looking at /usr/lib/python2.6/site-packages/spacewalk/server/action_extra_data/scap.py, line 45. All checks for len(profiles) passes, leaving profile.id equal to empty string. DB insert then fails because id has to be non-empty string (due to constraint on id column, table rhnXccdfProfile. Sent email after exception should sent information about empty id attribute of profile tag. Looking at source code of master branch, the check is still the same, no check on empty id attribute. Seems that the problem exists when using the default profile. When you provide the profile on the command-line within Spacewalk for openscap it works perfectly. I've reproduced this with multiple XML files with a profile_id provided as parameter. Perhaps this can help you guys with searching the issue. What version of OpenSCAP you use when this occurs? I'm using this version : openscap-1.0.8-1.0.1 openscap-utils-1.0.8-1.0.1 Thank you Pascal for info. Patch that introduced this issue seems to be 4140bf90eb3e6b6e303ba41f79c3dec7fb24d676. In the meantime people suffering from this can try downgrading to spacewalk-oscap-0.0.22. (Only difference there should be change in xslt and list of allowed arguments related to enabling support for tailoring). spacewalk.git: 436604669a3496775e01beea1c6266d4c545d8ee There was a corner case when using default profile. Fix is in nightly build (spacewalk-oscap-2.3.1-1). Should you feel adventurous, you can try installing that package and sharing your findings ;-). Moving bugs to ON_QA as we move to release Spacewalk 2.3 Spacewalk 2.3 has been released. See https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23 |