Browse Source

Revert "Update mesos slave to mesos agent"

This reverts commit 15162ce33a.

Mesos services were not working, so reverted the patch
which renamed slave to agent.

Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
tags/3.0.0
yatin 2 years ago
parent
commit
272903ff9e

+ 24
- 24
doc/source/userguide.rst View File

@@ -277,7 +277,7 @@ the table are linked to more details elsewhere in the user guide.
277 277
 | `rexray_preempt`_                     | - true             | false         |
278 278
 |                                       | - false            |               |
279 279
 +---------------------------------------+--------------------+---------------+
280
-| `mesos_agent_isolation`_              | - filesystem/posix | ""            |
280
+| `mesos_slave_isolation`_              | - filesystem/posix | ""            |
281 281
 |                                       | - filesystem/linux |               |
282 282
 |                                       | - filesystem/shared|               |
283 283
 |                                       | - posix/cpu        |               |
@@ -288,13 +288,13 @@ the table are linked to more details elsewhere in the user guide.
288 288
 |                                       | - docker/runtime   |               |
289 289
 |                                       | - namespaces/pid   |               |
290 290
 +---------------------------------------+--------------------+---------------+
291
-| `mesos_agent_image_providers`_        | - appc             | ""            |
291
+| `mesos_slave_image_providers`_        | - appc             | ""            |
292 292
 |                                       | - docker           |               |
293 293
 |                                       | - appc,docker      |               |
294 294
 +---------------------------------------+--------------------+---------------+
295
-| `mesos_agent_work_dir`_               | (directory name)   | ""            |
295
+| `mesos_slave_work_dir`_               | (directory name)   | ""            |
296 296
 +---------------------------------------+--------------------+---------------+
297
-| `mesos_agent_executor_env_variables`_ | (file name)        | ""            |
297
+| `mesos_slave_executor_env_variables`_ | (file name)        | ""            |
298 298
 +---------------------------------------+--------------------+---------------+
299 299
 
300 300
 
@@ -1038,9 +1038,9 @@ Log into the servers
1038 1038
 Mesos
1039 1039
 =====
1040 1040
 
1041
-A Mesos cluster consists of a pool of servers running as Mesos agents,
1041
+A Mesos cluster consists of a pool of servers running as Mesos slaves,
1042 1042
 managed by a set of servers running as Mesos masters.  Mesos manages
1043
-the resources from the agents but does not itself deploy containers.
1043
+the resources from the slaves but does not itself deploy containers.
1044 1044
 Instead, one of more Mesos frameworks running on the Mesos cluster would
1045 1045
 accept user requests on their own endpoint, using their particular
1046 1046
 API.  These frameworks would then negotiate the resources with Mesos
@@ -1067,18 +1067,18 @@ Refer to the `ClusterTemplate`_ and `Cluster`_ sections for the full list of
1067 1067
 parameters.  Following are further details relevant to Mesos:
1068 1068
 
1069 1069
 What runs on the servers
1070
-  There are two types of servers in the Mesos cluster: masters and agents.
1070
+  There are two types of servers in the Mesos cluster: masters and slaves.
1071 1071
   The Docker daemon runs on all servers.  On the servers for master,
1072 1072
   the Mesos master is run as a process on port 5050 and this is
1073 1073
   initiated by the upstart service 'mesos-master'.  Zookeeper is also
1074 1074
   run on the master servers, initiated by the upstart service
1075 1075
   'zookeeper'.  Zookeeper is used by the master servers for electing
1076
-  the leader among the masters, and by the agent servers and
1076
+  the leader among the masters, and by the slave servers and
1077 1077
   frameworks to determine the current leader.  The framework Marathon
1078 1078
   is run as a process on port 8080 on the master servers, initiated by
1079
-  the upstart service 'marathon'.  On the servers for agent, the Mesos
1080
-  agent is run as a process initiated by the upstart service
1081
-  'mesos-agent'.
1079
+  the upstart service 'marathon'.  On the servers for slave, the Mesos
1080
+  slave is run as a process initiated by the upstart service
1081
+  'mesos-slave'.
1082 1082
 
1083 1083
 Number of master (master-count)
1084 1084
   Specified in the cluster-create command to indicate how many servers
@@ -1091,8 +1091,8 @@ Number of master (master-count)
1091 1091
 
1092 1092
 Number of agents (node-count)
1093 1093
   Specified in the cluster-create command to indicate how many servers
1094
-  will run as Mesos agent in the cluster.  Docker daemon is run locally to
1095
-  host containers from users.  The agents report their available
1094
+  will run as Mesos slave in the cluster.  Docker daemon is run locally to
1095
+  host containers from users.  The slaves report their available
1096 1096
   resources to the master and accept request from the master to deploy
1097 1097
   tasks from the frameworks.  In this case, the tasks will be to
1098 1098
   run Docker containers.
@@ -1118,7 +1118,7 @@ Storage driver (docker-storage-driver)
1118 1118
 Image (image-id)
1119 1119
 
1120 1120
   Specified in the ClusterTemplate to indicate the image to boot the servers
1121
-  for the Mesos master and agent.  The image binary is loaded in
1121
+  for the Mesos master and slave.  The image binary is loaded in
1122 1122
   Glance with the attribute 'os_distro = ubuntu'.  You can download
1123 1123
   the `ready-built image
1124 1124
   <https://fedorapeople.org/groups/magnum/ubuntu-14.04.3-mesos-0.25.0.qcow2>`_,
@@ -1147,8 +1147,8 @@ _`rexray_preempt`
1147 1147
   safety for locking the volume before remounting.  The default value
1148 1148
   is False.
1149 1149
 
1150
-_`mesos_agent_isolation`
1151
-  This label corresponds to the Mesos parameter for agent
1150
+_`mesos_slave_isolation`
1151
+  This label corresponds to the Mesos parameter for slave
1152 1152
   '--isolation'.  The isolators are needed to provide proper isolation
1153 1153
   according to the runtime configurations specified in the container
1154 1154
   image.  For more details, refer to the `Mesos configuration
@@ -1168,7 +1168,7 @@ _`mesos_agent_isolation`
1168 1168
   - docker/runtime
1169 1169
   - namespaces/pid
1170 1170
 
1171
-_`mesos_agent_image_providers`
1171
+_`mesos_slave_image_providers`
1172 1172
   This label corresponds to the Mesos parameter for agent
1173 1173
   '--image_providers', which tells Mesos containerizer what
1174 1174
   types of container images are allowed.
@@ -1182,24 +1182,24 @@ _`mesos_agent_image_providers`
1182 1182
   - docker
1183 1183
   - appc,docker
1184 1184
 
1185
-_`mesos_agent_work_dir`
1186
-  This label corresponds to the Mesos parameter '--work_dir' for agent.
1185
+_`mesos_slave_work_dir`
1186
+  This label corresponds to the Mesos parameter '--work_dir' for slave.
1187 1187
   For more details, refer to the `Mesos configuration
1188 1188
   <http://mesos.apache.org/documentation/latest/configuration/>`_.
1189 1189
   Valid value is a directory path to use as the work directory for
1190 1190
   the framework, for example::
1191 1191
 
1192
-    mesos_agent_work_dir=/tmp/mesos
1192
+    mesos_slave_work_dir=/tmp/mesos
1193 1193
 
