Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Conversation

@hfinucane
Copy link
Contributor

I managed to really bobble this in #332- see the documentation for the warning about the new ConfigDir variable. Anything that uses it needs to be changed to be relative to SysconfDir+"/icinga2/"-

object NotificationCommand "mail-service-notification" {
-  command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
+  command = [ ConfigDir + "/scripts/mail-service-notification.sh" ]

being the example diff. This will finish the transition in this cookbook.

Without this, if you use the examples, you will get errors in the logs that look like

terminated with exit code 128, output: execvpe(/etc/icinga2/icinga2/scripts/mail-service-notification.sh) failed: No such file or directory

and notifications will not work.

I managed to really bobble this- see [the
documentation](https://github.com/Icinga/icinga2/blob/master/doc/16-upgrading-icinga-2.md#path-constant-changes-)
for the warning about the new ConfigDir variable. Anything that uses it
needs to be changed to be relative to SysconfDir+"/icinga2/"-

```
object NotificationCommand "mail-service-notification" {
-  command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
+  command = [ ConfigDir + "/scripts/mail-service-notification.sh" ]
```

being the example diff. This will finish the transition in this
cookbook.

Without this, if you use the examples, you will get errors in the logs
that look like
```
terminated with exit code 128, output: execvpe(/etc/icinga2/icinga2/scripts/mail-service-notification.sh) failed: No such file or directory
```

and notifications will not work.
ca_path 'ConfigDir + "/icinga2/pki/ca.crt"'
cert_path 'ConfigDir + "/pki/" + NodeName + ".crt"'
key_path 'ConfigDir + "/pki/" + NodeName + ".key"'
ca_path 'ConfigDir + "/pki/ca.crt"'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These paths have been deprecated in 2.8. While at it, think about a possible change here to /var/lib... as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/Icinga/icinga2/blob/master/doc/16-upgrading-icinga-2.md#upgrading-to-v28- oh shoot.

Icinga 2 automatically migrates the certificates to the new default location if they are configured and detected in /etc/icinga2/pki.

makes it sound like Icinga is papering over that under the covers, at least. I kind of want to address that in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been sitting there, but likely not forever. Just wanted to mention it, thanks for taking care :)

@lippserd lippserd requested a review from vkhatri October 9, 2020 07:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants