Project

General

Profile

Actions

Bug #3437

closed

"Global time settings: Time zone" error

Added by Dennis Cabooter over 11 years ago. Updated over 11 years ago.

Status:
Released
Priority:
3
Assignee:
Matthieu CERDA
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The following error appears in the web interface:

- Rule: Global time settings
  - Directive: Global time settings
    - Component: Time zone
      - Value: None
      - Message: Time zone could not be set (localtime file could not be changed)
      - Status: Error

Removing /etc/localtime makes the following error dissappear:

R: @@ntpConfiguration@@result_error@@87cd8f51-de03-43e4-88ea-bb4d55c27878@@342fc6d5-9399-4a93-87e0-9c7efd2d9727@@19@@Time 
zone@@None@@2013-04-1213:05:34+02:00##root@#Time zone could not be set (localtime file could not be changed)

After running cf-agent -KI a symlink is created:

lrwxrwxrwx 1 root root 25 Apr 12 11:07 /etc/localtime -> ../posix/Europe/Amsterdam

Running cf-agent -KI now produces the following output:

 -> Link /etc/localtime as promised
R: @@ntpConfiguration@@log_info@@87cd8f51-de03-43e4-88ea-bb4d55c27878@@342fc6d5-9399-4a93-87e0-9c7efd2d9727@@19@@Time zone@@None@@2013-04-12 
11:07:46+00:00##root@#Time zone was already set (localtime file didn't need changing)

The problem is in /var/rudder/cfengine-community/inputs/clockConfiguration/1.0/clockConfiguration.cf - the file to copy to /etc/localtime is a relative symlink:

lrwxrwxrwx 1 root root 25 Sep 15  2012 /usr/share/zoneinfo/Europe/Amsterdam -> ../posix/Europe/Amsterdam

I think the solution would be that, if the file to copy is a symlink, to first follow the symlink and then copy that file.

With the following patch it seems to be fixed:

--- /var/rudder/cfengine-community/inputs/common/1.0/rudder_lib.cf    2013-04-12 14:48:07.208471906 +0200
+++ /var/rudder/cfengine-community/inputs/common/1.0/rudder_lib.cf.orig    2013-04-12 14:47:51.280471263 +0200
@@ -278,9 +278,8 @@
 #########################################
 body copy_from digest_cp(from)
 {
-source            => "$(from)";
-compare           => "digest";
-copylink_patterns => { ".*" };
+source      => "$(from)";
+compare     => "digest";
 }

 ################################################

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #3404: Searching on Last Inventory Date is not working in Rudder 2.4ReleasedNicolas CHARLES2013-04-09Actions
Actions

Also available in: Atom PDF