Commit Graph

9 Commits

Author SHA1 Message Date
Jan Friesse
5afcf3116a Qdevice: Do not call cmap_dispatch in sync
When corosync is during sync operation cmap_dispatch blocks.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:42 +02:00
Jan Friesse
509d4b1511 qdevice: Ensure to exit if ipc socket is closed
When ipc socket was closed before poll and new connection got same fd as
original IPC socket, shutdown didn't work. Solution is to check if IPC
socket is active during poll array create.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:42 +02:00
Jan Friesse
25b50ed9f8 Qdevice: Allow compiler warn about unhandled case
Remove default case where switch selection is made on top of enum value.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:41 +02:00
Jan Friesse
a920beb618 qdevice: Properly free IPC data on exit
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:41 +02:00
Jan Friesse
e24908fafc qdevice: Sending error (output) in IPC
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:41 +02:00
Jan Friesse
40ca891974 qdevice: Improve socket based IPC
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:41 +02:00
Jan Friesse
415436a105 qdevice: Add preliminary version of IPC
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00
Jan Friesse
ea7611a9dd qdevice: Add support for daemonize
Also local unix socket is now created. In future this is going to be
used for qdevice-tool, for now it's used only for handling SIGINT and
SIGTERM.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00
Jan Friesse
131cfbe4ae Refactor qdevice-net
- corosync-device-net as binary is gone. Replacement is
  corosync-qdevice
- corosync-qdevice has support for multiple models (only net is
  currently implemented)
- Completelly redesign qdevice-net main loop.
  - Connect is non blocking
  - Cmap and Votequorum events are handled even before connect to
    qnetd. Algorithm gets send_node_list and vote set so it's not needed
    to check connection status and also vote_timer is running and voting
    until something changes (configuration or votequorum node list)
  - If connect fails, algorithm_disconnected with new reason
    CANT_CONNECT_TO_THE_SERVER is called
- Logging for qdevice is based on libqb logging functions. Also
  logging configuration from corosync.conf is now used and dynamic
  changes of configuration are handled.
- Added qdevice_net_algorithm_config_node_list_changed
- Changed qdevice_net_algorithm_votequorum_node_list_notify in respect
  of adding  send_node_list so it's similar to other functions.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00