Bug 2196064 - Reclaim space cron job object is editable after it is created while it should not be
Summary: Reclaim space cron job object is editable after it is created while it should...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: csi-addons
Version: 4.13
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rakshith
QA Contact: krishnaram Karthick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-07 23:11 UTC by Yuli Persky
Modified: 2023-08-09 16:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-08 06:09:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Yuli Persky 2023-05-07 23:11:34 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Reclaim space cron job object is editable after it is created while it should not be

Below all the editable properties listed: 

Property: concurrencyPolicy
original value: Forbid
changed value: Replace


Property: failedJobsHistoryLimit.
original value:  1
changed value: 50


Property: retryDeadlineSeconds.
original value: 600
changed value: 20


Property: schedule.
original value: @weekly
changed value: @daily


Version of all relevant components (if applicable):

OCS versions
	==============

		NAME                                         DISPLAY                       VERSION             REPLACES   PHASE
		mcg-operator.v4.13.0-157.stable              NooBaa Operator               4.13.0-157.stable              Succeeded
		ocs-operator.v4.13.0-157.stable              OpenShift Container Storage   4.13.0-157.stable              Succeeded
		odf-csi-addons-operator.v4.13.0-157.stable   CSI Addons                    4.13.0-157.stable              Succeeded
		odf-operator.v4.13.0-157.stable              OpenShift Data Foundation     4.13.0-157.stable              Succeeded
		
		ODF (OCS) build :		      full_version: 4.13.0-157
		

	Rook versions
	===============

		rook: v4.13.0-0.dcb0f9119dcfecb7256321eea60c54ec5f010959
		go: go1.19.6
		
	Ceph versions
	===============

		ceph version 17.2.5-1342.el9cp (ed07851f2c5b8d3dccadf079402f86a67cb7d3e5) quincy (stable)


OCP versions
	==============

		clientVersion:
		  buildDate: "2023-04-19T04:06:40Z"
		  compiler: gc
		  gitCommit: 92b1a3d0e5d092430b523f6541aa0c504b2222b3
		  gitTreeState: clean
		  gitVersion: 4.13.0-202304190216.p0.g92b1a3d.assembly.stream-92b1a3d
		  goVersion: go1.19.6
		  major: ""
		  minor: ""
		  platform: linux/amd64
		kustomizeVersion: v4.5.7
		openshiftVersion: 4.13.0-0.nightly-2023-04-11-144406
		releaseClientVersion: 4.13.0-0.nightly-2023-05-04-090524
		serverVersion:
		  buildDate: "2023-04-06T14:21:00Z"
		  compiler: gc
		  gitCommit: 0cffe665612c2b8ac54f19c932b33e84261992d9
		  gitTreeState: clean
		  gitVersion: v1.26.2+22308ca
		  goVersion: go1.19.6
		  major: "1"
		  minor: "26"
		  platform: linux/amd64
		
		
		Cluster version:

		NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
		version   4.13.0-0.nightly-2023-04-11-144406   True        False         25d     Cluster version is 4.13.0-0.nightly-2023-04-11-144406



Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No


Is there any workaround available to the best of your knowledge?

No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
3

Can this issue reproducible?

Yes 

Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Created Reclaim space cron job object with this yaml : 

apiVersion: csiaddons.openshift.io/v1alpha1
kind: ReclaimSpaceCronJob
metadata:
  name: reclaimspacecronjob-sample
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      backOffLimit: 6
      retryDeadlineSeconds: 600
      target:
        persistentVolumeClaim: data-pvc
  schedule: '@weekly'
  successfulJobsHistoryLimit: 3


The object is created with the following properties: 

(yulienv38) [ypersky@ypersky ocs-ci]$ oc get reclaimspacecronjob.csiaddons.openshift.io/reclaimspacecronjob-sample -o yaml
apiVersion: csiaddons.openshift.io/v1alpha1
kind: ReclaimSpaceCronJob
metadata:
  creationTimestamp: "2023-05-07T23:08:23Z"
  generation: 1
  name: reclaimspacecronjob-sample
  namespace: default
  resourceVersion: "27341853"
  uid: de01ad22-ad35-4ad4-b239-5146667abb7b
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      backOffLimit: 6
      retryDeadlineSeconds: 600
      target:
        persistentVolumeClaim: data-pvc
  schedule: '@weekly'
  successfulJobsHistoryLimit: 3
status: {}
(yulienv38) [ypersky@ypersky ocs-ci]


2.  While trying to edit the above object change each time one out of the following peroperties: 

concurrencyPolicy
failedJobsHistoryLimit
retryDeadlineSeconds
schedule 

in the following way: 


Property: concurrencyPolicy
original value: Forbid
changed value: Replace


Property: failedJobsHistoryLimit.
original value:  1
changed value: 50


Property: retryDeadlineSeconds.
original value: 600
changed value: 20


Property: schedule.
original value: @weekly
changed value: @daily


Actual results:

The changed ( new) value is applied anc the resource is changed. 


Expected results:


No changed should be applicable to Reclain Space Cron Job object after it is created. 


Additional info:


Note You need to log in before you can comment on or make changes to this bug.