Skip to content

Conversation

@glensc
Copy link
Contributor

@glensc glensc commented Nov 26, 2013

somewhy notifies :reload does not even invoke initscript, and as reload
and restart actions are identical in pld this change is okay

i initially thought the problem is identical as #13, but was not, :immediately did not help
also tried to add supports [:reload] to service the reload methods just were not called out. tried to debug in chef, but got lost quite soon.

anyway, this is safe to add as code what gets invoked is identical

somewhy notifies :reload does not even invoke initscript, and as reload
and restart actions are identical in pld this change is okay
@glensc
Copy link
Contributor Author

glensc commented Nov 26, 2013

# rm -fv  /etc/localtime  /etc/sysconfig/timezone  
removed ‘/etc/localtime’
removed ‘/etc/sysconfig/timezone’

# chef-client -o 'recipe[timezone-ii::pld]' -l debug 
...
Recipe: timezone-ii::pld
  * template[/etc/sysconfig/timezone] action create[2013-11-26T23:00:07+00:00] INFO: Processing template[/etc/sysconfig/timezone] action create (timezone-ii::pld line 15)
[2013-11-26T23:00:07+00:00] DEBUG: Not fetching cookbooks/timezone-ii/templates/pld/timezone.conf.erb, as the cache is up to date.
[2013-11-26T23:00:07+00:00] DEBUG: current checksum: 99dc30cf96840037fbdebfe397163df7; manifest checksum: 99dc30cf96840037fbdebfe397163df7)
[2013-11-26T23:00:07+00:00] DEBUG: touching /etc/sysconfig/timezone to create it
[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] created file /etc/sysconfig/timezone

    - create new file /etc/sysconfig/timezone[2013-11-26T23:00:07+00:00] DEBUG: running: diff -u /etc/sysconfig/timezone /tmp/chef-rendered-template20131126-24376-186x9cv
--- /etc/sysconfig/timezone     2013-11-26 23:00:07.181608692 +0000
+++ /tmp/chef-rendered-template20131126-24376-186x9cv   2013-11-26 23:00:07.181608692 +0000
@@ -0,0 +1,10 @@
+# Time zone information.
+
+# Directory containing zone information files.
+ZONE_INFO_DIR="/usr/share/zoneinfo"
+
+# Scheme you would like to use in your system.
+ZONE_INFO_SCHEME="posix"
+
+# Name of the time zone for your system.
+TIMEZONE="Europe/Tallinn"
[2013-11-26T23:00:07+00:00] DEBUG: reading modes from /etc/sysconfig/timezone file
[2013-11-26T23:00:07+00:00] DEBUG: applying mode = 660, uid = 0, gid = 0 to /tmp/chef-rendered-template20131126-24376-186x9cv
[2013-11-26T23:00:07+00:00] DEBUG: moving temporary file /tmp/chef-rendered-template20131126-24376-186x9cv into place at /etc/sysconfig/timezone
[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] updated file contents /etc/sysconfig/timezone

    - update content in file /etc/sysconfig/timezone from none to 20782f
        --- /etc/sysconfig/timezone     2013-11-26 23:00:07.181608692 +0000
        +++ /tmp/chef-rendered-template20131126-24376-186x9cv   2013-11-26 23:00:07.181608692 +0000
        @@ -0,0 +1,10 @@
        +# Time zone information.
        +
        +# Directory containing zone information files.
        +ZONE_INFO_DIR="/usr/share/zoneinfo"
        +
        +# Scheme you would like to use in your system.
        +ZONE_INFO_SCHEME="posix"
        +
        +# Name of the time zone for your system.
        +TIMEZONE="Europe/Tallinn"[2013-11-26T23:00:07+00:00] DEBUG: found current_mode == nil, so we are creating a new file, updating mode
[2013-11-26T23:00:07+00:00] DEBUG: found current_mode == nil, so we are creating a new file, updating mode
[2013-11-26T23:00:07+00:00] DEBUG: found current_uid == nil, so we are creating a new file, updating owner
[2013-11-26T23:00:07+00:00] DEBUG: found current_gid == nil, so we are creating a new file, updating group
[2013-11-26T23:00:07+00:00] DEBUG: found current_uid == nil, so we are creating a new file, updating owner
[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] owner changed to 0
[2013-11-26T23:00:07+00:00] DEBUG: found current_gid == nil, so we are creating a new file, updating group
[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] group changed to 0
[2013-11-26T23:00:07+00:00] DEBUG: found current_mode == nil, so we are creating a new file, updating mode
[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] mode changed to 644

    - change mode from '' to '0644'
    - change owner from '' to 'root'
    - change group from '' to 'root'[2013-11-26T23:00:07+00:00] DEBUG: selinux utilities can not be found. Skipping selinux permission fixup.


[2013-11-26T23:00:07+00:00] INFO: template[/etc/sysconfig/timezone] sending restart action to service[timezone] (immediate)
  * service[timezone] action restart[2013-11-26T23:00:07+00:00] INFO: Processing service[timezone] action restart (timezone-ii::pld line 23)
[2013-11-26T23:00:07+00:00] DEBUG: service[timezone] supports status, running
timezone        0:off   1:off   2:on    3:on    4:on    5:on    6:off
[2013-11-27T01:00:08+02:00] INFO: service[timezone] restarted

    - restart service service[timezone]

  * service[timezone] action nothing[2013-11-27T01:00:08+02:00] INFO: Processing service[timezone] action nothing (timezone-ii::pld line 23)
 (skipped due to action :nothing)
[2013-11-27T01:00:08+02:00] DEBUG: Skipping service[timezone] due to action :nothing
...

# ls -l /etc/localtime /etc/sysconfig/timezone
-rw-r--r-- 1 root root 2175 okt   28 17:43 /etc/localtime
-rw-r--r-- 1 root root  250 nov   27 01:00 /etc/sysconfig/timezone

@glensc
Copy link
Contributor Author

glensc commented Aug 28, 2014

@L2G ping

@timvisher
Copy link

@L2G ping :)

@glensc
Copy link
Contributor Author

glensc commented Aug 9, 2017

@L2G ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants