pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Macros | Functions
upstart.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/services.h>
#include <crm/common/mainloop.h>
#include <services_private.h>
#include <upstart.h>
#include <dbus/dbus.h>
#include <pcmk-dbus.h>
#include <glib.h>
#include <gio/gio.h>
Include dependency graph for upstart.c:

Go to the source code of this file.

Macros

#define BUS_NAME   "com.ubuntu.Upstart"
 
#define BUS_PATH   "/com/ubuntu/Upstart"
 
#define UPSTART_06_API   BUS_NAME"0_6"
 
#define UPSTART_JOB_IFACE   UPSTART_06_API".Job"
 
#define BUS_PROPERTY_IFACE   "org.freedesktop.DBus.Properties"
 
#define METADATA_FORMAT
 

Functions

int services__upstart_prepare (svc_action_t *op)
 
enum ocf_exitcode services__upstart2ocf (int exit_status)
 
void upstart_cleanup (void)
 
GList * upstart_job_listall (void)
 
gboolean upstart_job_exists (const char *name)
 
int services__execute_upstart (svc_action_t *op)
 

Macro Definition Documentation

◆ BUS_NAME

#define BUS_NAME   "com.ubuntu.Upstart"

Definition at line 29 of file upstart.c.

◆ BUS_PATH

#define BUS_PATH   "/com/ubuntu/Upstart"

Definition at line 30 of file upstart.c.

◆ BUS_PROPERTY_IFACE

#define BUS_PROPERTY_IFACE   "org.freedesktop.DBus.Properties"

Definition at line 34 of file upstart.c.

◆ METADATA_FORMAT

#define METADATA_FORMAT
Value:
"<?xml " PCMK_XA_VERSION "=\"1.0\"?>\n" \
PCMK_XA_NAME "=\"%s\" " \
PCMK_XA_VERSION "=\"" PCMK_DEFAULT_AGENT_VERSION "\">\n" \
" <" PCMK_XE_VERSION ">1.1</" PCMK_XE_VERSION ">\n" \
" <" PCMK_XE_LONGDESC " " PCMK_XA_LANG "=\"" PCMK__VALUE_EN "\">\n" \
" Upstart agent for controlling the system %s service\n" \
" </" PCMK_XE_LONGDESC ">\n" \
"Upstart job for %s" \
"</" PCMK_XE_SHORTDESC ">\n" \
" <" PCMK_XE_PARAMETERS "/>\n" \
" <" PCMK_XE_ACTIONS ">\n" \
" " PCMK_META_TIMEOUT "=\"15s\" />\n" \
" " PCMK_META_TIMEOUT "=\"15s\" />\n" \
" " PCMK_META_TIMEOUT "=\"15s\" />\n" \
" <" PCMK_XE_ACTION " " PCMK_XA_NAME "=\"restart\"" \
" " PCMK_META_TIMEOUT "=\"15s\" />\n" \
" " PCMK_META_TIMEOUT "=\"15s\"" \
" " PCMK_META_INTERVAL "=\"15s\"" \
" " PCMK_META_START_DELAY "=\"15s\" />\n" \
" " PCMK_META_TIMEOUT "=\"5s\" />\n" \
" </" PCMK_XE_ACTIONS ">\n" \
" <" PCMK_XE_SPECIAL " " PCMK_XA_TAG "=\"upstart\"/>\n" \
#define PCMK_XA_NAME
Definition: xml_names.h:325
#define PCMK_XA_TAG
Definition: xml_names.h:412
#define PCMK_ACTION_META_DATA
Definition: actions.h:56
#define PCMK_ACTION_MONITOR
Definition: actions.h:60
#define PCMK_XE_PARAMETERS
Definition: xml_names.h:156
#define PCMK_XE_LONGDESC
Definition: xml_names.h:126
#define PCMK_ACTION_STATUS
Definition: actions.h:73
#define PCMK_XE_VERSION
Definition: xml_names.h:215
#define PCMK__VALUE_EN
#define PCMK_META_START_DELAY
Definition: options.h:112
#define PCMK_ACTION_START
Definition: actions.h:72
#define PCMK_ACTION_STOP
Definition: actions.h:75
#define PCMK_META_TIMEOUT
Definition: options.h:114
#define PCMK_XE_SHORTDESC
Definition: xml_names.h:195
#define PCMK_XE_RESOURCE_AGENT
Definition: xml_names.h:169
#define PCMK_META_INTERVAL
Definition: options.h:91
#define PCMK_XE_ACTION
Definition: xml_names.h:60
#define PCMK_XE_ACTIONS
Definition: xml_names.h:61
#define PCMK_DEFAULT_AGENT_VERSION
Definition: services.h:49
#define PCMK_XA_LANG
Definition: xml_names.h:308
#define PCMK_XE_SPECIAL
Definition: xml_names.h:197
#define PCMK_XA_VERSION
Definition: xml_names.h:439

Definition at line 375 of file upstart.c.

◆ UPSTART_06_API

#define UPSTART_06_API   BUS_NAME"0_6"

Definition at line 32 of file upstart.c.

◆ UPSTART_JOB_IFACE

#define UPSTART_JOB_IFACE   UPSTART_06_API".Job"

Definition at line 33 of file upstart.c.

Function Documentation

◆ services__execute_upstart()

int services__execute_upstart ( svc_action_t op)

Definition at line 529 of file upstart.c.

◆ services__upstart2ocf()

enum ocf_exitcode services__upstart2ocf ( int  exit_status)

Definition at line 68 of file upstart.c.

◆ services__upstart_prepare()

int services__upstart_prepare ( svc_action_t op)

Definition at line 50 of file upstart.c.

◆ upstart_cleanup()

void upstart_cleanup ( void  )

Definition at line 90 of file upstart.c.

◆ upstart_job_exists()

gboolean upstart_job_exists ( const char *  name)

Definition at line 284 of file upstart.c.

◆ upstart_job_listall()

GList* upstart_job_listall ( void  )

Definition at line 202 of file upstart.c.