Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][Do not merge] Automating RHSTOR-4869-Add CSI-Addons NetworkFence support to CephFS #10528

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ocs_ci/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5209,3 +5209,21 @@ def configure_cephcluster_params_in_storagecluster_cr(params, default_values=Fal
f' "value": {parameter_value}}}]'
)
storagecluster_obj.patch(params=param, format_type="json")


def set_watch_for_node_failure_rook_ceph_operator(value):
"""
Set ROOK_WATCH_FOR_NODE_FAILURE on configmap of rook-ceph-operator

Args:
value (binary): "True" or "False", "True" is default value

"""
configmap_obj = OCP(
kind=constants.CONFIGMAP,
namespace=config.ENV_DATA["cluster_namespace"],
resource_name=constants.ROOK_OPERATOR_CONFIGMAP,
)
logger.info(f"Setting ROOK_WATCH_FOR_NODE_FAILURE to: {value}")
params = f'{{"data": {{"ROOK_WATCH_FOR_NODE_FAILURE": "{value}"}}}}'
configmap_obj.patch(params=params, format_type="merge")
10 changes: 10 additions & 0 deletions ocs_ci/ocs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,12 @@

TILLER_YAML = os.path.join(TEMPLATE_BDI_DIR, "temp_tiller.yaml")

LOGWRITER_CEPH_FS_POD_YAML = os.path.join(
TEMPLATE_APP_POD_DIR, "logwriter_ceph_fs.yaml"
)

SIMPLE_APP_RBD_POD_YAML = os.path.join(TEMPLATE_APP_POD_DIR, "simple-app.yaml")

IBM_BDI_CONFIGURE_WORKLOAD_YAML = os.path.join(
TEMPLATE_BDI_DIR, "configure-workload.yaml"
)
Expand Down Expand Up @@ -948,6 +954,10 @@
TEMPLATE_CNV_VM_STANDALONE_PVC_DIR, "vm.yaml"
)

# NetworkFence Drivers
NFCEPHFSDRIVER = "openshift-storage.cephfs.csi.ceph.com"
NFRBDDRIVER = "openshift-storage.rbd.csi.ceph.com"

METALLB = "metallb-operator"
METALLB_CONTROLLER_MANAGER_PREFIX = "metallb-operator-controller-manager"
METALLB_WEBHOOK_PREFIX = "metallb-operator-webhook-server"
Expand Down
32 changes: 32 additions & 0 deletions ocs_ci/templates/app-pods/logwriter_ceph_fs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: logwriter-cephfs
namespace: default
labels:
app: logwriter-cephfs
spec:
replicas: 1
selector:
matchLabels:
app: logwriter-cephfs
template:
metadata:
labels:
app: logwriter-cephfs
spec:
nodeSelector:
node-role.kubernetes.io/worker: ""
containers:
- name: logwriter
image: quay.io/ocsci/logwriter:latest
command: ['/opt/logwriter.py', '--fsync', '-d', '-p', '10', '.']
workingDir: /mnt/target
volumeMounts:
- mountPath: /mnt/target
name: logwriter-cephfs-volume
volumes:
- name: logwriter-cephfs-volume
persistentVolumeClaim:
claimName: logwriter-cephfs-once
Loading
Loading