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

[dev.icinga.com #11347] Symlink subfolders not followed/considered for config files #4016

Closed
icinga-migration opened this issue Mar 10, 2016 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11347

Created by Napsty on 2016-03-10 08:03:18 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-03-22 07:25:05 +00:00)
Target Version: 2.4.5
Last Update: 2016-04-20 08:15:58 +00:00 (in Redmine)

Icinga Version: 2.4.3
Backport?: Already backported
Include in Changelog: 1

As mentioned in the mailing list (https://lists.icinga.org/pipermail/icinga-users/2016-March/010903.html), symlinked subfolders containing config files are ignored by Icinga2.
Practical example:

/etc/icinga2/zones.d/zone-1/hosts/ : Normal directory, containing config files
/etc/icinga2/zones.d/zone-1/i2ac : Symbolic link pointing to /etc/i2ac/zone-1
/etc/i2ac/zone-1/: Normal directory, containing config files

All config files within /etc/icinga2/zones.d/zone-1/hosts/ are parsed.
All config files within /etc/icinga2/zones.d/zone-1/i2ac/ are ignored.

You can reproduce this very easily as this happens generally on all subfolders.

Attachments

Changesets

2016-03-22 07:22:11 +00:00 by (unknown) 71060be

Follow symlinks in Utility::GlobRecursive

fixes #11347

2016-04-20 08:07:22 +00:00 by (unknown) 97f324a

Follow symlinks in Utility::GlobRecursive

fixes #11347
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-18 10:25:40 +00:00

  • Category set to libbase
  • Status changed from New to Assigned
  • Assigned to set to gbeutner

Hi Gunnar,

can you please have a look? :)

Thanks,
Michael

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-03-22 07:22:57 +00:00

This should be fixed in the master branch. Please test the patch and see if it works for you. Once the patch has been tested we're going to evaluate merging it into for 2.4.5.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-03-22 07:23:30 +00:00

  • Target Version set to 2.4.5

@icinga-migration
Copy link
Author

Updated by Anonymous on 2016-03-22 07:25:05 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 71060be.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-22 11:42:57 +00:00

  • File added icinga2_11347_symlink_dir.png

Works as expected, thank you :)

mkdir /usr/local/icinga2/etc/symlink
vim /usr/local/icinga2/etc/symlink/test.conf

object Host "symlink-host" { check_command = "hostalive" }

ln -s /usr/local/icinga2/etc/symlink /usr/local/icinga2/etc/icinga2/conf.d/symlink

# icinga2 daemon | grep symlink
[2016-03-22 12:40:57 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/symlink/test.conf

icinga2_11347_symlink_dir.png

@icinga-migration
Copy link
Author

Updated by Napsty on 2016-04-01 07:19:10 +00:00

Additional information to this bug: It breaks the sync between master and satellite servers.
See mailing list https://lists.icinga.org/pipermail/icinga-users/2016-April/010964.html.

But this is probably fixed too with changeset https://dev.icinga.org/projects/i2/repository/revisions/71060be89a43891a36203a2be7d9007919b8927f.

I didn't have the time yet to test 2.4.5/git master but will soon and report back.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-04-20 08:15:58 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration icinga-migration added bug Something isn't working libbase labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.5 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant