Merge "Cleanup openstack components from patch scripts and tests"

changes/78/650478/1
Zuul 4 years ago committed by Gerrit Code Review
commit ba4bd9391c
  1. 5
      centos_pkg_dirs
  2. 489
      cgcs-patch/restart-info.html
  3. 27
      patch-scripts/EXAMPLE_0003/centos/EXAMPLE_0003.spec
  4. 2
      patch-scripts/EXAMPLE_0003/centos/build_srpm.data
  5. 57
      patch-scripts/EXAMPLE_0003/scripts/example-process-restart
  6. 27
      patch-scripts/EXAMPLE_AODH/centos/EXAMPLE_AODH.spec
  7. 2
      patch-scripts/EXAMPLE_AODH/centos/build_srpm.data
  8. 48
      patch-scripts/EXAMPLE_AODH/scripts/aodh-restart-example
  9. 27
      patch-scripts/EXAMPLE_HEAT/centos/EXAMPLE_HEAT.spec
  10. 2
      patch-scripts/EXAMPLE_HEAT/centos/build_srpm.data
  11. 48
      patch-scripts/EXAMPLE_HEAT/scripts/heat-restart-example
  12. 27
      patch-scripts/EXAMPLE_NEUTRON/centos/EXAMPLE_NEUTRON.spec
  13. 2
      patch-scripts/EXAMPLE_NEUTRON/centos/build_srpm.data
  14. 40
      patch-scripts/EXAMPLE_NEUTRON/scripts/neutron-restart-example
  15. 27
      patch-scripts/EXAMPLE_NOVA/centos/EXAMPLE_NOVA.spec
  16. 2
      patch-scripts/EXAMPLE_NOVA/centos/build_srpm.data
  17. 39
      patch-scripts/EXAMPLE_NOVA/scripts/nova-restart-example
  18. 2
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_A/scripts/restart-script
  19. 2
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_B/scripts/restart-script
  20. 10
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_C/scripts/restart-script
  21. 10
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_D/scripts/restart-script
  22. 2
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_E/scripts/restart-script
  23. 11
      patch-scripts/test-patches-suite-b/SUITE_B_PATCH_F/scripts/restart-script
  24. 2
      patch-scripts/test-patches/INSVC_COMPUTE/scripts/compute-restart
  25. 27
      patch-scripts/test-patches/INSVC_NOVA/centos/INSVC_NOVA.spec
  26. 2
      patch-scripts/test-patches/INSVC_NOVA/centos/build_srpm.data
  27. 39
      patch-scripts/test-patches/INSVC_NOVA/scripts/nova-restart
  28. 21
      patch-scripts/test-patches/RR_NOVA/centos/RR_NOVA.spec
  29. 2
      patch-scripts/test-patches/RR_NOVA/centos/build_srpm.data

@ -4,14 +4,9 @@ patch-alarm
requests-toolbelt
patch-scripts/EXAMPLE_0001
patch-scripts/EXAMPLE_0002
patch-scripts/EXAMPLE_0003
patch-scripts/EXAMPLE_RR
patch-scripts/EXAMPLE_MTCE
patch-scripts/EXAMPLE_NEUTRON
patch-scripts/EXAMPLE_AODH
patch-scripts/EXAMPLE_HEAT
patch-scripts/EXAMPLE_VIM
patch-scripts/EXAMPLE_NOVA
patch-scripts/EXAMPLE_SYSINV
patch-scripts/EXAMPLE_SERVICE
enable-dev-patch

