Bug 1199246 - unable to update openscap policy due to broken schedule feature
Summary: unable to update openscap policy due to broken schedule feature
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Shlomi Zadok
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks: 1047797
TreeView+ depends on / blocked
 
Reported: 2015-03-05 17:54 UTC by Kedar Bidarkar
Modified: 2019-04-01 20:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:29:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Kedar Bidarkar 2015-03-05 17:54:52 UTC
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:

Comment 1 Kedar Bidarkar 2015-03-05 18:03:54 UTC
Also it feels like currently creating a cron_line is broken even during creation of policy.

Comment 3 Kedar Bidarkar 2015-03-05 18:25:37 UTC
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"}

Comment 4 Shlomi Zadok 2015-03-09 08:23:13 UTC
Proposed fix upstream: https://github.com/OpenSCAP/foreman_openscap/pull/92

Comment 7 Kedar Bidarkar 2015-03-25 09:50:21 UTC
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

Comment 10 Kedar Bidarkar 2015-04-02 15:09:13 UTC
VERIFIED with sat6.1 Beta RC3.

Comment 11 Bryan Kearney 2015-08-11 13:31:30 UTC
This bug is slated to be released with Satellite 6.1.

Comment 12 errata-xmlrpc 2015-08-12 05:29:01 UTC
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


Note You need to log in before you can comment on or make changes to this bug.