In the following we describe which objects are created during the image build process on the build system, the NFS Server and in the Red Hat® OpenShift® Container Platform and how they can be removed.
Table of Contents
During the image build tools/image-build
temporary files are copied from the
reference SAP system hosts to the build system. These temporary files are stored in directory <temp-root>
.
If you do not explicitly specify a temporary directory as argument when building the images, /data/tmp
is used.
It may be required to clean up temporary build data
rm -rf /data/tmp/soos-build-<flavor>.<temp-uuid>*
To remove one or more of the previously created images from the local
podman
repository on your build LPAR:
- list the images by running
# podman images
- copy the image ID and remove the image by issuing:
# podman rmi -f <image-id>
These tasks are normally executed out of tools/ocp-deployment --remove
or tools/nfs-overlay-teardown
-
Edit the NFS export list
/etc/exports
on the NFS server and remove all orphaned exported filesystems -
execute
exportfs -a
asroot
user on the NFS server to stop exporting -
unmount all unnecessary overlay filesystems
-
Edit
/etc/fstab
on the NFS server and remove all the unneccesary overlay filesystems
Once all deployments are deleted and there is no intention to reactivate them once again then the initial copy of {data,log}
for the SAP HANA system can be removed too.
Before this action see Cleaning up the Orphaned Overlay Filesystems to ensure that no overlay filesystems is present any more.
Identify the base directory nfs.bases.copy
in the config file config.yaml
Example:
bases:
description: Base directories
copy:
description: Path where directories {data,log} of the original
SAP HANA system are copied to
required: true
value: '/nfsexp/soos/data'
and remove the SAP HANA data in it.
-
Login as OC cluster user, e.g. by running
tools/oc-login -u
on the build LPAR.
-
Delete the project
oc delete project <ocp-project-name>
This will delete the project with all objects in it.
Cluster administrators can periodically prune older versions of images that are no longer in use, but are still taking up disk space.
-
Login as OC cluster admin, e.g. by running
tools/oc-login -a
on the build LPAR.
-
Execute the image pruning via
oc adm prune images --confirm --registry-url=https://default-route-openshift-image-registry.apps.<ocp-domain-name>
Check the connections using the web monitor for HAProxy. On the Red Had OpenShift Container
Platform helper node the web monitor can be reached via a browser using
http://<ocp-helper-node>:9000
If all connections of one deployment <app-name>
are down, the deployment is probably stopped
or even removed.
-
As long as the deployment
<app-name>
is not removed from the RedHat OpenShift Cluster, the HAProxy entries of it can be removed by executingtools/ocp-haproxy-forwarding --remove --app-name=<app-name>
on the build LPAR.
-
If the deployment
<app-name>
is already removed from the RedHat OpenShift Cluster, then the it cannot be removed from the HAProxy configuration using the tools.Logon as user
root
to the Red Had OpenShift Container Platform helper node, and-
remove the orphaned entries by editing
/etc/haproxy/haproxy.cfg
-
Afterwards reload the HAProxy service
systemctl reload haproxy
-