pacemaker  2.1.3-ea053b43a
Scalable High-Availability cluster resource manager
Macros | Functions
systemd.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/services.h>
#include <crm/services_internal.h>
#include <crm/common/mainloop.h>
#include <sys/stat.h>
#include <gio/gio.h>
#include <services_private.h>
#include <systemd.h>
#include <dbus/dbus.h>
#include <pcmk-dbus.h>
Include dependency graph for systemd.c:

Go to the source code of this file.

Macros

#define BUS_NAME   "org.freedesktop.systemd1"
 
#define BUS_NAME_MANAGER   BUS_NAME ".Manager"
 
#define BUS_NAME_UNIT   BUS_NAME ".Unit"
 
#define BUS_PATH   "/org/freedesktop/systemd1"
 
#define METADATA_FORMAT
 
#define SYSTEMD_OVERRIDE_ROOT   "/run/systemd/system/"
 
#define SYSTEMD_OVERRIDE_TEMPLATE
 

Functions

int services__systemd_prepare (svc_action_t *op)
 
enum ocf_exitcode services__systemd2ocf (int exit_status)
 
void systemd_cleanup (void)
 
GList * systemd_unit_listall (void)
 
gboolean systemd_unit_exists (const char *name)
 
int services__execute_systemd (svc_action_t *op)
 

Macro Definition Documentation

◆ BUS_NAME

#define BUS_NAME   "org.freedesktop.systemd1"

Definition at line 25 of file systemd.c.

◆ BUS_NAME_MANAGER

#define BUS_NAME_MANAGER   BUS_NAME ".Manager"

Definition at line 26 of file systemd.c.

◆ BUS_NAME_UNIT

#define BUS_NAME_UNIT   BUS_NAME ".Unit"

Definition at line 27 of file systemd.c.

◆ BUS_PATH

#define BUS_PATH   "/org/freedesktop/systemd1"

Definition at line 28 of file systemd.c.

◆ METADATA_FORMAT

#define METADATA_FORMAT
Value:
"<?xml version=\"1.0\"?>\n" \
"<!DOCTYPE resource-agent SYSTEM \"ra-api-1.dtd\">\n" \
"<resource-agent name=\"%s\" version=\"" PCMK_DEFAULT_AGENT_VERSION "\">\n" \
" <version>1.1</version>\n" \
" <longdesc lang=\"en\">\n" \
" %s\n" \
" </longdesc>\n" \
" <shortdesc lang=\"en\">systemd unit file for %s</shortdesc>\n" \
" <parameters/>\n" \
" <actions>\n" \
" <action name=\"start\" timeout=\"100\" />\n" \
" <action name=\"stop\" timeout=\"100\" />\n" \
" <action name=\"status\" timeout=\"100\" />\n" \
" <action name=\"monitor\" timeout=\"100\" interval=\"60\"/>\n" \
" <action name=\"meta-data\" timeout=\"5\" />\n" \
" </actions>\n" \
" <special tag=\"systemd\"/>\n" \
"</resource-agent>\n"
#define PCMK_DEFAULT_AGENT_VERSION
Definition: services.h:55

Definition at line 660 of file systemd.c.

◆ SYSTEMD_OVERRIDE_ROOT

#define SYSTEMD_OVERRIDE_ROOT   "/run/systemd/system/"

Definition at line 776 of file systemd.c.

◆ SYSTEMD_OVERRIDE_TEMPLATE

#define SYSTEMD_OVERRIDE_TEMPLATE
Value:
"[Unit]\n" \
"Description=Cluster Controlled %s\n" \
"Before=pacemaker.service pacemaker_remote.service\n" \
"\n" \
"[Service]\n" \
"Restart=no\n"

Definition at line 787 of file systemd.c.

Function Documentation

◆ services__execute_systemd()

int services__execute_systemd ( svc_action_t op)

Definition at line 1049 of file systemd.c.

◆ services__systemd2ocf()

enum ocf_exitcode services__systemd2ocf ( int  exit_status)

Definition at line 57 of file systemd.c.

◆ services__systemd_prepare()

int services__systemd_prepare ( svc_action_t op)

Definition at line 39 of file systemd.c.

◆ systemd_cleanup()

void systemd_cleanup ( void  )

Definition at line 171 of file systemd.c.

◆ systemd_unit_exists()

gboolean systemd_unit_exists ( const char *  name)

Definition at line 632 of file systemd.c.

◆ systemd_unit_listall()

GList* systemd_unit_listall ( void  )

Definition at line 535 of file systemd.c.