icinga2: address comment loading where host reference is not found#9861
icinga2: address comment loading where host reference is not found#9861julianbrost merged 2 commits intoIcinga:masterfrom
Conversation
|
Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA). Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA. After that, please reply here with a comment and we'll verify. Contributors that have not signed yet: @ymartin-ovh Details
|
|
Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA). Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA. After that, please reply here with a comment and we'll verify. Contributors that have not signed yet: @ymartin-ovh Details
|
|
@cla-bot check |
|
@Al2Klimov Please explain what #7786 has to do with this/what exactly this is supposed to fix here. Anyways, |
|
Hello @julianbrost / @Al2Klimov Should I rebase my diff with just null check in comment.cpp ? Regards |
|
Hello @Al2Klimov I can do that but the commit you want does not address the bug I submitted. Regards |
a27c6cf to
efdd1ff
Compare
|
I rollback to my original contribution about null reference check. |
address Icinga#9752: check if host reference is valid
|
Hello Do you plan to integrate this fix in 2.14.x branch too ? We have this issue in 2.14, I maintain my own build because of this. Regards |
| if (GetServiceName().IsEmpty() || ! host) | ||
| m_Checkable = host; | ||
| else | ||
| m_Checkable = host->GetServiceByShortName(GetServiceName()); |
There was a problem hiding this comment.
- Colleagues, wanna get this little thing done, so that OP can test Satellite sync failure #9752 with snapshot packages?
There was a problem hiding this comment.
julianbrost
left a comment
There was a problem hiding this comment.
Given that there's error handling for m_Checkable being nullptr following, it looks it host (which is a possible value for m_Checkable is expected to possibly be nullptr:
icinga2/lib/icinga/comment.cpp
Lines 73 to 74 in 9a000f3
So that check looks like a good idea indeed.
Side note: while quickly reading over the related issue, I noticed the following comment (#9752 (comment)):
I'm trying to understand why master does not send hostgroups configuration first.
Actually, the config object send order was tweaked by the just merged #10000, so that could also have an effect here. Though, as per what I wrote earlier in this comment, having a nullptr check here is a good idea nonetheless.
|
address #9752: check if host reference is valid