Skip to content

Commit

Permalink
OSDOCS-5442: add info on lvmd and ovn yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunaDiaz authored and openshift-cherrypick-robot committed Apr 5, 2023
1 parent bcd1e30 commit 23122cc
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 60 deletions.
8 changes: 2 additions & 6 deletions microshift_storage/microshift-storage-plugin-overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ toc::[]
LVMS provisions new logical volume management (LVM) logical volumes (LVs) for container workloads with appropriately configured persistent volume claims (PVC). Each PVC references a storage class that represents an LVM Volume Group (VG) on the host node. LVs are only provisioned for scheduled pods.

include::modules/microshift-lvms-system-requirements.adoc[leveloffset=+1]

include::modules/microshift-lvms-deployment.adoc[leveloffset=+1]

include::modules/microshift-lvms-setting-path.adoc[leveloffset=+2]

include::modules/microshift-lvmd-yaml-creating.adoc[leveloffset=+1]
include::modules/microshift-lvms-configuring.adoc[leveloffset=+1]

include::modules/microshift-using-lvms.adoc[leveloffset=+1]
include::modules/microshift-lvms-using.adoc[leveloffset=+1]
46 changes: 32 additions & 14 deletions modules/microshift-configuring-ovn.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@
//
// * microshift_networking/microshift-networking.adoc

:_content-type: CONCEPT
:_content-type: PROCEDURE
[id="microshift-config-OVN-K_{context}"]
= OVN-Kubernetes configuration options
= Creating an OVN-Kubernetes configuration file

An OVN-Kubernetes config file can be written to `/etc/microshift/ovn.yaml`. {product-title} uses default OVN-Kubernetes configuration values if an OVN-Kubernetes config file is not customized.
{product-title} uses built-in default OVN-Kubernetes values if an OVN-Kubernetes configuration file is not created. You can write an OVN-Kubernetes configuration file to `/etc/microshift/ovn.yaml`. An example file is provided for your configuration.

.Procedure

. To create your `ovn.yaml` file, run the following command:
+
[source, yaml]
----
$ sudo cp /etc/microshift/ovn.yaml.default /etc/microshift/ovn.yaml
----

. To list the contents of the configuration file you created, run the following command:
+
[source, yaml]
----
$ cat /etc/microshift/ovn.yaml.default
----
+
.Example 'yaml' configuration file with default values

.Default `ovn.yaml` config values:
[source,yaml]
----
ovsInit:
Expand All @@ -20,9 +37,9 @@ mtu: 1400
<1> The default value is an empty string that means "not-specified." The CNI network plugin auto-detects to interface with the default route.
<2> The default value is an empty string that means "disabled."

To customize your configuration, use the following table that lists the valid values you can use in your `ovn.yaml` config file:

.Supported optional OVN-Kubernetes configurations for {product-title}.
. To customize your configuration, use the following table that lists the valid values you can use:
+
.Supported optional OVN-Kubernetes configurations for {product-title}

[cols="5",options="header"]
|===
Expand Down Expand Up @@ -56,12 +73,18 @@ To customize your configuration, use the following table that lists the valid va
|MTU value used for the pods
|1300
|===
+
[.small]
--
1. The OVS bridge is required. When `disableOVSInit` is true, OVS bridge `br-ex` must be configured manually.
+
[IMPORTANT]
====
If you change the `mtu` configuration value in the `ovn.yaml` file, you must restart the host that {product-title} is running on to apply the updated setting.
====
--

.Example `ovn.yaml` config file:
.Example custom `ovn.yaml` configuration file

[source, yaml]
----
Expand All @@ -74,10 +97,5 @@ mtu: 1300

[IMPORTANT]
====
When `disableOVSInit` is set to true in the `ovn.yaml` config file, the OVS bridge br-ex must be manually configured.
====

