Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each time I converge node resources changes #232

Closed
jsirex opened this issue Aug 11, 2014 · 6 comments
Closed

Each time I converge node resources changes #232

jsirex opened this issue Aug 11, 2014 · 6 comments

Comments

@jsirex
Copy link

jsirex commented Aug 11, 2014

    - update content in file /usr/sbin/a2ensite from 84536d to ce53f4       
        --- /usr/sbin/a2ensite  2014-08-11 09:33:29.711742498 +0000
        +++ /tmp/chef-rendered-template20140811-1730-9ry58g     2014-08-11 09:44:17.351333323 +0000
        @@ -66,7 +66,7 @@
         my $availdir = $ENV{ uc("APACHE_${dir}_AVAILABLE") }
             || "$confdir/$dir-available";
         my $enabldir = $ENV{ uc("APACHE_${dir}_ENABLED") } || "$confdir/$dir-enabled";
        -my $statedir = $ENV{ uc("APACHE_STATE_DIRECTORY") } || "/var/lib/apache2";
        +my $statedir = $ENV{ uc("APACHE_STATE_DIRECTORY") } || "/usr/lib/apache2";

         $statedir .= "/$obj";

statedir changes from /usr/... to /var/ and visa versa

@drpebcak
Copy link
Contributor

That would indicate that node['apache']['lib_dir'] is changing values. What platform is this? Are you using a wrapper or anything else, or just the apache2::default recipe?

@drpebcak
Copy link
Contributor

I'm not seeing this using our test-kitchen ubuntu-1204 environment.

@jsirex
Copy link
Author

jsirex commented Aug 12, 2014

I'm using debian and wrapper cookbook (without touching attributes).
Looks like it is not attributes problem. Not sure cookbook expects symlinks:

root@S499A:/usr/sbin# ls a2* -lha --color
lrwxrwxrwx 1 root root    7 Jul 23 16:21 a2disconf -> a2enmod
lrwxrwxrwx 1 root root    7 Jul 23 16:21 a2dismod -> a2enmod
lrwxrwxrwx 1 root root    7 Jul 23 16:21 a2dissite -> a2enmod
lrwxrwxrwx 1 root root    7 Jul 23 16:21 a2enconf -> a2enmod
-rwx------ 1 root root  14K Aug 12 11:21 a2enmod
lrwxrwxrwx 1 root root    7 Jul 23 16:21 a2ensite -> a2enmod
-rwxr-xr-x 1 root root 9.7K Jul 23 16:21 a2query

Each script from template attempts to override the same file:

  * template[/usr/sbin/a2enconf] action create[2014-08-12T11:46:59+03:00] WARN: File /usr/sbin/a2enconf managed by template[/usr/sbin/a2enconf] is really a symlink. Managing the source file instead.
[2014-08-12T11:46:59+03:00] WARN: Disable this warning by setting `manage_symlink_source true` on the resource
[2014-08-12T11:46:59+03:00] WARN: In a future Chef release, 'manage_symlink_source' will not be enabled by default

@drpebcak
Copy link
Contributor

Ah interesting. Yeah it is probably not handling those symlinks correctly. Looking at Ubuntu, it seems like some of them are symlinks as well. I'm going to try to set force_unlink true and see how that goes.

@drpebcak drpebcak added the bug label Aug 12, 2014
@drpebcak drpebcak self-assigned this Aug 12, 2014
@drpebcak
Copy link
Contributor

fixed in master

@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants