docs: fix typos and grammar in code comments
Fix duplicate words, incorrect articles (a/an), it's/its, and other small
grammar mistakes in Go comments and user-facing messages across pkg/, cmd/,
and tests/.
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit c0eb360041)
This commit is contained in:
1 parent
4fe02aa1b5
commit
ac686a02c8
24 files changed
+72
-72
No files matched your search
@@ -876,7 +876,7 @@ time.Duration
|
||||
<p>WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart.
|
||||
If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
|
||||
if <code>continueUpgradeAfterChecksEvenIfNotHealthy</code> is <code>false</code>. If <code>continueUpgradeAfterChecksEvenIfNotHealthy</code> is <code>true</code>, then operator would
|
||||
continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won’t be applied if <code>skipUpgradeChecks</code> is <code>true</code>.
|
||||
continue with the upgrade of an OSD even if it’s not ok to stop after the timeout. This timeout won’t be applied if <code>skipUpgradeChecks</code> is <code>true</code>.
|
||||
The default wait timeout is 10 minutes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -5570,7 +5570,7 @@ CephxStatus
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<p>OSD shows the CephX key status of of OSDs</p>
|
||||
<p>OSD shows the CephX key status of OSDs</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -5863,7 +5863,7 @@ time.Duration
|
||||
<p>WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart.
|
||||
If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
|
||||
if <code>continueUpgradeAfterChecksEvenIfNotHealthy</code> is <code>false</code>. If <code>continueUpgradeAfterChecksEvenIfNotHealthy</code> is <code>true</code>, then operator would
|
||||
continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won’t be applied if <code>skipUpgradeChecks</code> is <code>true</code>.
|
||||
continue with the upgrade of an OSD even if it’s not ok to stop after the timeout. This timeout won’t be applied if <code>skipUpgradeChecks</code> is <code>true</code>.
|
||||
The default wait timeout is 10 minutes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -7491,7 +7491,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChecked is the last time time the status was checked</p>
|
||||
<p>LastChecked is the last time the status was checked</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -7503,7 +7503,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChanged is the last time time the status last changed</p>
|
||||
<p>LastChanged is the last time the status last changed</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -7759,7 +7759,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChecked is the last time time the status was checked</p>
|
||||
<p>LastChecked is the last time the status was checked</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -7771,7 +7771,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChanged is the last time time the status last changed</p>
|
||||
<p>LastChanged is the last time the status last changed</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -10022,7 +10022,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChecked is the last time time the status was checked</p>
|
||||
<p>LastChecked is the last time the status was checked</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -10034,7 +10034,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChanged is the last time time the status last changed</p>
|
||||
<p>LastChanged is the last time the status last changed</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -15154,7 +15154,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChecked is the last time time the status was checked</p>
|
||||
<p>LastChecked is the last time the status was checked</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -15166,7 +15166,7 @@ string
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>LastChanged is the last time time the status last changed</p>
|
||||
<p>LastChanged is the last time the status last changed</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -116,7 +116,7 @@ func init() {
|
||||
subCommand.Flags().VarPF(t, "timeout-minutes", "", /* no shorthand */
|
||||
"The time to wait for resources to change to the expected state. For example, for the "+
|
||||
"test web server to start, for test clients to become ready, or for test resources to be deleted. "+
|
||||
"At longest, this may need to reflect the time it takes for client pods to to pull images, "+
|
||||
"At longest, this may need to reflect the time it takes for client pods to pull images, "+
|
||||
"get address assignments, and then for each client to determine that its network connection is stable. "+
|
||||
"Minimum: 1 minute. Recommended: 2 minutes or more.")
|
||||
}
|
||||
|
||||
@@ -191,10 +191,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
summary:
|
||||
description: Summary is the mirroring status summary
|
||||
@@ -302,10 +302,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
@@ -729,10 +729,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
summary:
|
||||
description: Summary is the mirroring status summary
|
||||
@@ -847,10 +847,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
@@ -5985,7 +5985,7 @@ spec:
|
||||
WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart.
|
||||
If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
|
||||
if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would
|
||||
continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
continue with the upgrade of an OSD even if it's not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
The default wait timeout is 10 minutes.
|
||||
format: int64
|
||||
type: integer
|
||||
@@ -6219,7 +6219,7 @@ spec:
|
||||
type: integer
|
||||
type: object
|
||||
osd:
|
||||
description: OSD shows the CephX key status of of OSDs
|
||||
description: OSD shows the CephX key status of OSDs
|
||||
properties:
|
||||
keyCephVersion:
|
||||
description: |-
|
||||
@@ -9272,10 +9272,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
type: object
|
||||
observedGeneration:
|
||||
@@ -9292,10 +9292,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
|
||||
+14
-14
@@ -194,10 +194,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
summary:
|
||||
description: Summary is the mirroring status summary
|
||||
@@ -305,10 +305,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
@@ -731,10 +731,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
summary:
|
||||
description: Summary is the mirroring status summary
|
||||
@@ -849,10 +849,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
@@ -5983,7 +5983,7 @@ spec:
|
||||
WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart.
|
||||
If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
|
||||
if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would
|
||||
continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
continue with the upgrade of an OSD even if it's not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
The default wait timeout is 10 minutes.
|
||||
format: int64
|
||||
type: integer
|
||||
@@ -6217,7 +6217,7 @@ spec:
|
||||
type: integer
|
||||
type: object
|
||||
osd:
|
||||
description: OSD shows the CephX key status of of OSDs
|
||||
description: OSD shows the CephX key status of OSDs
|
||||
properties:
|
||||
keyCephVersion:
|
||||
description: |-
|
||||
@@ -9267,10 +9267,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
type: object
|
||||
observedGeneration:
|
||||
@@ -9287,10 +9287,10 @@ spec:
|
||||
description: Details contains potential status errors
|
||||
type: string
|
||||
lastChanged:
|
||||
description: LastChanged is the last time time the status last changed
|
||||
description: LastChanged is the last time the status last changed
|
||||
type: string
|
||||
lastChecked:
|
||||
description: LastChecked is the last time time the status was checked
|
||||
description: LastChecked is the last time the status was checked
|
||||
type: string
|
||||
snapshotSchedules:
|
||||
description: SnapshotSchedules is the list of snapshots scheduled
|
||||
|
||||
@@ -175,7 +175,7 @@ type ClusterSpec struct {
|
||||
// WaitTimeoutForHealthyOSDInMinutes defines the time the operator would wait before an OSD can be stopped for upgrade or restart.
|
||||
// If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
|
||||
// if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would
|
||||
// continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
// continue with the upgrade of an OSD even if it's not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
|
||||
// The default wait timeout is 10 minutes.
|
||||
// +optional
|
||||
WaitTimeoutForHealthyOSDInMinutes time.Duration `json:"waitTimeoutForHealthyOSDInMinutes,omitempty"`
|
||||
@@ -840,7 +840,7 @@ type ClusterCephxStatus struct {
|
||||
Mon CephxStatus `json:"mon,omitempty"`
|
||||
// Mgr represents the cephx key rotation status of the ceph manager daemon
|
||||
Mgr CephxStatus `json:"mgr,omitempty"`
|
||||
// OSD shows the CephX key status of of OSDs
|
||||
// OSD shows the CephX key status of OSDs
|
||||
OSD CephxStatus `json:"osd,omitempty"`
|
||||
// CSI shows the CephX key status for Ceph-CSI components.
|
||||
CSI CephxStatusWithKeyCount `json:"csi,omitempty"`
|
||||
@@ -1167,10 +1167,10 @@ type MirroringStatusSpec struct {
|
||||
// MirroringStatus is the mirroring status of a pool/radosNamespace
|
||||
// +optional
|
||||
MirroringStatus `json:",inline"`
|
||||
// LastChecked is the last time time the status was checked
|
||||
// LastChecked is the last time the status was checked
|
||||
// +optional
|
||||
LastChecked string `json:"lastChecked,omitempty"`
|
||||
// LastChanged is the last time time the status last changed
|
||||
// LastChanged is the last time the status last changed
|
||||
// +optional
|
||||
LastChanged string `json:"lastChanged,omitempty"`
|
||||
// Details contains potential status errors
|
||||
@@ -1289,10 +1289,10 @@ type SnapshotScheduleStatusSpec struct {
|
||||
// +nullable
|
||||
// +optional
|
||||
SnapshotSchedules []SnapshotSchedulesSpec `json:"snapshotSchedules,omitempty"`
|
||||
// LastChecked is the last time time the status was checked
|
||||
// LastChecked is the last time the status was checked
|
||||
// +optional
|
||||
LastChecked string `json:"lastChecked,omitempty"`
|
||||
// LastChanged is the last time time the status last changed
|
||||
// LastChanged is the last time the status last changed
|
||||
// +optional
|
||||
LastChanged string `json:"lastChanged,omitempty"`
|
||||
// Details contains potential status errors
|
||||
@@ -1643,10 +1643,10 @@ type FilesystemMirroringInfoSpec struct {
|
||||
// +nullable
|
||||
// +optional
|
||||
FilesystemMirroringAllInfo []FilesystemMirroringInfo `json:"daemonsStatus,omitempty"`
|
||||
// LastChecked is the last time time the status was checked
|
||||
// LastChecked is the last time the status was checked
|
||||
// +optional
|
||||
LastChecked string `json:"lastChecked,omitempty"`
|
||||
// LastChanged is the last time time the status last changed
|
||||
// LastChanged is the last time the status last changed
|
||||
// +optional
|
||||
LastChanged string `json:"lastChanged,omitempty"`
|
||||
// Details contains potential status errors
|
||||
@@ -1660,10 +1660,10 @@ type FilesystemSnapshotScheduleStatusSpec struct {
|
||||
// +nullable
|
||||
// +optional
|
||||
SnapshotSchedules []FilesystemSnapshotSchedulesSpec `json:"snapshotSchedules,omitempty"`
|
||||
// LastChecked is the last time time the status was checked
|
||||
// LastChecked is the last time the status was checked
|
||||
// +optional
|
||||
LastChecked string `json:"lastChecked,omitempty"`
|
||||
// LastChanged is the last time time the status last changed
|
||||
// LastChanged is the last time the status last changed
|
||||
// +optional
|
||||
LastChanged string `json:"lastChanged,omitempty"`
|
||||
// Details contains potential status errors
|
||||
|
||||
@@ -123,7 +123,7 @@ func OsdOkToStopOutput(queriedID int, returnOsdIds []int) string {
|
||||
}
|
||||
|
||||
// OSDDeviceClassOutput returns JSON output from 'ceph osd crush get-device-class' that can be used for unit tests.
|
||||
// osdId is a osd ID to get from crush map. If ID is empty raise a fake error.
|
||||
// osdId is an OSD ID to get from crush map. If ID is empty raise a fake error.
|
||||
func OSDDeviceClassOutput(osdId string) string {
|
||||
if osdId == "" {
|
||||
return "ERR: fake error from ceph cli"
|
||||
|
||||
@@ -92,7 +92,7 @@ func ListSnapshotsInRadosNamespace(context *clusterd.Context, clusterInfo *Clust
|
||||
return snapshots, nil
|
||||
}
|
||||
|
||||
// DeleteSnapshotInRadosNamespace deletes a image snapshot created in block pool in a given rados namespace
|
||||
// DeleteSnapshotInRadosNamespace deletes an image snapshot created in block pool in a given rados namespace
|
||||
func DeleteSnapshotInRadosNamespace(context *clusterd.Context, clusterInfo *ClusterInfo, poolName, imageName, snapshot, namespace string) error {
|
||||
args := []string{"snap", "rm", getImageSnapshotSpec(poolName, imageName, snapshot)}
|
||||
if namespace != "" {
|
||||
|
||||
@@ -78,7 +78,7 @@ func RotateKeyEncryptionKey(context *clusterd.Context, kms *kms.Config, secretNa
|
||||
}
|
||||
|
||||
logger.Info("fetching the key from the KMS to verify it.")
|
||||
// Fetch key to verify its the new key.
|
||||
// Fetch key to verify it's the new key.
|
||||
keyInKMS, err := kms.GetSecret(secretName)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to get secret %q", secretName)
|
||||
|
||||
@@ -505,7 +505,7 @@ func TestHasNodeDrained(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, expected)
|
||||
|
||||
// Expecting node drain because OSD pod is assigned to a non existent node
|
||||
// Expecting node drain because OSD pod is assigned to a non-existent node
|
||||
osdDeployment = fakeOSDDeployment(3, 0)
|
||||
r = getFakeReconciler(t, osdDeployment.DeepCopy(), &corev1.ConfigMap{})
|
||||
expected, err = hasOSDNodeDrained(ctx, r.client, "node-3")
|
||||
|
||||
@@ -160,7 +160,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Watch Secrets secrets annotated for the object store
|
||||
// Watch secrets annotated for the object store
|
||||
err = c.Watch(
|
||||
source.Kind(
|
||||
mgr.GetCache(),
|
||||
|
||||
@@ -352,7 +352,7 @@ func (r *ReconcileObjectRealm) setFailedStatus(observedGeneration int64, cephObj
|
||||
return reconcile.Result{}, *cephObjectRealm, errors.Wrapf(err, "%s", errMessage)
|
||||
}
|
||||
|
||||
// updateStatus updates an realm with a given status
|
||||
// updateStatus updates a realm with a given status
|
||||
func (r *ReconcileObjectRealm) updateStatus(observedGeneration int64, name types.NamespacedName, status string) {
|
||||
objectRealm := &cephv1.CephObjectRealm{}
|
||||
if err := r.client.Get(r.opManagerContext, name, objectRealm); err != nil {
|
||||
|
||||
@@ -108,8 +108,8 @@ var (
|
||||
},
|
||||
}
|
||||
// Filename to store RGW ops log per pod.
|
||||
// Relies on the on environment variables to get the pod name and namespace.
|
||||
// podNameEnvVars have to be passed to to log collector container.
|
||||
// Relies on the environment variables to get the pod name and namespace.
|
||||
// podNameEnvVars have to be passed to log collector container.
|
||||
opsLogFilename = "ops-log.$(POD_NS).$(POD_NAME).log"
|
||||
opsLogAbsFilename = path.Join(cephconfig.VarLogCephDir, opsLogFilename)
|
||||
)
|
||||
|
||||
@@ -434,7 +434,7 @@ func (r *ReconcileObjectZone) setFailedStatus(observedGeneration int64, cephObje
|
||||
return reconcile.Result{}, *cephObjectZone, errors.Wrapf(err, "%s", errMessage)
|
||||
}
|
||||
|
||||
// updateStatus updates an zone with a given status
|
||||
// updateStatus updates a zone with a given status
|
||||
func (r *ReconcileObjectZone) updateStatus(observedGeneration int64, name types.NamespacedName, status string) {
|
||||
objectZone := &cephv1.CephObjectZone{}
|
||||
if err := r.client.Get(r.opManagerContext, name, objectZone); err != nil {
|
||||
|
||||
@@ -310,7 +310,7 @@ func (r *ReconcileObjectZoneGroup) setFailedStatus(observedGeneration int64, nam
|
||||
return reconcile.Result{}, errors.Wrapf(err, "%s", errMessage)
|
||||
}
|
||||
|
||||
// updateStatus updates an zone group with a given status
|
||||
// updateStatus updates a zone group with a given status
|
||||
func (r *ReconcileObjectZoneGroup) updateStatus(observedGeneration int64, name types.NamespacedName, status string) {
|
||||
objectZoneGroup := &cephv1.CephObjectZoneGroup{}
|
||||
if err := r.client.Get(r.opManagerContext, name, objectZoneGroup); err != nil {
|
||||
|
||||
@@ -202,7 +202,7 @@ func validateDeviceClasses(context *clusterd.Context, clusterInfo *cephclient.Cl
|
||||
return nil
|
||||
}
|
||||
|
||||
// validateDeviceClassOSDs validates that the device class should have atleast one OSD
|
||||
// validateDeviceClassOSDs validates that the device class should have at least one OSD
|
||||
func validateDeviceClassOSDs(context *clusterd.Context, clusterInfo *cephclient.ClusterInfo, deviceClassName string) error {
|
||||
deviceClassOSDs, err := cephclient.GetDeviceClassOSDs(context, clusterInfo, deviceClassName)
|
||||
if err != nil {
|
||||
|
||||
@@ -198,8 +198,8 @@ func GetDevicePartitions(device string, executor exec.Executor) (partitions []Pa
|
||||
// GetDeviceProperties gets device properties
|
||||
func GetDeviceProperties(device string, executor exec.Executor) (map[string]string, error) {
|
||||
// As we are mounting the block mode PVs on /mnt we use the entire path,
|
||||
// e.g., if the device path is /mnt/example-pvc then its taken completely
|
||||
// else if its just vdb then the following is used
|
||||
// e.g., if the device path is /mnt/example-pvc then it's taken completely
|
||||
// else if it's just vdb then the following is used
|
||||
devicePath := strings.Split(device, "/")
|
||||
if len(devicePath) == 1 {
|
||||
device = fmt.Sprintf("/dev/%s", device)
|
||||
|
||||
@@ -39,7 +39,7 @@ func CreateObjectOperation(k8sh *utils.K8sHelper, manifests installer.CephManife
|
||||
return &ObjectOperation{k8sh, manifests}
|
||||
}
|
||||
|
||||
// ObjectCreate Function to create a object store in rook
|
||||
// ObjectCreate Function to create an object store in rook
|
||||
func (o *ObjectOperation) Create(namespace, storeName string, replicaCount int32, tlsEnable bool, swiftAndKeystone bool) error {
|
||||
logger.Info("creating the object store via CRD")
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func (o *ObjectUserOperation) UserSecretExists(namespace string, store string, u
|
||||
return false
|
||||
}
|
||||
|
||||
// ObjectUserCreate Function to create a object store user in rook
|
||||
// ObjectUserCreate Function to create an object store user in rook
|
||||
func (o *ObjectUserOperation) Create(userid, displayName, store, usercaps, maxsize string, maxbuckets, maxobjects int) error {
|
||||
logger.Infof("creating the object store user via CRD")
|
||||
if err := o.k8sh.ResourceOperation("apply", o.manifests.GetObjectStoreUser(userid, displayName, store, usercaps, maxsize, maxbuckets, maxobjects)); err != nil {
|
||||
|
||||
@@ -60,7 +60,7 @@ func readManifestFromURL(url string) string {
|
||||
var response *http.Response
|
||||
var err error
|
||||
for i := 1; i <= 3; i++ {
|
||||
//nolint:gosec // // This is only test code and is expected to read from a url
|
||||
//nolint:gosec // This is only test code and is expected to read from a url
|
||||
response, err = http.Get(url)
|
||||
if err != nil {
|
||||
if i == 3 {
|
||||
|
||||
@@ -45,7 +45,7 @@ type CommandOut struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
// ExecuteCommand executes a os command with stdin and returns output
|
||||
// ExecuteCommand executes an OS command with stdin and returns output
|
||||
func ExecuteCommand(cmdStruct CommandArgs) CommandOut {
|
||||
logger.Infof("Running %s %v", cmdStruct.Command, cmdStruct.CmdArgs)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ type HelmHelper struct {
|
||||
HelmPath string
|
||||
}
|
||||
|
||||
// NewHelmHelper creates a instance of HelmHelper
|
||||
// NewHelmHelper creates an instance of HelmHelper
|
||||
func NewHelmHelper(helmPath string) *HelmHelper {
|
||||
executor := &exec.CommandExecutor{}
|
||||
return &HelmHelper{executor: executor, HelmPath: helmPath}
|
||||
|
||||
@@ -78,7 +78,7 @@ func getCmd() string {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// CreateK8sHelper creates a instance of k8sHelper
|
||||
// CreateK8sHelper creates an instance of k8sHelper
|
||||
func CreateK8sHelper(t func() *testing.T) (*K8sHelper, error) {
|
||||
executor := &exec.CommandExecutor{}
|
||||
config, err := config.GetConfig()
|
||||
@@ -987,7 +987,7 @@ func (k8sh *K8sHelper) IsDefaultStorageClassPresent() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// CheckPvcCountAndStatus returns True if expected number pvs for a app are found
|
||||
// CheckPvcCountAndStatus returns True if expected number of pvs for an app are found
|
||||
func (k8sh *K8sHelper) CheckPvcCountAndStatus(podName string, namespace string, expectedPvcCount int, expectedStatus string) bool {
|
||||
logger.Infof("wait until %d pvc for app=%s are present", expectedPvcCount, podName)
|
||||
listOpts := metav1.ListOptions{LabelSelector: "app=" + podName}
|
||||
|
||||
@@ -480,7 +480,7 @@ func testObjectStoreOperations(s *suite.Suite, helper *clients.TestClient, k8sh
|
||||
// first ~3KiB Object should succeed
|
||||
_, err := s3client.PutObjectInBucket(bucketName, strings.Repeat("1", 3072), ObjectKey1, contentType)
|
||||
assert.Nil(t, err)
|
||||
// second ~2KiB Object should fail as bucket quota is is 4KiB
|
||||
// second ~2KiB Object should fail as bucket quota is 4KiB
|
||||
_, err = s3client.PutObjectInBucket(bucketName, strings.Repeat("2", 2048), ObjectKey2, contentType)
|
||||
assert.Error(t, err)
|
||||
// cleanup bucket
|
||||
|
||||
@@ -73,7 +73,7 @@ function growVertically() {
|
||||
if [ "1" = $? ]
|
||||
then
|
||||
newSize=${maxSize}
|
||||
echo "Disk has reached it's MAX capacity ${maxSize}, add a new disk to it"
|
||||
echo "Disk has reached its MAX capacity ${maxSize}, add a new disk to it"
|
||||
result=$(kubectl patch pvc "${pvc}" -n "${ns}" --type json --patch "[{ op: replace, path: /spec/resources/requests/storage, value: ${newSize} }]")
|
||||
else
|
||||
result=$(kubectl patch pvc "${pvc}" -n "${ns}" --type json --patch "[{ op: replace, path: /spec/resources/requests/storage, value: ${newSize}${unitSize} }]")
|
||||
|
||||
Reference in new issue
Block a user