@ -29,109 +29,10 @@ table, th, td {
</tr>
</thead>
<tr>
<td><font color="blue">ceilometer-polling</font></td>
<td>Daemon that polls Openstack services and build meters</td>
<td>Y</td>
<td>PMON</td>
<td><b>/etc/init.d/openstack-ceilometer-polling restart</b></td>
<td><b></b></td>
<td>N</td>
<td>As batch_polled_samples is set to True, may lose some samples that
are in the pollsters memory if the process is restarted exactly
when they have just finished polling for samples and are about to
publish these samples to RabbitMQ. This is about 10 millisecond
window for cpu_source and 0.03 millisecond 1 second window for
meter related sources.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">ceilometer-agent-notification</font></td>
<td>Daemon that listens to notifications on message queue, converts
them to Events and Samples and applies pipeline actions
</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service ceilometer-agent-notification</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-agent-notification stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-agent-notification start
</td>
<td><b></b></td>
<td>N</td>
<td>May lose some samples/events if the process is restarted while they
are being transformed or converted.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">ceilometer-collector</font></td>
<td>Daemon that gathers and records event and metering data created by
notification and polling agents
</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service ceilometer-collector</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-collector stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-collector
start
</td>
<td><b></b></td>
<td>N</td>
<td>May lose some samples/events if the process is restarted while they
are being persisted in Postgres DB. This is a tiny window
especially with recent optimization work (no message signature
verification, one single call to create_sample stored proc).<br>
Note: Making sure that child processes and their database
connections are released when a parent process is stopped is part
of collector functionality. It is not specific to in-service
patching.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">ceilometer-api</font></td>
<td>Service to query and view data recorded by the collector</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service ceilometer-api</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-api stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/ceilometer-api start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, horizon or CLI ceilometer request
will fail. Horizon request will be re-established automatically in
its next polling interval. CLI command needs to be re-issued.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">ceilometer-expirer-active</font></td>
<td>Cron job that purges expired samples and events as well as related
meter and resource data
</td>
<td>Y</td>
<td>CRON</td>
<td><b>N/A</b><br><br>
To run the expirer manually: /usr/bin/ceilometer-expirer-active
</td>
<td><b></b></td>
<td>N</td>
<td>There is no need to restart after patch. The change will take
effect next time the expirer cron job is run.<br>
Unless there are new features specifically planned for expirer,
this code is very stable.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">haproxy</font></td>
<td>A Proxy service that is responsible for forwarding external REST
API requests to Open Stack and Titanium Cloud services that listening on the
API requests to OpenStack and StarlingX services that listening on the
internal interfaces.
</td>
<td>Y</td>
@ -197,75 +98,6 @@ table, th, td {
<td></td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">neutron-server</font></td>
<td>Service that manages network functions</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service neutron-server</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/neutron-server stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/neutron-server start
</td>
<td><b>/bin/neutron-restart neutron-server</b><br/>or<br/><b>/bin/neutron-restart --all</b></td>
<td>N</td>
<td>Will cause neutron services to not be available while restarting,
which will prevent instances from being created while it is down.
Could cause RPCs from workers to fail while it is restarting.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">neutron-dhcp-agent</font></td>
<td>Agent on worker node that manages DHCP servers for tenant
networks
</td>
<td>Y</td>
<td>PMON</td>
<td><b>/etc/init.d/neutron-dhcp-agent restart</b></td>
<td><b>/bin/neutron-restart neutron-dhcp-agent</b><br/>or<br/><b>/bin/neutron-restart --all</b></td>
<td>N</td>
<td>Will prevent binding new DHCP servers while it is down. Requires
special handling to kill metadata haproxy processes for networks.
</td>
<td>Y</td>
</tr>
<tr>
<td><font color="blue">neutron-metadata-agent</font></td>
<td>Agent on worker node serving metadata to nodes</td>
<td>Y</td>
<td>PMON</td>
<td><b>/etc/init.d/neutron-metadata-agent restart</b></td>
<td><b>/bin/neutron-restart neutron-metadata-agent</b><br/>or<br/><b>/bin/neutron-restart --all</b></td>
<td>N</td>
<td>Nodes will not be able to receive metadata while it is down</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">neutron-sriov-nic-agent</font></td>
<td>Agent on worker node responsible for setting SR-IOV port
information
</td>
<td>Y</td>
<td>PMON</td>
<td><b>/etc/init.d/neutron-sriov-nic-agent restart</b></td>
<td><b>/bin/neutron-restart neutron-sriov-nic-agent</b><br/>or<br/><b>/bin/neutron-restart --all</b></td>
<td>N</td>
<td>Will not be able to set device parameters while restarting</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">neutron-bgp-dragent</font></td>
<td>BGP dynamic routing agent on controller node
</td>
<td>Y</td>
<td>PMON</td>
<td><b>/etc/init.d/neutron-bgp-dragent restart</b></td>
<td><b>/bin/neutron-restart neutron-bgp-dragent</b><br/>or<br/><b>/bin/neutron-restart --all</b></td>
<td>N</td>
<td>Will not be able to set device parameters while restarting</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">keystone-all</font></td>
<td>Keystone provides services that support an identity, token
@ -286,224 +118,9 @@ table, th, td {
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">aodh-api</font></td>
<td>Aodh service that handles API requests for openstack alarming.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service aodh-api</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-api stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-api start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will fail
and new requests will get connection error until the service is
re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">aodh-evaluator</font></td>
<td>Aodh service that performs threshold evaluation for openstack
alarming.
</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service aodh-evaluator</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-evaluator stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-evaluator start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted no openstack alarm threshold
evaluations will be executed until the service is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">aodh-listener</font></td>
<td>Aodh service that generates alarms based on events.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service aodh-listener</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-listener stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-listener start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted no openstack event based alarms will
be generated until the service is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">aodh-notifier</font></td>
<td>Aodh service that sends openstack alarm notifications.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service aodh-notifier</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-notifier stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/aodh-notifier start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted no openstack alarm threshold
notifications will be issued until the service is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">aodh-expirer-active</font></td>
<td>Cron job that purges expired openstack alarms</td>
<td>Y</td>
<td>CRON</td>
<td><b>N/A</b><br><br>
To run the expirer manually: /usr/bin/aodh-expirer-active
</td>
<td><b></b></td>
<td>N</td>
<td>There is no need to restart after patch. The change will take
effect next time the expirer cron job is run.<br>
Unless there are new features specifically planned for expirer,
this code is very stable.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">heat-api</font></td>
<td>Heat service for API requests for openstack orchestration.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service heat-api</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, horizon or CLI heat requests will
fail. Horizon will re-established automatically. CLI commands needs
to be re-issued. Heat stack updates in progress may fail.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">heat-api-cfn</font></td>
<td>Heat service for AWS Cloudformation API requests.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service heat-api-cfn</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api-cfn stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api-cfn start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, cloudformation API requests such as
autoscaling will not be processed.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">heat-api-cloudwatch</font></td>
<td>Heat service for AWS Cloudwatch metric collection.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service heat-api-cloudwatch</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api-cloudwatch stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-api-cloudwatch start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, stats sent from VMs will not be
processed.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">heat-engine</font></td>
<td>Heat service for AWS Cloudwatch metric collection.</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service heat-engine</b><br>
which runs the following:<br><br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-engine stop<br>
/bin/sh /usr/lib/ocf/resource.d/openstack/heat-engine start
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, openstrack heat orchestration
commands will not be processed. Stacks being created, deleted or
updated will fail and need to be re-initiated.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">heat-purge-deleted-active</font></td>
<td>Cron job that purges deleted openstack heat stacks from the
database
</td>
<td>Y</td>
<td>CRON</td>
<td><b>N/A</b><br><br>
To run the expirer manually: /usr/bin/heat-purge-deleted-active
</td>
<td><b></b></td>
<td>N</td>
<td>There is no need to restart after patch. The change will take
effect next time the cron job is run.<br>
Unless there are new features specifically planned, this code is
very stable.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">Glance</font></td>
<td>Glance imaging service - a single script restarts both glance-api
and glance-registry.
</td>
<td>Y</td>
<td>SM</td>
<td><b>/usr/bin/restart-glance</b><br>
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
continue and new requests will get connection error until the
service is re-enabled. The graceful restart takes more than 30
secs the process is killed. Timers are configurable from the
restart script
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">Cinder</font></td>
<td>Cinder volume service - a single script restarts cinder-volume,
cinder-scheduler, cinder-api and cinder-backup.
</td>
<td>Y</td>
<td>SM</td>
<td><b>/usr/bin/restart-cinder</b><br>
</td>
<td><b></b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
continue and new requests will get connection error until the
service is re-enabled. Timers are configurable from the restart
script
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">Horizon</font></td>
<td>Horizon - Openstack Dashboard GUI used to control openstack and Titanium Cloud
operations
<td>Horizon - Openstack Dashboard GUI
</td>
<td>Y</td>
<td>SM</td>
@ -520,7 +137,7 @@ table, th, td {
</tr>
<tr>
<td><font color="blue">IO-Monitor</font></td>
<td>Daemon which monitors cinder devices and raises alarms for excessive storage IO load.</td>
<td>Daemon which monitors devices and raises alarms for excessive storage IO load.</td>
<td>Y</td>
<td>PMON</td>
<td><b>pmon-restart io-monitor-manager</b></td>
@ -572,104 +189,6 @@ table, th, td {
<td>No impact. This service is for design use only.</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-api</font></td>
<td>Nova API Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-api</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-placement-api</font></td>
<td>Nova Placement API Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-placement-api</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-conductor</font></td>
<td>Nova Conductor Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-conductor</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-scheduler</font></td>
<td>Nova Scheduler Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-scheduler</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-console-auth</font></td>
<td>Nova Console Auth Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-console-auth</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-novnc</font></td>
<td>Nova VNC Service</td>
<td>Y</td>
<td>SM</td>
<td><b>sm-restart-safe service nova-novnc</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the service is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">nova-compute</font></td>
<td>Nova Compute Service</td>
<td>Y</td>
<td>PMON</td>
<td><b>/usr/local/sbin/pmon-restart nova-compute</b><br></td>
<td><b>/bin/nova-restart</b></td>
<td>N</td>
<td>While the services is restarted, the outstanding requests will
fail and new requests will get connection error until the service
is re-enabled.
</td>
<td>N</td>
</tr>
<tr>
<td><font color="blue">ceph-osd & ceph-mon</font></td>
<td>Ceph OSD and Monitor processes</td>
@ -685,7 +204,7 @@ table, th, td {
the same time.
</td>
<td>Restarting it on controller-0, controller-1 & storage-0,
at the same time with glance, cinder, nova, ceph-rest-api, sysinv or ceph-manager
at the same time with ceph-rest-api, sysinv or ceph-manager
on the active controller should be avoided due to ~30 secs delay to ceph APIs.
This delay happens when any of the ceph-mon changes state and may cause timeouts
when dependent services restart. Recommendations: (1) On the active controller,

@ -1,27 +0,0 @@
Name: EXAMPLE_0003
Summary: TIS In-Service Patch Scripts Example, using process-restart
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: example-process-restart
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,57 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart,
# triggering a restart of the patching daemons themselves
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# processes that run on all nodes
processes_to_restart="sysinv-agent ceilometer-polling"
/usr/local/sbin/patch-restart-processes sysinv-agent ceilometer-polling
if [ $? != 0 ] ; then
loginfo "patching restart failed"
loginfo "... process-restart ${processes_to_restart}"
exit ${PATCH_STATUS_FAILED}
fi
#
# Next, handle restarting the patch-controller.
#
if is_controller
then
processes_to_restart="ceilometer-api ceilometer-agent-notification ceilometer-collector"
/usr/local/sbin/patch-restart-processes ${processes_to_restart}
if [ $? != 0 ] ; then
loginfo "patching restart failed"
loginfo "... process-restart ${processes_to_restart}"
exit ${PATCH_STATUS_FAILED}
fi
fi
#
# Exit the script with the overall return code
#
exit $GLOBAL_RC

@ -1,27 +0,0 @@
Name: EXAMPLE_AODH
Summary: TIS In-Service Aodh Patch Script Example
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: aodh-restart-example
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,48 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart,
# triggering a restart of the patching daemons themselves
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# AODH only runs on the controller
if is_controller
then
processes_to_restart="aodh-api aodh-evaluator aodh-listener aodh-notifier"
/usr/local/sbin/patch-restart-processes ${processes_to_restart}
if [ $? != 0 ] ; then
loginfo "patching restart failed"
loginfo "... process-restart ${processes_to_restart}"
exit ${PATCH_STATUS_FAILED}
fi
fi
#
# Exit the script with the overall return code
#
exit $GLOBAL_RC

@ -1,27 +0,0 @@
Name: EXAMPLE_HEAT
Summary: TIS In-Service Heat Patch Script Example
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: heat-restart-example
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,48 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart,
# triggering a restart of the patching daemons themselves
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# HEAT only runs on the controller
if is_controller
then
processes_to_restart="heat-api heat-engine heat-api-cloudwatch heat-api-cfn"
/usr/local/sbin/patch-restart-processes ${processes_to_restart}
if [ $? != 0 ] ; then
loginfo "patching restart failed"
loginfo "... process-restart ${processes_to_restart}"
exit ${PATCH_STATUS_FAILED}
fi
fi
#
# Exit the script with the overall return code
#
exit $GLOBAL_RC

@ -1,27 +0,0 @@
Name: EXAMPLE_NEUTRON
Summary: TIS In-Service Neutron Patch Script Example
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: neutron-restart-example
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,40 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart for all neutron processes
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# NOTE: The following restart example code could be implemented in scripts
# owned by the various domains, with a single high-level call in the patch-script.
# This would be the preferred method, in fact, to ensure the patch-scripts
# themselves are simple and clean.
#
/bin/neutron-restart --all
if [ $? -ne 0 ]
then
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
exit $GLOBAL_RC

@ -1,27 +0,0 @@
Name: EXAMPLE_NOVA
Summary: TIS In-Service Nova Patch Script Example
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: nova-restart-example
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,39 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart for all neutron processes
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# NOTE: The following restart example code could be implemented in scripts
# owned by the various domains, with a single high-level call in the patch-script.
# This would be the preferred method, in fact, to ensure the patch-scripts
# themselves are simple and clean.
#
/bin/nova-restart
if [ $? -ne 0 ]
then
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
exit $GLOBAL_RC

@ -6,7 +6,7 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for maintenance and sysinv processes
#
#

@ -6,7 +6,7 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for all NFV and Sysinv processes
#
#

@ -6,7 +6,7 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for maintenance processes
#
#
@ -31,14 +31,6 @@ declare -i GLOBAL_RC=$PATCH_STATUS_OK
# themselves are simple and clean.
#
# NOVA
bash -x /bin/nova-restart
if [ $? -ne 0 ]
then
loginfo "Nova patching restart failed"
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
# MTCE
bash -x /usr/local/sbin/patch-restart-mtce \
mtcalarmd mtclogd \

@ -6,7 +6,7 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for Horizon and Sysinv processes
#
#
@ -31,14 +31,6 @@ declare -i GLOBAL_RC=$PATCH_STATUS_OK
# themselves are simple and clean.
#
# NOVA
bash -x /bin/nova-restart
if [ $? -ne 0 ]
then
loginfo "Nova patching restart failed"
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
# HORIZON
if is_controller
then

@ -6,7 +6,7 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for all maintenance processes
#
#

@ -6,7 +6,8 @@
#
#
# This script provides an example in-service patching restart for all neutron processes
# This script provides an example in-service patching restart for all Maintenance,
# Horizon, Sysinv and NFV processes
#
#
@ -31,14 +32,6 @@ declare -i GLOBAL_RC=$PATCH_STATUS_OK
# themselves are simple and clean.
#
# NOVA
bash -x /bin/nova-restart
if [ $? -ne 0 ]
then
loginfo "Nova patching restart failed"
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
# MTCE
bash -x /usr/local/sbin/patch-restart-mtce \
mtcalarmd mtclogd \

@ -25,7 +25,7 @@
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# TODO: Add restart of nova-compute?
# Add restart commands here...
#
# Exit the script with the overall return code

@ -1,27 +0,0 @@
Name: INSVC_NOVA
Summary: In-Service Nova Patch Script
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
Source0: nova-restart
%install
install -Dp -m 700 %{S:0} %{buildroot}%{_patch_scripts}/%{name}
%description
%{summary}
%files
%defattr(-,root,root,-)
%{_patch_scripts}/*
%post
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0
%preun
cp -f %{_patch_scripts}/%{name} %{_runtime_patch_scripts}/
exit 0

@ -1,2 +0,0 @@
COPY_LIST="scripts/*"
TIS_PATCH_VER=0

@ -1,39 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2017 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart for all nova processes
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# NOTE: The following restart example code could be implemented in scripts
# owned by the various domains, with a single high-level call in the patch-script.
# This would be the preferred method, in fact, to ensure the patch-scripts
# themselves are simple and clean.
#
/bin/nova-restart
if [ $? -ne 0 ]
then
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
exit $GLOBAL_RC

@ -1,21 +0,0 @@
Name: RR_NOVA
Summary: Reboot-Required Nova Patch
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
%description
%{summary}
%files
%post
touch /var/run/node_is_patched_rr
exit 0
%preun
touch /var/run/node_is_patched_rr
exit 0

@ -1,2 +0,0 @@
ALLOW_EMPTY_RPM=true
TIS_PATCH_VER=0
Loading…
Cancel
Save