Description of problem: unable to update openscap policy due to broken scheduling feature. a) I may have to submit oscap policy thrice to succeed. Also I feel the schedule section can be improved, currently it's not intuitive to select the options. b) updating oscap policy with the same custom value should be possible. when the "period" is custom, the below values are irrelevant and should not be prompted to the user to be filled in. 1) "weekday"=>"sunday", 2) "day_of_month"=>"12", c) The possible errors are as below. 2015-03-05 23:06:43 [I] Processing by ScaptimonyPoliciesController#update as HTML 2015-03-05 23:06:43 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"SiRic7p2ZM4sH0202fxc03z7I4+VYkW/p0RsXBnt6I4=", "policy"=>{"name"=>"oscap_policy3", "description"=>"", "scap_content_id"=>"1", "scap_content_profile_id"=>"9", "period"=>"custom", "weekday"=>"", "day_of_month"=>"", "cron_line"=>"0 */1 * * *", "location_ids"=>["2", ""], "organization_ids"=>["1", ""], "hostgroup_ids"=>["", "3"]}, "commit"=>"Submit", "id"=>"4"} 2015-03-05 23:06:43 [I] Failed to save: Weekday is not included in the list, Day of month is not a number 2015-03-05 23:08:47 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"SiRic7p2ZM4sH0202fxc03z7I4+VYkW/p0RsXBnt6I4=", "policy"=>{"name"=>"oscap_policy3", "description"=>"", "scap_content_id"=>"1", "scap_content_profile_id"=>"9", "period"=>"weekly", "weekday"=>"sunday", "day_of_month"=>"", "cron_line"=>"0 */1 * * *", "location_ids"=>["2", ""], "organization_ids"=>["1", ""], "hostgroup_ids"=>["", "3"]}, "commit"=>"Submit", "id"=>"4"} 2015-03-05 23:08:47 [I] Failed to save: Day of month is not a number *) we could see below some NULL values. 2015-03-05 23:23:52 [I] Processing by ScaptimonyPoliciesController#create as HTML 2015-03-05 23:23:52 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"SiRic7p2ZM4sH0202fxc03z7I4+VYkW/p0RsXBnt6I4=", "policy"=>{"current_step"=>"Locations", "name"=>"oscap_policy3u", "description"=>"", "scap_content_id"=>"1", "scap_content_profile_id"=>"3", "period"=>"weekly", "weekday"=>"sunday", "day_of_month"=>"", "cron_line"=>"", "location_ids"=>[""], "organization_ids"=>["", "1"], "hostgroup_ids"=>[""]}, "commit"=>"Next"} Version-Release number of selected component (if applicable): sat6.1 beta snap5 How reproducible: when try to update using the edit link. Steps to Reproduce: 1. create a oscap policy 2. now try updating it with some values 3. click on submit button. Actual results: unable to save due to above mentioned issue. Expected results: should be able to update oscap policy. Additional info:
Also it feels like currently creating a cron_line is broken even during creation of policy.
For clarity sake: After selecting "period as weekly" and "weekday as sunday" from the schedule tab under oscap policy creation *) we could see below NULL values for 'day_of_month' and 'cron_line'. 2015-03-05 23:23:52 [I] Processing by ScaptimonyPoliciesController#create as HTML 2015-03-05 23:23:52 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"SiRic7p2ZM4sH0202fxc03z7I4+VYkW/p0RsXBnt6I4=", "policy"=>{"current_step"=>"Locations", "name"=>"oscap_policy3u", "description"=>"", "scap_content_id"=>"1", "scap_content_profile_id"=>"3", "period"=>"weekly", "weekday"=>"sunday", "day_of_month"=>"", "cron_line"=>"", "location_ids"=>[""], "organization_ids"=>["", "1"], "hostgroup_ids"=>[""]}, "commit"=>"Next"}
Proposed fix upstream: https://github.com/OpenSCAP/foreman_openscap/pull/92
I am facing this issue again, a) selecting weekly, prompts also to fill in "day of month". b) selecting monthly, prompts also to fill in "weekday". Tried with Satellite-6.1.0-RHEL-7-20150317.0
VERIFIED with sat6.1 Beta RC3.
This bug is slated to be released with Satellite 6.1.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1592