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

Fix segmentation fault in oned service when configured to cache mode. #6301

Closed

Conversation

alonbo2001
Copy link
Contributor

@alonbo2001 alonbo2001 commented Aug 18, 2023

Issue #6302
Description
After setting federation mode to be "CACHE" the XML/RPC server crash on segmentation fault.

To Reproduce

  • Configure "CACHE" API server - in /etc/one/oned.conf set federation mode to "CACHE" and set DB and MASTER_ONED.
  • sudo systemctl restart opennebula
  • send "one.zone.raftstatus" request to server.

Detailes

  • Hypervisor: KVM
  • version: 6.4.0

Program crashed when trying to call hm->trigger_send_event in Request.cc (hm is null).

Before :

if (!event.empty())
{
    hm->trigger_send_event(event);
}

After:

if (!nd.is_cache())
{
    if (!event.empty())
    {
        hm->trigger_send_event(event);
    }
}

When nebula is cache HookManager isn't initialize, therfore hm equals to null.

Before :
```
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
```

After:
```
     if (!nd.is_cache())
    {
        if (!event.empty())
        {
            hm->trigger_send_event(event);
        }
    }
```


When nebula is cache HookManager isn't initialize, therfore ```hm``` equals to null.
@rsmontero
Copy link
Member

Thanks! Merged as per d74ace5

@rsmontero rsmontero closed this Aug 21, 2023
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.

None yet

4 participants