[IMPORTANT]
====
If you change the `mtu` configuration value in the `ovn.yaml` file, you must restart the host that {product-title} is running on for the updated setting to apply.
When `disableOVSInit` is set to true in the `ovn.yaml` config file, the `br-ex` OVS bridge must be manually configured.
====
18 changes: 18 additions & 0 deletions modules/microshift-lvmd-yaml-creating.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Module included in the following assemblies:
//
// * microshift_storage/microshift-storage-plugin-overview.adoc

:_content-type: PROCEDURE
[id="microshift-lvmd-yaml-creating_{context}"]
= Creating an LVMS configuration file

When {product-title} runs, it uses LVMS configuration from `/etc/microshift/lvmd.yaml`, if provided. You must place any configuration files that you create into the `/etc/microshift/` directory.

.Procedure

* To create the `lvmd.yaml` configuration file, run the following command:
+
[source, terminal]
----
$ sudo cp /etc/microshift/lvmd.yaml.default /etc/microshift/lvmd.yaml
----
9 changes: 5 additions & 4 deletions modules/microshift-lvms-configuring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
// * microshift_storage/microshift-storage-plugin-overview.adoc

:_content-type: CONCEPT
[id="lvms-configuring_{context}"]
[id="microshift-lvms-configuring_{context}"]
= Configuring the LVMS

{product-title} supports passing through your LVM configuration and allows you to specify custom volume groups, thin volume provisioning parameters, and reserved unallocated volume group space. You can edit the LVMS configuration file at any time. You must restart {product-title} to deploy configuration changes after editing the file.
{product-title} supports passing through your LVM configuration and allows you to specify custom volume groups, thin volume provisioning parameters, and reserved unallocated volume group space. You can edit the LVMS configuration file you created at any time. You must restart {product-title} to deploy configuration changes after editing the file.

The following `lvmd.yaml` example file shows a basic LVMS configuration:

.LVMS YAML configuration example
.LVMS configuration example

[source,yaml]
----
socket-name: <1>
Expand All @@ -36,7 +37,7 @@ device-classes: <2>
<2> `map[string]DeviceClass`. The `device-class` settings.
<3> String. The name of the `device-class`.
<4> String. The group where the `device-class` creates the logical volumes.
<5> Unit64. Storage capacity in GiB to be left unallocated in the volume group. Defaults to `10`.
<5> Unit64. Storage capacity in GiB to be left unallocated in the volume group. Defaults to `0`.
<6> Boolean. Indicates that the `device-class` is used by default. Defaults to `false`.
<7> Unit. The number of stripes in the logical volume.
<8> String. The amount of data that is written to one device before moving to the next device.
Expand Down
9 changes: 4 additions & 5 deletions modules/microshift-lvms-deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
// * microshift_storage/microshift-storage-plugin-overview.adoc

:_content-type: CONCEPT
[id="lvms-deployment_{context}"]
= LVMS Deployment
[id="microshift-lvms-deployment_{context}"]
= LVMS deployment

LVMS is automatically deployed on to the cluster in the `openshift-storage` namespace after {product-title} boots.
//Q: is this correct, or should it be `microshift-namespace`?
LVMS is automatically deployed on to the cluster in the `openshift-storage` namespace after {product-title} starts.

LVMS uses `StorageCapacity` tracking to ensure that pods with an LVMS PVC are not scheduled if the requested storage is greater than the free storage of the volume group. For more information about `StorageCapacity` tracking, read link:https://kubernetes.io/docs/concepts/storage/storage-capacity/[Storage Capacity].
LVMS uses `StorageCapacity` tracking to ensure that pods with an LVMS PVC are not scheduled if the requested storage is greater than the free storage of the volume group. For more information about `StorageCapacity` tracking, read link:https://kubernetes.io/docs/concepts/storage/storage-capacity/[Storage Capacity].
17 changes: 0 additions & 17 deletions modules/microshift-lvms-setting-path.adoc

This file was deleted.

17 changes: 9 additions & 8 deletions modules/microshift-lvms-system-requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@
// * microshift_storage/microshift-storage-plugin-overview.adoc

