Browse Source

Merge "add sysinv-agent devstack support"

Zuul 5 months ago
parent
commit
b15afc7541
2 changed files with 30 additions and 1 deletions
  1. 1
    0
      .zuul.yaml
  2. 29
    1
      devstack/lib/stx-config

+ 1
- 0
.zuul.yaml View File

@@ -127,6 +127,7 @@
127 127
         fm-api: true
128 128
         # fm-rest-api: true
129 129
         # fm-mgr: true
130
+        sysinv-agent: true
130 131
         sysinv-api: true
131 132
         sysinv-cond: true
132 133
         mysql: false

+ 29
- 1
devstack/lib/stx-config View File

@@ -14,10 +14,13 @@
14 14
 #
15 15
 # - install_cgtsclient
16 16
 # - install_sysinv
17
+# - install_sysinv_agent
17 18
 # - configure_sysinv
18 19
 # - init_sysinv
19 20
 # - start_sysinv
21
+# - start_sysinv_agent
20 22
 # - stop_sysinv
23
+# - stop_sysinv_agent
21 24
 # - cleanup_sysinv
22 25
 
23 26
 _XTRACE_STX_CONFIG=$(set +o | grep xtrace)
@@ -36,6 +39,7 @@ SYSINV_SERVICE_PROTOCOL=${SYSINV_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
36 39
 SYSINV_SERVICE_PORT=${SYSINV_SERVICE_PORT:-6385}
37 40
 SYSINV_SERVICE_HOST=${SYSINV_SERVICE_HOST:-$SERVICE_HOST}
38 41
 SYSINV_DIR=$DEST/stx-config/sysinv/sysinv/sysinv
42
+SYSINV_AGENT_DIR=$DEST/stx-config/sysinv/sysinv-agent
39 43
 SYSINV_ETC_GOENABLEDD=/etc/goenabled.d
40 44
 SYSINV_CONF_DIR=/etc/sysinv
41 45
 SYSINV_CONF_FILE=$SYSINV_CONF_DIR/sysinv.conf
@@ -185,6 +189,14 @@ function install_sysinv {
185 189
     sudo install -p -D -m 755 $SYSINV_DIR/sysinv/cmd/partition_info.sh $SYSINV_BIN_DIR/partition_info.sh
186 190
     sudo install -p -D -m 755 $SYSINV_DIR/sysinv/cmd/manage-partitions $SYSINV_BIN_DIR/manage-partitions
187 191
     sudo install -p -D -m 755 $SYSINV_DIR/sysinv/cmd/query_pci_id $SYSINV_BIN_DIR/query_pci_id
192
+    if is_service_enabled sysinv-agent; then
193
+        echo_summary "Installing sysinv-agent service"
194
+        install_sysinv_agent
195
+    fi
196
+}
197
+
198
+function install_sysinv_agent {
199
+    sudo install -p -D -m 755 $SYSINV_AGENT_DIR/sysinv-agent $SYSINV_BIN_DIR/sysinv-agent
188 200
 }
189 201
 
190 202
 function install_sysinv_depends {
@@ -199,7 +211,18 @@ function start_sysinv {
199 211
     fi
200 212
     if is_service_enabled sysinv-cond; then
201 213
         echo "start sysinv-cond service"
202
-	start_sysinv_conductor
214
+        start_sysinv_conductor
215
+    fi
216
+    if is_service_enabled sysinv-agent; then
217
+        echo "start sysinv-agent service"
218
+        start_sysinv_agent
219
+    fi
220
+}
221
+
222
+function start_sysinv_agent {
223
+    if is_service_enabled sysinv-agent; then
224
+        echo "start sysinv-agent service"
225
+        run_process sysinv-agent "$SYSINV_BIN_DIR/sysinv-agent"
203 226
     fi
204 227
 }
205 228
 
@@ -236,6 +259,11 @@ function start_sysinv_conductor {
236 259
 function stop_sysinv {
237 260
     stop_sysinv_api
238 261
     stop_sysinv_conductor
262
+    stop_sysinv_agent
263
+}
264
+
265
+function stop_sysinv_agent {
266
+    stop_process sysinv-agent
239 267
 }
240 268
 
241 269
 function stop_sysinv_api {

Loading…
Cancel
Save