Project

General

Profile

Bug #4963

RHEL 3 and 4 don't report correctly due to "/bin/date: unrecognized option `--rfc-3339=second'"

Added by Jonathan CLARKE almost 6 years ago. Updated almost 6 years ago.

Status:
Released
Priority:
1
Category:
System techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

On RHEL 3 and 4 nodes we're seeing these reports:

/var/log/rudder/reports/all.log:Jun  5 04:19:26 abc-redhat4 rudder[19333]: R: @@sudoParameters@@result_success@@32377fd7-02fd-43d0-aab7-28460a91347b@@fe31a994-efa1-4883-acab-4106a277ca84@@58@@Install@@None@@/bin/date: unrecognized option `--rfc-3339=second' Try `/bin/date --help' for more information.##4ff62b4b-2b89-4fbe-ac9f-08f0008898bf@#sudo already installed

This option does not exist on all Linux systems.


Related issues

Related to Rudder - User story #4967: Adapt "/bin/date" command to use options available on all OSes in system promisesReleased2014-06-09Jonathan CLARKEActions
#1

Updated by Jonathan CLARKE almost 6 years ago

Unfortunately, the format we expect contains the timezone offset with ":" in the middle. This option is also not avialable on older OSes.

To workaround this, I'm going to have to use this hack:

/bin/date -u "+%Y-%m-%d %T+00:00" 

This prints out the date in UTC and forces the timezone offset to 00:00, to ensure the format.

#2

Updated by Jonathan CLARKE almost 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/395
#3

Updated by Nicolas CHARLES almost 6 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE

Jon,

i,ve asked questions on the PR

#4

Updated by Jonathan CLARKE almost 6 years ago

  • Status changed from Discussion to Pending release
  • % Done changed from 0 to 100

Applied in changeset policy-templates:commit:607e04e00c525450d71e63a688e1eff694eda458.

#5

Updated by Nicolas CHARLES almost 6 years ago

Applied in changeset policy-templates:commit:52d8550360b95187128c21707f370b429334e38e.

#6

Updated by Jonathan CLARKE almost 6 years ago

PR updated. We chose to:

  1. Fix this on 2.6-2.10 branches by making the change for RHEL3/RHEL4 only, and not modifying the date format for other OSes (minimal changes)
  2. Fix this in 2.11+ branch by making the change for all OSes, so that it is compatible with any OSes that we discover as time goes

While working on this, I discovered that the failsafe.cf file from initial-pormises doesn't have a failsafe.cf file, which means that any reports from it will look pretty broken. I've opened a separate bug for that: #4966

#7

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder versions that were released today.

Also available in: Atom PDF