Bug 2052048
Summary: | Repeated Ansible Role run scheduling adds extra time to specified start date | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Danny Synk <dsynk> |
Component: | Ansible - Configuration Management | Assignee: | Adam Ruzicka <aruzicka> |
Status: | CLOSED ERRATA | QA Contact: | Danny Synk <dsynk> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.11.0 | CC: | aruzicka, ehelms, lstejska, oezr, pmendezh |
Target Milestone: | 6.11.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | tfm-rubygem-foreman_remote_execution-5.0.6, tfm-rubygem-foreman-tasks-5.2.3 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-07-05 14:32:53 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: |
Description
Danny Synk
2022-02-08 15:19:56 UTC
Created redmine issue https://projects.theforeman.org/issues/34691 from this bug Hi, I've been successful in reproducing the issue on my local development setup (latest develop), sadly I still didn't find the way how to fix it, here are my observations so far: UC1: Foreman and the user both in "Europe/Prague (CEST, +0200)" zone * Set recurring job: 00:30, monthly, 30.04.2022 When you submit the form, parameters sent are `"scheduling"=>{"startAt"=>"2022-04-29T22:30:00.000Z"}` and job is planned correctly. UC2: Foreman and user in "America/Toronto (EDT, -0400)" zone * Set recurring job: 00:30, monthly, 30.04.2022 When you submit the form, parameters sent are `"scheduling"=>{"startAt"=>"2022-04-06T04:30:00.000Z"}` For some reason frontend code is changing the date to 06.04.2022, not sure why. I will continue in the investigation and share my progress when I'll have more information. Also want to note that this issue is not for recurring jobs in remote executions, it's just for Ansible plugin I did some more testing and I was able to reproduce the issue with creating job invocation with recurring logic from the job invocation form, so I believe that the issue is in the foreman-tasks plugin rather than in the foreman-ansible. **Steps to reproduce the issue:** - Set your dev environment timezone to "EDT -0400", for example "America/Kentucky/Monticello (EDT, -0400)" - (user should get the time zone from the browser) - Create job with following parameters: Search Query: "name ~ *" command: "date" Schedule: "Set up recurring execution" Repeats: "monthly" Days: "30" At: "00:30" Starts at: "2022-04-30 00:30" The scheduled start date is "2022-05-30 00:30:00 -0400", one month later, which is wrong. If you set the time zone to "Europe/Prague (CEST, +0200)", the scheduled start date is correctly "2022-04-30 00:30:00 +0200". --- @aruzicka Could you please take a look? I may be wrong and the issue is somewhere else but this is all I've got so far. Fixes will land in foreman-tasks and foreman_remote_execution. Leaving the component set to ansible as the new ansible workflow makes it rather easy to trigger the bug. Fixes were merged in upstream, setting fixed-in-release, upstream releases will go out end of week-ish Releases with fixes just went out. Verified on Satellite 6.11, snap 18 running on both RHEL 7 and RHEL 8. Steps to Test: 1. Register a host to Satellite. 2. Import Ansible Roles to Satellite. 3. Assign an Ansible Role to the host. 4. Navigate to Hosts > All Hosts > [hostname], select the `Ansible` tab, then select the the `Jobs` subtab. 5. Click the `Schedule recurring job` button. 6. Schedule an hourly job with a start time of 12:00 and a start date of tomorrow. 7. Note the start time of the next run by hovering the mouse pointer over the value in the `Next Run` column. 8. Cancel the scheduled job. 9. Repeat steps 6-8 with daily, weekly, and monthly repetition schedules. Expected Results: The start date and time of the first run match the values entered when the job is created. Actual Results: The start date and time of the first run match the values entered when the job is created. 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 (Moderate: Satellite 6.11 Release), 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-2022:5498 |