Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1914902 - hammer cli --start-at not honoring iso8601 timezone
Summary: hammer cli --start-at not honoring iso8601 timezone
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.8.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: 6.10.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-11 13:00 UTC by Ram Nainsingh Tiruwa
Modified: 2021-11-16 14:09 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-foreman_remote_execution-4.5.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:09:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31705 0 Normal New hammer cli --start-at not honoring iso8601 timezone 2021-08-05 14:29:01 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:09:55 UTC

Description Ram Nainsingh Tiruwa 2021-01-11 13:00:56 UTC
documentation claims iso8601 timezone support with hammer, but it does not.

Job created with below syntax

hammer job-invocation create --job-template "Run Command - SSH Default" --inputs command="/bin/echo this works" --search-query "host_collection ~ test collection" --start-at "2021-01-07T14:05:00-05:00"

Below is the code for remote execution

foreman_remote_execution-3.3.7.2/app/models/job_invocation_composer.rb
...
Time.parse(datetime).strftime('%Y-%m-%d %H:%M')
...

Comment 1 Adam Ruzicka 2021-01-14 12:30:26 UTC
So what date is recorded in the end?

I would assume the snippet you provided takes the date string parses it from whatever format it is in and then once we have a time object in server's timezone, we dump it back into antoher string for further processing.

Comment 5 Peter Ondrejka 2021-08-16 13:37:55 UTC
Verified on Satellite 6.10 sn 13


~]# hammer job-invocation create --job-template "Run Command - SSH Default" --inputs command="/bin/echo this works" --search-query "..." --start-at "2021-08-16T15:36:27+02:00"
Job invocation 7 created
~]# hammer job-invocation list
---|-----------------------------------------|-----------|---------|--------|---------|-------|------------------------
ID | DESCRIPTION                             | STATUS    | SUCCESS | FAILED | PENDING | TOTAL | START                  
---|-----------------------------------------|-----------|---------|--------|---------|-------|------------------------
7  | Run /bin/echo this works                | queued    | N/A     | N/A    | N/A     | N/A   | 2021-08-16 13:36:00 UTC

Comment 8 errata-xmlrpc 2021-11-16 14:09:44 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 (Moderate: Satellite 6.10 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-2021:4702


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