pacemaker  2.1.7-0f7f88312f
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/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 28 of file upstart.c.

◆ BUS_PATH

#define BUS_PATH   "/com/ubuntu/Upstart"

Definition at line 29 of file upstart.c.

◆ BUS_PROPERTY_IFACE

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

Definition at line 33 of file upstart.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" \
" Upstart agent for controlling the system %s service\n" \
" </longdesc>\n" \
" <shortdesc lang=\"en\">Upstart job for %s</shortdesc>\n" \
" <parameters/>\n" \
" <actions>\n" \
" <action name=\"start\" timeout=\"15\" />\n" \
" <action name=\"stop\" timeout=\"15\" />\n" \
" <action name=\"status\" timeout=\"15\" />\n" \
" <action name=\"restart\" timeout=\"15\" />\n" \
" <action name=\"monitor\" timeout=\"15\" interval=\"15\" start-delay=\"15\" />\n" \
" <action name=\"meta-data\" timeout=\"5\" />\n" \
" </actions>\n" \
" <special tag=\"upstart\"/>\n" \
"</resource-agent>\n"
#define PCMK_DEFAULT_AGENT_VERSION
Definition: services.h:47

Definition at line 373 of file upstart.c.

◆ UPSTART_06_API

#define UPSTART_06_API   BUS_NAME"0_6"

Definition at line 31 of file upstart.c.

◆ UPSTART_JOB_IFACE

#define UPSTART_JOB_IFACE   UPSTART_06_API".Job"

Definition at line 32 of file upstart.c.

Function Documentation

◆ services__execute_upstart()

int services__execute_upstart ( svc_action_t op)

Definition at line 516 of file upstart.c.

◆ services__upstart2ocf()

enum ocf_exitcode services__upstart2ocf ( int  exit_status)

Definition at line 67 of file upstart.c.

◆ services__upstart_prepare()

int services__upstart_prepare ( svc_action_t op)

Definition at line 49 of file upstart.c.

◆ upstart_cleanup()

void upstart_cleanup ( void  )

Definition at line 89 of file upstart.c.

◆ upstart_job_exists()

gboolean upstart_job_exists ( const char *  name)

Definition at line 283 of file upstart.c.

◆ upstart_job_listall()

GList* upstart_job_listall ( void  )

Definition at line 201 of file upstart.c.