:_content-type: CONCEPT
[id="lvms-system-requirements_{context}"]
[id="microshift-lvms-system-requirements_{context}"]
= LVMS system requirements

Using LVMS in {product-title} requires the following system specifications.

[id="lvms-volume-group-name_{context}"]
== Volume Group Name
== Volume group name

The default integration of LVMS selects the default volume group dynamically. If there are no volume groups on the {product-title} host, LVMS is disabled.
The default integration of LVMS selects the default volume group (VG) dynamically. If there are no volume groups on the {product-title} host, LVMS is disabled.

If there is only one volume group on the {product-title} host, that volume group is used. If there are multiple volume groups, the group `microshift` is used. If the `microshift` group is not found, LVMS is disabled.
If there is only one VG on the {product-title} host, that VG is used. If there are multiple volume groups, the group `microshift` is used. If the `microshift` group is not found, LVMS is disabled.

If you want to use a specific volume group, LVMS must be configured to select that volume group. You can change the default name of the volume group in the configuration file. For details, read the "Configuring the LVMS" section of this document.
If you want to use a specific VG, LVMS must be configured to select that VG. You can change the default name of the VG in the configuration file. For details, read the "Configuring the LVMS" section of this document.

You can change the default name of the volume group in the configuration file. For details, read the "Configuring the LVMS" section of this document.
You can change the default name of the VG in the configuration file. For details, read the "Configuring the LVMS" section of this document.

Prior to launching, the `lvmd.yaml` configuration file must specify an existing volume group on the node with sufficient capacity for workload storage. If the volume group does not exist, the node controller fails to start and enters a `CrashLoopBackoff` state.
Prior to launching, the `lvmd.yaml` configuration file must specify an existing VG on the node with sufficient capacity for workload storage. If the VG does not exist, the node controller fails to start and enters a `CrashLoopBackoff` state.

[id="lvms-volume-size-increments_{context}"]
== Volume size increments

The LVMS provisions storage in increments of 1 gigabyte (GB). Storage requests are rounded up to the nearest GB. When the capacity of a volume group is less than 1 GB, the `PersistentVolumeClaim` registers a `ProvisioningFailed` event, for example:
The LVMS provisions storage in increments of 1 gigabyte (GB). Storage requests are rounded up to the nearest GB. When the capacity of a VG is less than 1 GB, the `PersistentVolumeClaim` registers a `ProvisioningFailed` event, for example:

.Example output
[source,terminal]
----
Warning ProvisioningFailed 3s (x2 over 5s) topolvm.cybozu.com_topolvm-controller-858c78d96c-xttzp_0fa83aef-2070-4ae2-bcb9-163f818dcd9f failed to provision volume with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
//
// * microshift_storage/microshift-storage-plugin-overview.adoc

:_content-type: CONCEPT
[id="using-lvms_{context}"]
:_content-type: PROCEDURE
[id="microshift-lvms-using_{context}"]
= Using the LVMS

The LVMS `StorageClass` is deployed with a default `StorageClass`. Any `PersistentVolumeClaim` objects without a `.spec.storageClassName` defined automatically has a `PersistentVolume` provisioned from the default `StorageClass`.

Use the following procedure to provision and mount a logical volume to a pod.
The LVMS `StorageClass` is deployed with a default `StorageClass`. Any `PersistentVolumeClaim` objects without a `.spec.storageClassName` defined automatically has a `PersistentVolume` provisioned from the default `StorageClass`. Use the following procedure to provision and mount a logical volume to a pod.

.Procedure

* Enter the following command to provision and mount a logical volume to a pod:
* To provision and mount a logical volume to a pod, run the following command:
+
[source,terminal]
----
Expand Down Expand Up @@ -41,6 +39,14 @@ spec:
volumeMounts:
- mountPath: /mnt
name: my-volume
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumes:
- name: my-volume
persistentVolumeClaim:
Expand Down

0 comments on commit 23122cc

Please sign in to comment.