1194
-_`mesos_agent_executor_env_variables`
1195
-  This label corresponds to the Mesos parameter for agent
1194
+_`mesos_slave_executor_env_variables`
1195
+  This label corresponds to the Mesos parameter for slave
1196 1196
   '--executor_environment_variables', which passes additional
1197 1197
   environment variables to the executor and subsequent tasks.
1198 1198
   For more details, refer to the `Mesos configuration
1199 1199
   <http://mesos.apache.org/documentation/latest/configuration/>`_.
1200 1200
   Valid value is the name of a json file, for example::
1201 1201
 
1202
-     mesos_agent_executor_env_variables=/home/ubuntu/test.json
1202
+     mesos_slave_executor_env_variables=/home/ubuntu/test.json
1203 1203
 
1204 1204
   The json file should contain environment variables, for example::
1205 1205
 
@@ -1208,7 +1208,7 @@ _`mesos_agent_executor_env_variables`
1208 1208
        "LD_LIBRARY_PATH": "/usr/local/lib"
1209 1209
     }
1210 1210
 
1211
-  By default the executor will inherit the agent's environment
1211
+  By default the executor will inherit the slave's environment
1212 1212
   variables.
1213 1213
 
1214 1214
 

+ 23
- 23
magnum/api/attr_validator.py View File

@@ -109,14 +109,14 @@ def validate_labels(labels):
109 109
 
110 110
 
111 111
 def validate_labels_isolation(labels):
