root/daemons/execd/pacemaker-execd.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2012-2024 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef PACEMAKER_EXECD__H
  11 #  define PACEMAKER_EXECD__H
  12 
  13 #  include <glib.h>
  14 #  include <crm/common/ipc_internal.h>
  15 #  include <crm/lrmd.h>
  16 #  include <crm/stonith-ng.h>
  17 
  18 #  include <gnutls/gnutls.h>
  19 
  20 extern GHashTable *rsc_list;
  21 extern time_t start_time;
  22 
  23 typedef struct lrmd_rsc_s {
  24     char *rsc_id;
  25     char *class;
  26     char *provider;
  27     char *type;
  28 
  29     int call_opts;
  30 
  31     /* NEVER dereference this pointer,
  32      * It simply exists as a switch to let us know
  33      * when the currently active operation has completed */
  34     void *active;
  35 
  36     /* Operations in this list
  37      * have not been executed yet. */
  38     GList *pending_ops;
  39     /* Operations in this list are recurring operations
  40      * that have been handed off from the pending ops list. */
  41     GList *recurring_ops;
  42 
  43     /* If this resource is a fence device, probes are handled internally by the
  44      * executor, and this value indicates the result that should currently be
  45      * returned for probes. It should be one of:
  46      * PCMK_EXEC_DONE (to indicate "running"),
  47      * PCMK_EXEC_NO_FENCE_DEVICE ("not running"), or
  48      * PCMK_EXEC_NOT_CONNECTED ("unknown because fencer connection was lost").
  49      */
  50     pcmk__action_result_t fence_probe_result;
  51 
  52     crm_trigger_t *work;
  53 } lrmd_rsc_t;
  54 
  55 // in remoted_tls.c
  56 int lrmd_init_remote_tls_server(void);
  57 void execd_stop_tls_server(void);
  58 
  59 int lrmd_server_send_reply(pcmk__client_t *client, uint32_t id, xmlNode *reply);
  60 
  61 int lrmd_server_send_notify(pcmk__client_t *client, xmlNode *msg);
  62 
  63 void notify_of_new_client(pcmk__client_t *new_client);
  64 
  65 void process_lrmd_message(pcmk__client_t *client, uint32_t id,
  66                           xmlNode *request);
  67 
  68 void free_rsc(gpointer data);
  69 
  70 void handle_shutdown_ack(void);
  71 
  72 void handle_shutdown_nack(void);
  73 
  74 void lrmd_client_destroy(pcmk__client_t *client);
  75 
  76 void client_disconnect_cleanup(const char *client_id);
  77 
  78 /*!
  79  * \brief Don't worry about freeing this connection. It is
  80  *        taken care of after mainloop exits by the main() function.
  81  */
  82 stonith_t *get_stonith_connection(void);
  83 
  84 /*!
  85  * \brief This is a callback that tells the lrmd
  86  * the current stonith connection has gone away. This allows
  87  * us to timeout any pending stonith commands
  88  */
  89 void stonith_connection_failed(void);
  90 
  91 #ifdef PCMK__COMPILE_REMOTE
  92 void ipc_proxy_init(void);
  93 void ipc_proxy_cleanup(void);
  94 void ipc_proxy_add_provider(pcmk__client_t *client);
  95 void ipc_proxy_remove_provider(pcmk__client_t *client);
  96 void ipc_proxy_forward_client(pcmk__client_t *client, xmlNode *xml);
  97 pcmk__client_t *ipc_proxy_get_provider(void);
  98 int ipc_proxy_shutdown_req(pcmk__client_t *ipc_proxy);
  99 void remoted_spawn_pidone(int argc, char **argv, char **envp);
 100 void remoted_request_cib_schema_files(void);
 101 #endif
 102 
 103 int process_lrmd_alert_exec(pcmk__client_t *client, uint32_t id,
 104                             xmlNode *request);
 105 void lrmd_drain_alerts(GMainLoop *mloop);
 106 
 107 #endif // PACEMAKER_EXECD__H

/* [previous][next][first][last][top][bottom][index][help] */