This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
/
eucalyptus.h
109 lines (92 loc) · 3.54 KB
/
eucalyptus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef INCLUDE_EUCALYPTUS_H
#define INCLUDE_EUCALYPTUS_H
/* environment variable set at startup */
#define EUCALYPTUS_ENV_VAR_NAME "EUCALYPTUS"
/* file paths relative to $EUCALYPTUS */
#define EUCALYPTUS_CONF_LOCATION "%s/etc/eucalyptus/eucalyptus.conf"
#define EUCALYPTUS_ROOTWRAP "%s/usr/lib/eucalyptus/euca_rootwrap"
#define EUCALYPTUS_ADD_KEY "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/add_key.pl %s/usr/lib/eucalyptus/euca_mountwrap"
#define EUCALYPTUS_GEN_LIBVIRT_XML "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/gen_libvirt_xml"
#define EUCALYPTUS_GEN_KVM_LIBVIRT_XML "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/gen_kvm_libvirt_xml"
#define EUCALYPTUS_GET_XEN_INFO "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/get_xen_info"
#define EUCALYPTUS_GET_KVM_INFO "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/get_sys_info"
#define EUCALYPTUS_DISK_CONVERT "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/partition2disk"
#define EUCALYPTUS_VIRSH "%s/usr/lib/eucalyptus/euca_rootwrap virsh"
#define EUCALYPTUS_ROOTWRAP "%s/usr/lib/eucalyptus/euca_rootwrap"
#define EUCALYPTUS_DETACH "%s/usr/lib/eucalyptus/euca_rootwrap %s/usr/share/eucalyptus/detach.pl"
#define EUCALYPTUS_XM "sudo xm"
#define NC_NET_PATH_DEFAULT "%s/var/run/eucalyptus/net"
#define CC_NET_PATH_DEFAULT "%s/var/run/eucalyptus/net"
/* various defaults */
#define NC_NET_PORT_DEFAULT 1976
#define CC_NET_PORT_DEFAULT 1976
/* names of variables in the configuration file */
#define CONFIG_MAX_MEM "MAX_MEM"
#define CONFIG_MAX_DISK "MAX_DISK"
#define CONFIG_MAX_CORES "MAX_CORES"
#define REGISTERED_PATH "REGISTERED_PATH"
#define INSTANCE_PATH "INSTANCE_PATH"
#define CONFIG_VNET_PORT "VNET_PORT"
#define CONFIG_VNET_DHCPDAEMON "VNET_DHCPDAEMON"
#define CONFIG_VNET_PRIVINTERFACE "VNET_PRIVINTERFACE"
#define CONFIG_NC_SERVICE "NC_SERVICE"
#define CONFIG_NC_PORT "NC_PORT"
#define CONFIG_NODES "NODES"
#define CONFIG_HYPERVISOR "HYPERVISOR"
#define CONFIG_NC_CACHE_SIZE "NC_CACHE_SIZE"
#define CONFIG_NC_SWAP_SIZE "SWAP_SIZE"
#define CONFIG_SAVE_INSTANCES "MANUAL_INSTANCES_CLEANUP"
/* name of the administrative user within Eucalyptus */
#define EUCALYPTUS_ADMIN "eucalyptus"
/* system limit defaults */
#define MAXNODES 1024
#define MAXINSTANCES 2048
#define MAXLOGFILESIZE 32768000
#define EUCA_MAX_GROUPS 64
#define EUCA_MAX_VOLUMES 256
#define DEFAULT_NC_CACHE_SIZE 99999 /* in MB */
#define DEFAULT_SWAP_SIZE 512 /* in MB */
#define MEGABYTE 1048576
#define OK 0
#define ERROR 1
#define ERROR_FATAL 1
#define ERROR_RETRY -1
typedef enum instance_states_t {
/* the first 7 should match libvirt */
NO_STATE = 0,
RUNNING,
BLOCKED,
PAUSED,
SHUTDOWN,
SHUTOFF,
CRASHED,
/* TODO: remove some of these? */
NEW,
WAITING,
BOOTING,
TERMINATING,
AWOL,
/* the only three states reported to CLC */
PENDING, /* staging in data, starting to boot, failed to boot */
EXTANT, /* guest OS booting, running, shutting down, cleaning up state */
TEARDOWN, /* a marker for a terminated domain, one not taking up resources */
TOTAL_STATES
} instance_states;
static char * instance_state_names[] = {
"Unknown",
"Running",
"Running", /* TODO: we need to figure out what to call this. idle? */
"Paused",
"Shutdown",
"Shutoff",
"Crashed",
"New",
"Waiting",
"Booting",
"Terminating",
"AWOL",
"Pending",
"Extant",
"Teardown"
};
#endif