112
-    """Validate mesos_agent_isolation"""
113
-    mesos_agent_isolation = labels.get('mesos_agent_isolation')
114
-    mesos_agent_isolation_list = mesos_agent_isolation.split(',')
115
-    unsupported_isolations = set(mesos_agent_isolation_list) - set(
112
+    """Validate mesos_slave_isolation"""
113
+    mesos_slave_isolation = labels.get('mesos_slave_isolation')
114
+    mesos_slave_isolation_list = mesos_slave_isolation.split(',')
115
+    unsupported_isolations = set(mesos_slave_isolation_list) - set(
116 116
         SUPPORTED_ISOLATION)
117 117
     if (len(unsupported_isolations) > 0):
118 118
         raise exception.InvalidParameterValue(_(
119
-            'property "labels/mesos_agent_isolation" with value '
119
+            'property "labels/mesos_slave_isolation" with value '
120 120
             '"%(isolation_val)s" is not supported, supported values are: '
121 121
             '%(supported_isolation)s') % {
122 122
                 'isolation_val': ', '.join(list(unsupported_isolations)),
@@ -125,15 +125,15 @@ def validate_labels_isolation(labels):
125 125
 
126 126
 
127 127
 def validate_labels_image_providers(labels):
128
-    """Validate mesos_agent_image_providers"""
129
-    mesos_agent_image_providers = labels.get('mesos_agent_image_providers')
130
-    mesos_agent_image_providers_list = mesos_agent_image_providers.split(',')
128
+    """Validate mesos_slave_image_providers"""
129
+    mesos_slave_image_providers = labels.get('mesos_slave_image_providers')
130
+    mesos_slave_image_providers_list = mesos_slave_image_providers.split(',')
131 131
     isolation_with_valid_data = False
132
-    for image_providers_val in mesos_agent_image_providers_list:
132
+    for image_providers_val in mesos_slave_image_providers_list:
133 133
         image_providers_val = image_providers_val.lower()
134 134
         if image_providers_val not in SUPPORTED_IMAGE_PROVIDERS:
135 135
             raise exception.InvalidParameterValue(_(
136
-                'property "labels/mesos_agent_image_providers" with value '
136
+                'property "labels/mesos_slave_image_providers" with value '
137 137
                 '"%(image_providers)s" is not supported, supported values '
138 138
                 'are: %(supported_image_providers)s') % {
139 139
                 'image_providers': image_providers_val,
@@ -141,26 +141,26 @@ def validate_labels_image_providers(labels):
141 141
                     SUPPORTED_IMAGE_PROVIDERS + ['unspecified'])})
142 142
 
143 143
         if image_providers_val == 'docker':
144
-            mesos_agent_isolation = labels.get('mesos_agent_isolation')
145
-            if mesos_agent_isolation is not None:
146
-                mesos_agent_isolation_list = mesos_agent_isolation.split(',')
147
-                for isolations_val in mesos_agent_isolation_list:
144
+            mesos_slave_isolation = labels.get('mesos_slave_isolation')
145
+            if mesos_slave_isolation is not None:
146
+                mesos_slave_isolation_list = mesos_slave_isolation.split(',')
147
+                for isolations_val in mesos_slave_isolation_list:
148 148
                     if isolations_val == 'docker/runtime':
149 149
                         isolation_with_valid_data = True
150
-            if mesos_agent_isolation is None or not isolation_with_valid_data:
150
+            if mesos_slave_isolation is None or not isolation_with_valid_data:
151 151
                 raise exception.RequiredParameterNotProvided(_(
152 152
                     "Docker runtime isolator has to be specified if 'docker' "
153
-                    "is included in 'mesos_agent_image_providers' Please add "
154
-                    "'docker/runtime' to 'mesos_agent_isolation' labels "
153
+                    "is included in 'mesos_slave_image_providers' Please add "
154
+                    "'docker/runtime' to 'mesos_slave_isolation' labels "
155 155
                     "flags"))
156 156
 
157 157
 
158 158
 def validate_labels_executor_env_variables(labels):
159 159
     """Validate executor_environment_variables"""
160
-    mesos_agent_executor_env_val = labels.get(
161
-        'mesos_agent_executor_env_variables')
160
+    mesos_slave_executor_env_val = labels.get(
161
+        'mesos_slave_executor_env_variables')
162 162
     try:
163
-        json.loads(mesos_agent_executor_env_val)
163
+        json.loads(mesos_slave_executor_env_val)
164 164
     except ValueError:
165 165
         err = (_("Json format error"))
166 166
         raise exception.InvalidParameterValue(err)
@@ -194,8 +194,8 @@ validators = {'image_id': validate_image,
194 194
               'fixed_network': validate_fixed_network,
195 195
               'labels': validate_labels}
196 196
 
197
-labels_validators = {'mesos_agent_isolation': validate_labels_isolation,
198
-                     'mesos_agent_image_providers':
197
+labels_validators = {'mesos_slave_isolation': validate_labels_isolation,
198
+                     'mesos_slave_image_providers':
199 199
                      validate_labels_image_providers,
200
-                     'mesos_agent_executor_env_variables':
200
+                     'mesos_slave_executor_env_variables':
201 201
                      validate_labels_executor_env_variables}

+ 1
- 1
magnum/api/controllers/v1/bay.py View File

@@ -112,7 +112,7 @@ class Bay(base.APIBase):
112 112
     """Api address of cluster master node"""
113 113
 
114 114
     node_addresses = wsme.wsattr([wtypes.text], readonly=True)
115
-    """IP addresses of cluster agent nodes"""
115
+    """IP addresses of cluster slave nodes"""
116 116
 
117 117
     master_addresses = wsme.wsattr([wtypes.text], readonly=True)
118 118
     """IP addresses of cluster master nodes"""

+ 1
- 1
magnum/api/controllers/v1/cluster.py View File

@@ -122,7 +122,7 @@ class Cluster(base.APIBase):
122 122
     """Api address of cluster master node"""
123 123
 
124 124
     node_addresses = wsme.wsattr([wtypes.text], readonly=True)
125
-    """IP addresses of cluster agent nodes"""
125
+    """IP addresses of cluster slave nodes"""
126 126
 
127 127
     master_addresses = wsme.wsattr([wtypes.text], readonly=True)
128 128
     """IP addresses of cluster master nodes"""

+ 5
- 5
magnum/conductor/mesos_monitor.py View File

@@ -51,11 +51,11 @@ class MesosMonitor(MonitorBase):
51 51
                                                path='/state')
52 52
             master = jsonutils.loads(urlfetch.get(mesos_master_url))
53 53
             if self._is_leader(master):
54
-                for agent in master['agents']:
55
-                    self.data['mem_total'] += agent['resources']['mem']
56
-                    self.data['mem_used'] += agent['used_resources']['mem']
57
-                    self.data['cpu_total'] += agent['resources']['cpus']
58
-                    self.data['cpu_used'] += agent['used_resources']['cpus']
54
+                for slave in master['slaves']:
55
+                    self.data['mem_total'] += slave['resources']['mem']
56
+                    self.data['mem_used'] += slave['used_resources']['mem']
57
+                    self.data['cpu_total'] += slave['resources']['cpus']
58
+                    self.data['cpu_used'] += slave['used_resources']['cpus']
59 59
                 break
60 60
 
61 61
     def compute_memory_util(self):

+ 1
- 1
magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-for service in zookeeper mesos-agent mesos-master marathon; do
3
+for service in zookeeper mesos-slave mesos-master marathon; do
4 4
     service $service stop
5 5
     [ -f /etc/init/$service.conf ] && echo "manual" > /etc/init/$service.override
6 6
 done

+ 10
- 10
magnum/drivers/mesos_ubuntu_v1/template_def.py View File

@@ -28,11 +28,11 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
28 28
         self.add_parameter('external_network',
29 29
                            baymodel_attr='external_network_id',
30 30
                            required=True)
31
-        self.add_parameter('number_of_agents',
31
+        self.add_parameter('number_of_slaves',
32 32
                            bay_attr='node_count')
33 33
         self.add_parameter('master_flavor',
34 34
                            baymodel_attr='master_flavor_id')
35
-        self.add_parameter('agent_flavor',
35
+        self.add_parameter('slave_flavor',
36 36
                            baymodel_attr='flavor_id')
37 37
         self.add_parameter('cluster_name',
38 38
                            bay_attr='name')
@@ -45,9 +45,9 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
45 45
                         bay_attr=None)
46 46
         self.add_output('mesos_master',
47 47
                         bay_attr='master_addresses')
48
-        self.add_output('mesos_agents_private',
48
+        self.add_output('mesos_slaves_private',
49 49
                         bay_attr=None)
50
-        self.add_output('mesos_agents',
50
+        self.add_output('mesos_slaves',
51 51
                         bay_attr='node_addresses')
52 52
 
53 53
     def get_params(self, context, baymodel, bay, **kwargs):
@@ -62,18 +62,18 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
62 62
         extra_params['domain_name'] = context.domain_name
63 63
         extra_params['region_name'] = osc.cinder_region_name()
64 64
 
65
-        label_list = ['rexray_preempt', 'mesos_agent_isolation',
66
-                      'mesos_agent_image_providers',
67
-                      'mesos_agent_work_dir',
68
-                      'mesos_agent_executor_env_variables']
65
+        label_list = ['rexray_preempt', 'mesos_slave_isolation',
66
+                      'mesos_slave_image_providers',
67
+                      'mesos_slave_work_dir',
68
+                      'mesos_slave_executor_env_variables']
69 69
 
70 70
         for label in label_list:
71 71
             extra_params[label] = baymodel.labels.get(label)
72 72
 
73 73
         scale_mgr = kwargs.pop('scale_manager', None)
74 74
         if scale_mgr:
75
-            hosts = self.get_output('mesos_agents_private')
76
-            extra_params['agents_to_remove'] = (
75
+            hosts = self.get_output('mesos_slaves_private')
76
+            extra_params['slaves_to_remove'] = (
77 77
                 scale_mgr.get_removal_nodes(hosts))
78 78
 
79 79
         return super(UbuntuMesosTemplateDefinition,

magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-agent.sh → magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 . /etc/sysconfig/heat-params
4 4
 
5
-echo "Configuring mesos (agent)"
5
+echo "Configuring mesos (slave)"
6 6
 
7 7
 myip=$(ip addr show eth0 |
8 8
        awk '$1 == "inet" {print $2}' | cut -f1 -d/)
@@ -17,31 +17,31 @@ zk=${zk::-1}
17 17
 # Format: zk://host1:port1,...,hostN:portN/path
18 18
 echo "zk://${zk}/mesos" > /etc/mesos/zk
19 19
 
20
-# The hostname the agent should report
21
-echo "$myip" > /etc/mesos-agent/hostname
20
+# The hostname the slave should report
21
+echo "$myip" > /etc/mesos-slave/hostname
22 22
 
23 23
 # The IP address to listen on
24
-echo "$myip" > /etc/mesos-agent/ip
24
+echo "$myip" > /etc/mesos-slave/ip
25 25
 
26 26
 # List of containerizer implementations
27
-echo "docker,mesos" > /etc/mesos-agent/containerizers
27
+echo "docker,mesos" > /etc/mesos-slave/containerizers
28 28
 
29 29
 # Amount of time to wait for an executor to register
30
-cat > /etc/mesos-agent/executor_registration_timeout <<EOF
30
+cat > /etc/mesos-slave/executor_registration_timeout <<EOF
31 31
 $EXECUTOR_REGISTRATION_TIMEOUT
32 32
 EOF
33 33
 
34 34
 if [ -n "$ISOLATION" ]; then
35
-    echo "$ISOLATION" > /etc/mesos-agent/isolation
35
+    echo "$ISOLATION" > /etc/mesos-slave/isolation
36 36
 fi
37 37
 
38 38
 if [ -n "$WORK_DIR" ]; then
39
-    echo "$WORK_DIR" > /etc/mesos-agent/work_dir
39
+    echo "$WORK_DIR" > /etc/mesos-slave/work_dir
40 40
 fi
41 41
 
42 42
 if [ -n "$IMAGE_PROVIDERS" ]; then
43 43
     if [ -n "$ISOLATION" ]; then
44
-        echo "$IMAGE_PROVIDERS" > /etc/mesos-agent/image_providers
44
+        echo "$IMAGE_PROVIDERS" > /etc/mesos-slave/image_providers
45 45
     else
46 46
         echo "isolation doesn't exist, not setting image_providers"
47 47
     fi
@@ -49,5 +49,5 @@ fi
49 49
 
50 50
 if [ -n "$EXECUTOR_ENVIRONMENT_VARIABLES" ]; then
51 51
     echo "$EXECUTOR_ENVIRONMENT_VARIABLES" > /etc/executor_environment_variables
52
-    echo "file:///etc/executor_environment_variables" > /etc/mesos-agent/executor_environment_variables
52
+    echo "file:///etc/executor_environment_variables" > /etc/mesos-slave/executor_environment_variables
53 53
 fi

magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-agent.sh → magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh View File

@@ -1,7 +1,7 @@
1 1
 #!/bin/sh
2 2
 
3
-# Start agent services
4
-for service in docker mesos-agent; do
3
+# Start slave services
4
+for service in docker mesos-slave; do
5 5
     echo "starting service $service"
6 6
     service $service start
7 7
     rm -f /etc/init/$service.override

+ 31
- 31
magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml View File

@@ -2,8 +2,8 @@ heat_template_version: 2014-10-16
2 2
 
3 3
 description: >
4 4
   This template will boot a Mesos cluster with one or more masters
5
-  (as specified by number_of_masters, default is 1) and one or more agents
6
-  (as specified by the number_of_agents parameter, which
5
+  (as specified by number_of_masters, default is 1) and one or more slaves
6
+  (as specified by the number_of_slaves parameter, which
7 7
   defaults to 1).
8 8
 
9 9
 parameters:
@@ -27,19 +27,19 @@ parameters:
27 27
     default: m1.small
28 28
     description: flavor to use when booting the master server
29 29
 
30
-  agent_flavor:
30
+  slave_flavor:
31 31
     type: string
32 32
     default: m1.small
33
-    description: flavor to use when booting the agent server
33
+    description: flavor to use when booting the slave server
34 34
 
35 35
   dns_nameserver:
36 36
     type: string
37 37
     description: address of a dns nameserver reachable in your environment
38 38
     default: 8.8.8.8
39 39
 
40
-  number_of_agents:
40
+  number_of_slaves:
41 41
     type: number
42
-    description: how many mesos agents to spawn initially
42
+    description: how many mesos slaves to spawn initially
43 43
     default: 1
44 44
 
45 45
   fixed_network_cidr:
@@ -61,7 +61,7 @@ parameters:
61 61
   executor_registration_timeout:
62 62
     type: string
63 63
     description: >
64
-      Amount of time to wait for an executor to register with the agent before
64
+      Amount of time to wait for an executor to register with the slave before
65 65
       considering it hung and shutting it down
66 66
     default: 5mins
67 67
 
@@ -156,7 +156,7 @@ parameters:
156 156
     type: string
157 157
     description: url for keystone
158 158
 
159
-  mesos_agent_isolation:
159
+  mesos_slave_isolation:
160 160
     type: string
161 161
     description: >
162 162
       Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or
@@ -168,30 +168,30 @@ parameters:
168 168
       for the Mesos Containerizer.
169 169
     default: ""
170 170
 
171
-  mesos_agent_work_dir:
171
+  mesos_slave_work_dir:
172 172
     type: string
173 173
     description: directory path to place framework work directories
174 174
     default: ""
175 175
 
176
-  mesos_agent_image_providers:
176
+  mesos_slave_image_providers:
177 177
     type: string
178 178
     description: >
179 179
       Comma separated list of supported image providers e.g.,
180 180
       APPC,DOCKER
181 181
     default: ""
182 182
 
183
-  mesos_agent_executor_env_variables:
183
+  mesos_slave_executor_env_variables:
184 184
     type: string
185 185
     description: >
186 186
       JSON object representing the environment variables that should be passed
187 187
       to the executor, and thus subsequently task(s). By default the executor,
188
-      executor will inherit the agent's environment variables.
188
+      executor will inherit the slave's environment variables.
189 189
     default: ""
190 190
 
191
-  agents_to_remove:
191
+  slaves_to_remove:
192 192
     type: comma_delimited_list
193 193
     description: >
194
-      List of agents to be removed when doing an update. Individual agent may
194
+      List of slaves to be removed when doing an update. Individual slave may
195 195
       be referenced several ways: (1) The resource name (e.g.['1', '3']),
196 196
       (2) The private IP address ['10.0.0.4', '10.0.0.6']. Note: the list should
197 197
       be empty when doing a create.
@@ -410,23 +410,23 @@ resources:
410 410
 
411 411
   ######################################################################
412 412
   #
413
-  # Mesos agents. This is a resource group that will initially
414
-  # create <number_of_agents> agents, and needs to be manually scaled.
413
+  # Mesos slaves. This is a resource group that will initially
414
+  # create <number_of_slaves> slaves, and needs to be manually scaled.
415 415
   #
416 416
 
417
-  mesos_agents:
417
+  mesos_slaves:
418 418
     type: OS::Heat::ResourceGroup
419 419
     depends_on:
420 420
       - extrouter_inside
421 421
     properties:
422
-      count: {get_param: number_of_agents}
423
-      removal_policies: [{resource_list: {get_param: agents_to_remove}}]
422
+      count: {get_param: number_of_slaves}
423
+      removal_policies: [{resource_list: {get_param: slaves_to_remove}}]
424 424
       resource_def:
425
-        type: mesosagent.yaml
425
+        type: mesosslave.yaml
426 426
         properties:
427 427
           ssh_key_name: {get_param: ssh_key_name}
428 428
           server_image: {get_param: server_image}
429
-          agent_flavor: {get_param: agent_flavor}
429
+          slave_flavor: {get_param: slave_flavor}
430 430
           fixed_network: {get_resource: fixed_network}
431 431
           fixed_subnet: {get_resource: fixed_subnet}
432 432
           mesos_masters_ips: {list_join: [' ', {get_attr: [mesos_masters, mesos_master_ip]}]}
@@ -445,10 +445,10 @@ resources:
445 445
           region_name: {get_param: region_name}
446 446
           domain_name: {get_param: domain_name}
447 447
           rexray_preempt: {get_param: rexray_preempt}
448
-          mesos_agent_isolation: {get_param: mesos_agent_isolation}
449
-          mesos_agent_work_dir: {get_param: mesos_agent_work_dir}
450
-          mesos_agent_image_providers: {get_param: mesos_agent_image_providers}
451
-          mesos_agent_executor_env_variables: {get_param: mesos_agent_executor_env_variables}
448
+          mesos_slave_isolation: {get_param: mesos_slave_isolation}
449
+          mesos_slave_work_dir: {get_param: mesos_slave_work_dir}
450
+          mesos_slave_image_providers: {get_param: mesos_slave_image_providers}
451
+          mesos_slave_executor_env_variables: {get_param: mesos_slave_executor_env_variables}
452 452
 
453 453
 outputs:
454 454
 
@@ -470,12 +470,12 @@ outputs:
470 470
       log in to the Mesos master via ssh or to access the Mesos API
471 471
       from outside the cluster.
472 472
 
473
-  mesos_agent_private:
474
-    value: {get_attr: [mesos_agents, mesos_agent_ip]}
473
+  mesos_slave_private:
474
+    value: {get_attr: [mesos_slaves, mesos_slave_ip]}
475 475
     description: >
476
-      This is a list of the "private" addresses of all the Mesos agents.
476
+      This is a list of the "private" addresses of all the Mesos slaves.
477 477
 
478
-  mesos_agents:
479
-    value: {get_attr: [mesos_agents, mesos_agent_external_ip]}
478
+  mesos_slaves:
479
+    value: {get_attr: [mesos_slaves, mesos_slave_external_ip]}
480 480
     description: >
481
-      This is a list of the "public" addresses of all the Mesos agents.
481
+      This is a list of the "public" addresses of all the Mesos slaves.

magnum/drivers/mesos_ubuntu_v1/templates/mesosagent.yaml → magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml View File

@@ -1,7 +1,7 @@
1 1
 heat_template_version: 2014-10-16
2 2
 
3 3
 description: >
4
-  This is a nested stack that defines a single Mesos agent, This stack is
4
+  This is a nested stack that defines a single Mesos slave, This stack is
5 5
   included by a ResourceGroup resource in the parent template
6 6
   (mesoscluster.yaml).
7 7
 
@@ -11,7 +11,7 @@ parameters:
11 11
     type: string
12 12
     description: glance image used to boot the server
13 13
 
14
-  agent_flavor:
14
+  slave_flavor:
15 15
     type: string
16 16
     description: flavor to use when booting the server
17 17
 
@@ -31,7 +31,7 @@ parameters:
31 31
   executor_registration_timeout:
32 32
     type: string
33 33
     description: >
34
-      Amount of time to wait for an executor to register with the agent before
34
+      Amount of time to wait for an executor to register with the slave before
35 35
       considering it hung and shutting it down
36 36
 
37 37
   http_proxy:
@@ -87,7 +87,7 @@ parameters:
87 87
       enables any host to take control of a volume irrespective of whether
88 88
       other hosts are using the volume
89 89
 
90
-  mesos_agent_isolation:
90
+  mesos_slave_isolation:
91 91
     type: string
92 92
     description: >
93 93
       Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or
@@ -98,22 +98,22 @@ parameters:
98 98
       module using the `--modules` flag. Note that this flag is only relevant
99 99
       for the Mesos Containerizer.
100 100
 
101
-  mesos_agent_work_dir:
101
+  mesos_slave_work_dir:
102 102
     type: string
103 103
     description: directory path to place framework work directories
104 104
 
105
-  mesos_agent_image_providers:
105
+  mesos_slave_image_providers:
106 106
     type: string
107 107
     description: >
108 108
       Comma separated list of supported image providers e.g.,
109 109
       APPC,DOCKER
110 110
 
111
-  mesos_agent_executor_env_variables:
111
+  mesos_slave_executor_env_variables:
112 112
     type: string
113 113
     description: >
114 114
       JSON object representing the environment variables that should be passed
115 115
       to the executor, and thus subsequently task(s). By default the executor,
116
-      executor will inherit the agent's environment variables.
116
+      executor will inherit the slave's environment variables.
117 117
 
118 118
   mesos_masters_ips:
119 119
     type: string
@@ -133,14 +133,14 @@ parameters:
133 133
 
134 134
 resources:
135 135
 
136
-  agent_wait_handle:
136
+  slave_wait_handle:
137 137
     type: OS::Heat::WaitConditionHandle
138 138
 
139
-  agent_wait_condition:
139
+  slave_wait_condition:
140 140
     type: OS::Heat::WaitCondition
141
-    depends_on: mesos_agent
141
+    depends_on: mesos_slave
142 142
     properties:
143
-      handle: {get_resource: agent_wait_handle}
143
+      handle: {get_resource: slave_wait_handle}
144 144
       timeout: {get_param: wait_condition_timeout}
145 145
 
146 146
   secgroup_all_open:
@@ -178,24 +178,24 @@ resources:
178 178
             "$REGION_NAME": {get_param: region_name}
179 179
             "$DOMAIN_NAME": {get_param: domain_name}
180 180
             "$REXRAY_PREEMPT": {get_param: rexray_preempt}
181
-            "$ISOLATION": {get_param: mesos_agent_isolation}
182
-            "$WORK_DIR": {get_param: mesos_agent_work_dir}
183
-            "$IMAGE_PROVIDERS": {get_param: mesos_agent_image_providers}
184
-            "$EXECUTOR_ENVIRONMENT_VARIABLES": {get_param: mesos_agent_executor_env_variables}
181
+            "$ISOLATION": {get_param: mesos_slave_isolation}
182
+            "$WORK_DIR": {get_param: mesos_slave_work_dir}
183
+            "$IMAGE_PROVIDERS": {get_param: mesos_slave_image_providers}
184
+            "$EXECUTOR_ENVIRONMENT_VARIABLES": {get_param: mesos_slave_executor_env_variables}
185 185
 
186
-  configure_mesos_agent:
186
+  configure_mesos_slave:
187 187
     type: OS::Heat::SoftwareConfig
188 188
     properties:
189 189
       group: ungrouped
190
-      config: {get_file: fragments/configure-mesos-agent.sh}
190
+      config: {get_file: fragments/configure-mesos-slave.sh}
191 191
 
192 192
   start_services:
193 193
     type: OS::Heat::SoftwareConfig
194 194
     properties:
195 195
       group: ungrouped
196
-      config: {get_file: fragments/start-services-agent.sh}
196
+      config: {get_file: fragments/start-services-slave.sh}
197 197
 
198
-  agent_wc_notify:
198
+  slave_wc_notify:
199 199
     type: OS::Heat::SoftwareConfig
200 200
     properties:
201 201
       group: ungrouped
@@ -205,7 +205,7 @@ resources:
205 205
             #!/bin/bash -v
206 206
             wc_notify --data-binary '{"status": "SUCCESS"}'
207 207
           params:
208
-            wc_notify: {get_attr: [agent_wait_handle, curl_cli]}
208
+            wc_notify: {get_attr: [slave_wait_handle, curl_cli]}
209 209
 
210 210
   add_proxy:
211 211
     type: OS::Heat::SoftwareConfig
@@ -219,34 +219,34 @@ resources:
219 219
       group: ungrouped
220 220
       config: {get_file: fragments/volume-service.sh}
221 221
 
222
-  mesos_agent_init:
222
+  mesos_slave_init:
223 223
     type: OS::Heat::MultipartMime
224 224
     properties:
225 225
       parts:
226 226
         - config: {get_resource: write_heat_params}
227
-        - config: {get_resource: configure_mesos_agent}
227
+        - config: {get_resource: configure_mesos_slave}
228 228
         - config: {get_resource: add_proxy}
229 229
         - config: {get_resource: volume_service}
230 230
         - config: {get_resource: start_services}
231
-        - config: {get_resource: agent_wc_notify}
231
+        - config: {get_resource: slave_wc_notify}
232 232
 
233 233
   ######################################################################
234 234
   #
235
-  # a single Mesos agent.
235
+  # a single Mesos slave.
236 236
   #
237 237
 
238
-  mesos_agent:
238
+  mesos_slave:
239 239
     type: OS::Nova::Server
240 240
     properties:
241 241
       image: {get_param: server_image}
242
-      flavor: {get_param: agent_flavor}
242
+      flavor: {get_param: slave_flavor}
243 243
       key_name: {get_param: ssh_key_name}
244 244
       user_data_format: RAW
245
-      user_data: {get_resource: mesos_agent_init}
245
+      user_data: {get_resource: mesos_slave_init}
246 246
       networks:
247
-        - port: {get_resource: mesos_agent_eth0}
247
+        - port: {get_resource: mesos_slave_eth0}
248 248
 
249
-  mesos_agent_eth0:
249
+  mesos_slave_eth0:
250 250
     type: OS::Neutron::Port
251 251
     properties:
252 252
       network: {get_param: fixed_network}
@@ -257,19 +257,19 @@ resources:
257 257
         - subnet: {get_param: fixed_subnet}
258 258
       replacement_policy: AUTO
259 259
 
260
-  mesos_agent_floating:
260
+  mesos_slave_floating:
261 261
     type: OS::Neutron::FloatingIP
262 262
     properties:
263 263
       floating_network: {get_param: external_network}
264
-      port_id: {get_resource: mesos_agent_eth0}
264
+      port_id: {get_resource: mesos_slave_eth0}
265 265
 
266 266
 outputs:
267 267
 
268
-  mesos_agent_ip:
269
-    value: {get_attr: [mesos_agent_eth0, fixed_ips, 0, ip_address]}
268
+  mesos_slave_ip:
269
+    value: {get_attr: [mesos_slave_eth0, fixed_ips, 0, ip_address]}
270 270
     description: >
271
-      This is the "private" address of the Mesos agent node.
272
-  mesos_agent_external_ip:
273
-    value: {get_attr: [mesos_agent_floating, floating_ip_address]}
271
+      This is the "private" address of the Mesos slave node.
272
+  mesos_slave_external_ip:
273
+    value: {get_attr: [mesos_slave_floating, floating_ip_address]}
274 274
     description: >
275
-      This is the "public" address of the Mesos agent node.
275
+      This is the "public" address of the Mesos slave node.

+ 3
- 3
magnum/tests/functional/common/base.py View File

@@ -41,7 +41,7 @@ class BaseMagnumTest(base.BaseTestCase):
41 41
 
42 42
         :param get_nodes_fn: function that takes no parameters and returns
43 43
             a list of node IPs which are in such form:
44
-                [[master_nodes], [agent_nodes]].
44
+                [[master_nodes], [slave_nodes]].
45 45
         :param coe: the COE type of the nodes
46 46
         """
47 47
         def int_copy_logs(exec_info):
@@ -53,7 +53,7 @@ class BaseMagnumTest(base.BaseTestCase):
53 53
                 nodes_addresses = get_nodes_fn()
54 54
 
55 55
                 master_nodes = nodes_addresses[0]
56
-                agent_nodes = nodes_addresses[1]
56
+                slave_nodes = nodes_addresses[1]
57 57
 
58 58
                 base_path = os.path.split(os.path.dirname(
59 59
                     os.path.abspath(magnum.__file__)))[0]
@@ -88,7 +88,7 @@ class BaseMagnumTest(base.BaseTestCase):
88 88
                             cls.LOG.exception(msg)
89 89
 
90 90
                 do_copy_logs('master', master_nodes)
91
-                do_copy_logs('node', agent_nodes)
91
+                do_copy_logs('node', slave_nodes)
92 92
             except Exception:
93 93
                 cls.LOG.exception(msg)
94 94
 

+ 1
- 1
magnum/tests/functional/python_client_base.py View File

@@ -305,7 +305,7 @@ extendedKeyUsage = clientAuth
305 305
         elif self.baymodel.coe == "swarm":
306 306
             output_keys = ["swarm_masters", "swarm_nodes"]
307 307
         elif self.baymodel.coe == "mesos":
308
-            output_keys = ["mesos_master", "mesos_agents"]
308
+            output_keys = ["mesos_master", "mesos_slaves"]
309 309
         for output in stack_outputs:
310 310
             for key in output_keys:
311 311
                 if output['output_key'] == key:

+ 15
- 15
magnum/tests/unit/api/test_attr_validator.py View File

@@ -117,58 +117,58 @@ class TestAttrValidator(base.BaseTestCase):
117 117
         attr_validator.validate_labels(fake_labels)
118 118
 
119 119
     def test_validate_labels_main_isolation_invalid_label(self):
120
-        fake_labels = {'mesos_agent_isolation': 'abc'}
120
+        fake_labels = {'mesos_slave_isolation': 'abc'}
121 121
         self.assertRaises(exception.InvalidParameterValue,
122 122
                           attr_validator.validate_labels,
123 123
                           fake_labels)
124 124
 
125 125
     def test_validate_labels_isolation_valid(self):
126
-        fake_labels = {'mesos_agent_isolation':
126
+        fake_labels = {'mesos_slave_isolation':
127 127
                        'filesystem/posix,filesystem/linux'}
128 128
         attr_validator.validate_labels_isolation(fake_labels)
129 129
 
130 130
     def test_validate_labels_main_with_valid_providers_none_isolation(self):
131
-        fake_labels = {'mesos_agent_image_providers': 'docker'}
131
+        fake_labels = {'mesos_slave_image_providers': 'docker'}
132 132
         self.assertRaises(exception.RequiredParameterNotProvided,
133 133
                           attr_validator.validate_labels,
134 134
                           fake_labels)
135 135
 
136 136
     def test_validate_labels_with_valid_providers_invalid_isolation(self):
137
-        fake_labels = {'mesos_agent_image_providers': 'docker',
138
-                       'mesos_agent_isolation': 'abc'}
137
+        fake_labels = {'mesos_slave_image_providers': 'docker',
138
+                       'mesos_slave_isolation': 'abc'}
139 139
         self.assertRaises(exception.RequiredParameterNotProvided,
140 140
                           attr_validator.validate_labels_image_providers,
141 141
                           fake_labels)
142 142
 
143 143
     def test_validate_labels_with_valid_providers_invalid_providers(self):
144
-        fake_labels = {'mesos_agent_image_providers': 'appc'}
144
+        fake_labels = {'mesos_slave_image_providers': 'appc'}
145 145
         attr_validator.validate_labels_image_providers(fake_labels)
146 146
 
147 147
     def test_validate_labels_with_invalid_providers(self):
148
-        fake_labels = {'mesos_agent_image_providers': 'abc'}
148
+        fake_labels = {'mesos_slave_image_providers': 'abc'}
149 149
         self.assertRaises(exception.InvalidParameterValue,
150 150
                           attr_validator.validate_labels_image_providers,
151 151
                           fake_labels)
152 152
 
153 153
     def test_validate_labels_with_valid_providers_none_isolation(self):
154
-        fake_labels = {'mesos_agent_image_providers': 'docker'}
154
+        fake_labels = {'mesos_slave_image_providers': 'docker'}
155 155
         self.assertRaises(exception.RequiredParameterNotProvided,
156 156
                           attr_validator.validate_labels_image_providers,
157 157
                           fake_labels)
158 158
 
159 159
     def test_validate_labels_with_valid_providers_valid_isolation(self):
160
-        fake_labels = {'mesos_agent_image_providers': 'docker',
161
-                       'mesos_agent_isolation': 'docker/runtime'}
160
+        fake_labels = {'mesos_slave_image_providers': 'docker',
161
+                       'mesos_slave_isolation': 'docker/runtime'}
162 162
         attr_validator.validate_labels_image_providers(fake_labels)
163 163
 
164 164
     def test_validate_labels_with_environment_variables_valid_json(self):
165 165
         contents = '{"step": "upgrade", "interface": "deploy"}'
166
-        fack_labels = {'mesos_agent_executor_env_variables': contents}
166
+        fack_labels = {'mesos_slave_executor_env_variables': contents}
167 167
         attr_validator.validate_labels_executor_env_variables(
168 168
             fack_labels)
169 169
 
170 170
     def test_validate_labels_with_environment_variables_bad_json(self):
171
-        fack_labels = {'mesos_agent_executor_env_variables': 'step'}
171
+        fack_labels = {'mesos_slave_executor_env_variables': 'step'}
172 172
         self.assertRaisesRegex(
173 173
             exception.InvalidParameterValue,
174 174
             "Json format error",
@@ -176,12 +176,12 @@ class TestAttrValidator(base.BaseTestCase):
176 176
             fack_labels)
177 177
 
178 178
     def test_validate_labels_with_valid_isolation(self):
179
-        fake_labels = {'mesos_agent_isolation':
179
+        fake_labels = {'mesos_slave_isolation':
180 180
                        'filesystem/posix,filesystem/linux'}
181 181
         attr_validator.validate_labels_isolation(fake_labels)
182 182
 
183 183
     def test_validate_labels_isolation_invalid(self):
184
-        fake_labels = {'mesos_agent_isolation': 'filesystem'}
184
+        fake_labels = {'mesos_slave_isolation': 'filesystem'}
185 185
         self.assertRaises(exception.InvalidParameterValue,
186 186
                           attr_validator.validate_labels_isolation,
187 187
                           fake_labels)
@@ -283,7 +283,7 @@ class TestAttrValidator(base.BaseTestCase):
283 283
     @mock.patch('magnum.api.attr_validator.validate_labels')
284 284
     def test_validate_os_resources_with_label(self, mock_validate_labels,
285 285
                                               mock_os_cli):
286
-        mock_baymodel = {'labels': {'mesos_agent_isolation': 'abc'}}
286
+        mock_baymodel = {'labels': {'mesos_slave_isolation': 'abc'}}
287 287
         mock_context = mock.MagicMock()
288 288
         self.assertRaises(exception.InvalidParameterValue,
289 289
                           attr_validator.validate_os_resources, mock_context,

+ 29
- 29
magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py View File

@@ -40,11 +40,11 @@ class TestBayConductorWithMesos(base.TestCase):
40 40
             'server_type': 'vm',
41 41
             'volume_driver': 'volume_driver',
42 42
             'labels': {'rexray_preempt': 'False',
43
-                       'mesos_agent_isolation':
43
+                       'mesos_slave_isolation':
44 44
                        'docker/runtime,filesystem/linux',
45
-                       'mesos_agent_image_providers': 'docker',
46
-                       'mesos_agent_executor_env_variables': '{}',
47
-                       'mesos_agent_work_dir': '/tmp/mesos/agent'
45
+                       'mesos_slave_image_providers': 'docker',
46
+                       'mesos_slave_executor_env_variables': '{}',
47
+                       'mesos_slave_work_dir': '/tmp/mesos/slave'
48 48
                        },
49 49
             'master_lb_enabled': False,
50 50
         }
@@ -96,8 +96,8 @@ class TestBayConductorWithMesos(base.TestCase):
96 96
             'dns_nameserver': 'dns_nameserver',
97 97
             'server_image': 'image_id',
98 98
             'master_flavor': 'master_flavor_id',
99
-            'agent_flavor': 'flavor_id',
100
-            'number_of_agents': 1,
99
+            'slave_flavor': 'flavor_id',
100
+            'number_of_slaves': 1,
101 101
             'number_of_masters': 1,
102 102
             'http_proxy': 'http_proxy',
103 103
             'https_proxy': 'https_proxy',
@@ -115,10 +115,10 @@ class TestBayConductorWithMesos(base.TestCase):
115 115
             'tenant_name': 'admin',
116 116
             'domain_name': 'domainname',
117 117
             'rexray_preempt': 'False',
118
-            'mesos_agent_executor_env_variables': '{}',
119
-            'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
120
-            'mesos_agent_work_dir': '/tmp/mesos/agent',
121
-            'mesos_agent_image_providers': 'docker'
118
+            'mesos_slave_executor_env_variables': '{}',
119
+            'mesos_slave_isolation': 'docker/runtime,filesystem/linux',
120
+            'mesos_slave_work_dir': '/tmp/mesos/slave',
121
+            'mesos_slave_image_providers': 'docker'
122 122
         }
123 123
         self.assertEqual(expected, definition)
124 124
         self.assertEqual(
@@ -147,7 +147,7 @@ class TestBayConductorWithMesos(base.TestCase):
147 147
         expected = {
148 148
             'ssh_key_name': 'keypair_id',
149 149
             'external_network': 'external_network_id',
150
-            'number_of_agents': 1,
150
+            'number_of_slaves': 1,
151 151
             'number_of_masters': 1,
152 152
             'cluster_name': 'bay1',
153 153
             'trustee_domain_id': self.mock_keystone.trustee_domain_id,
@@ -161,10 +161,10 @@ class TestBayConductorWithMesos(base.TestCase):
161 161
             'tenant_name': 'admin',
162 162
             'domain_name': 'domainname',
163 163
             'rexray_preempt': 'False',
164
-            'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
165
-            'mesos_agent_executor_env_variables': '{}',
166
-            'mesos_agent_work_dir': '/tmp/mesos/agent',
167
-            'mesos_agent_image_providers': 'docker'
164
+            'mesos_slave_isolation': 'docker/runtime,filesystem/linux',
165
+            'mesos_slave_executor_env_variables': '{}',
166
+            'mesos_slave_work_dir': '/tmp/mesos/slave',
167
+            'mesos_slave_image_providers': 'docker'
168 168
         }
169 169
         self.assertEqual(expected, definition)
170 170
         self.assertEqual(
@@ -191,8 +191,8 @@ class TestBayConductorWithMesos(base.TestCase):
191 191
             'dns_nameserver': 'dns_nameserver',
192 192
             'server_image': 'image_id',
193 193
             'master_flavor': 'master_flavor_id',
194
-            'agent_flavor': 'flavor_id',
195
-            'number_of_agents': 1,
194
+            'slave_flavor': 'flavor_id',
195
+            'number_of_slaves': 1,
196 196
             'number_of_masters': 1,
197 197
             'http_proxy': 'http_proxy',
198 198
             'https_proxy': 'https_proxy',
@@ -210,10 +210,10 @@ class TestBayConductorWithMesos(base.TestCase):
210 210
             'tenant_name': 'admin',
211 211
             'domain_name': 'domainname',
212 212
             'rexray_preempt': 'False',
213
-            'mesos_agent_executor_env_variables': '{}',
214
-            'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
215
-            'mesos_agent_work_dir': '/tmp/mesos/agent',
216
-            'mesos_agent_image_providers': 'docker'
213
+            'mesos_slave_executor_env_variables': '{}',
214
+            'mesos_slave_isolation': 'docker/runtime,filesystem/linux',
215
+            'mesos_slave_work_dir': '/tmp/mesos/slave',
216
+            'mesos_slave_image_providers': 'docker'
217 217
         }
218 218
         self.assertEqual(expected, definition)
219 219
         self.assertEqual(
@@ -241,8 +241,8 @@ class TestBayConductorWithMesos(base.TestCase):
241 241
             'dns_nameserver': 'dns_nameserver',
242 242
             'server_image': 'image_id',
243 243
             'master_flavor': 'master_flavor_id',
244
-            'agent_flavor': 'flavor_id',
245
-            'number_of_agents': 1,
244
+            'slave_flavor': 'flavor_id',
245
+            'number_of_slaves': 1,
246 246
             'number_of_masters': 2,
247 247
             'http_proxy': 'http_proxy',
248 248
             'https_proxy': 'https_proxy',
@@ -260,10 +260,10 @@ class TestBayConductorWithMesos(base.TestCase):
260 260
             'tenant_name': 'admin',
261 261
             'domain_name': 'domainname',
262 262
             'rexray_preempt': 'False',
263
-            'mesos_agent_executor_env_variables': '{}',
264
-            'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
265
-            'mesos_agent_work_dir': '/tmp/mesos/agent',
266
-            'mesos_agent_image_providers': 'docker'
263
+            'mesos_slave_executor_env_variables': '{}',
264
+            'mesos_slave_isolation': 'docker/runtime,filesystem/linux',
265
+            'mesos_slave_work_dir': '/tmp/mesos/slave',
266
+            'mesos_slave_image_providers': 'docker'
267 267
         }
268 268
         self.assertEqual(expected, definition)
269 269
         self.assertEqual(
@@ -289,7 +289,7 @@ class TestBayConductorWithMesos(base.TestCase):
289 289
     def test_poll_node_count(self):
290 290
         mock_heat_stack, bay, poller = self.setup_poll_test()
291 291
 
292
-        mock_heat_stack.parameters = {'number_of_agents': 1}
292
+        mock_heat_stack.parameters = {'number_of_slaves': 1}
293 293
         mock_heat_stack.stack_status = bay_status.CREATE_IN_PROGRESS
294 294
         poller.poll_and_check()
295 295
 
@@ -298,7 +298,7 @@ class TestBayConductorWithMesos(base.TestCase):
298 298
     def test_poll_node_count_by_update(self):
299 299
         mock_heat_stack, bay, poller = self.setup_poll_test()
300 300
 
301
-        mock_heat_stack.parameters = {'number_of_agents': 2}
301
+        mock_heat_stack.parameters = {'number_of_slaves': 2}
302 302
         mock_heat_stack.stack_status = bay_status.UPDATE_COMPLETE
303 303
         self.assertRaises(loopingcall.LoopingCallDone, poller.poll_and_check)
304 304
 

+ 2
- 2
magnum/tests/unit/conductor/test_monitors.py View File

@@ -262,7 +262,7 @@ class MonitorsTestCase(base.TestCase):
262 262
         state_json = {
263 263
             'leader': 'master@10.0.0.6:5050',
264 264
             'pid': 'master@10.0.0.6:5050',
265
-            'agents': [{
265
+            'slaves': [{
266 266
                 'resources': {
267 267
                     'mem': 100,
268 268
                     'cpus': 1,
@@ -281,7 +281,7 @@ class MonitorsTestCase(base.TestCase):
281 281
         state_json = {
282 282
             'leader': 'master@10.0.0.6:5050',
283 283
             'pid': 'master@1.1.1.1:5050',
284
-            'agents': []
284
+            'slaves': []
285 285
         }
286 286
         self._test_mesos_monitor_pull_data(mock_url_get, state_json,
287 287
                                            0, 0, 0, 0)

+ 16
- 16
magnum/tests/unit/drivers/test_template_definition.py View File

@@ -783,13 +783,13 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
783 783
         mock_baymodel = mock.MagicMock()
784 784
         mock_baymodel.tls_disabled = False
785 785
         rexray_preempt = mock_baymodel.labels.get('rexray_preempt')
786
-        mesos_agent_isolation = mock_baymodel.labels.get(
787
-            'mesos_agent_isolation')
788
-        mesos_agent_work_dir = mock_baymodel.labels.get('mesos_agent_work_dir')
789
-        mesos_agent_image_providers = mock_baymodel.labels.get(
786
+        mesos_slave_isolation = mock_baymodel.labels.get(
787
+            'mesos_slave_isolation')
788
+        mesos_slave_work_dir = mock_baymodel.labels.get('mesos_slave_work_dir')
789
+        mesos_slave_image_providers = mock_baymodel.labels.get(
790 790
             'image_providers')
791
-        mesos_agent_executor_env_variables = mock_baymodel.labels.get(
792
-            'mesos_agent_executor_env_variables')
791
+        mesos_slave_executor_env_variables = mock_baymodel.labels.get(
792
+            'mesos_slave_executor_env_variables')
793 793
         mock_bay = mock.MagicMock()
794 794
         mock_bay.uuid = '5d12f6fd-a196-4bf0-ae4c-1f639a523a52'
795 795
         del mock_bay.stack_id
@@ -813,12 +813,12 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
813 813
             'tenant_name': 'admin',
814 814
             'domain_name': 'domainname',
815 815
             'rexray_preempt': rexray_preempt,
816
-            'mesos_agent_isolation': mesos_agent_isolation,
817
-            'mesos_agent_work_dir': mesos_agent_work_dir,
818
-            'mesos_agent_executor_env_variables':
819
-                mesos_agent_executor_env_variables,
820
-            'mesos_agent_image_providers': mesos_agent_image_providers,
821
-            'agents_to_remove': removal_nodes}}
816
+            'mesos_slave_isolation': mesos_slave_isolation,
817
+            'mesos_slave_work_dir': mesos_slave_work_dir,
818
+            'mesos_slave_executor_env_variables':
819
+                mesos_slave_executor_env_variables,
820
+            'mesos_slave_image_providers': mesos_slave_image_providers,
821
+            'slaves_to_remove': removal_nodes}}
822 822
         mock_get_params.assert_called_once_with(mock_context, mock_baymodel,
823 823
                                                 mock_bay, **expected_kwargs)
824 824
 
@@ -826,7 +826,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
826 826
         mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
827 827
 
828 828
         heat_param = mesos_def.get_heat_param(bay_attr='node_count')
829
-        self.assertEqual('number_of_agents', heat_param)
829
+        self.assertEqual('number_of_slaves', heat_param)
830 830
 
831 831
         heat_param = mesos_def.get_heat_param(bay_attr='master_count')
832 832
         self.assertEqual('number_of_masters', heat_param)
@@ -835,7 +835,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
835 835
         mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
836 836
 
837 837
         expected_api_address = 'updated_address'
838
-        expected_node_addresses = ['ex_agent', 'address']
838
+        expected_node_addresses = ['ex_slave', 'address']
839 839
         expected_master_addresses = ['ex_master', 'address']
840 840
 
841 841
         outputs = [
@@ -850,10 +850,10 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
850 850
              "output_key": "mesos_master"},
851 851
             {"output_value": ['any', 'output'],
852 852
              "description": "No description given",
853
-             "output_key": "mesos_agents_private"},
853
+             "output_key": "mesos_slaves_private"},
854 854
             {"output_value": expected_node_addresses,
855 855
              "description": "No description given",
856
-             "output_key": "mesos_agents"},
856
+             "output_key": "mesos_slaves"},
857 857
         ]
858 858
         mock_stack = mock.MagicMock()
859 859
         mock_stack.to_dict.return_value = {'outputs': outputs}

Loading…
Cancel
Save