-
Bug
-
Resolution: Done-Errata
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
CLOSED
-
CNV I/U Operators Sprint 220
-
No
Description of problem: Using "dataimportcrontemplate.kubevirt.io/enable", on entering anything other than "true" for a custom template, causes it to be removed from hc.status.dataImportCronTemplates and ssp
Version-Release number of selected component (if applicable):
4.11.0
How reproducible:
100%
Steps to Reproduce:
1. for a common template add an entry to hco.spec.dataImportCronTemplates with associated annotation value as "dataimportcrontemplate.kubevirt.io/enable": "none"
2. No error message raised and the dataimportcrontemplate gets removed from hco.status.dataImportCronTemplates and ssp.spec.dataImportCronTemplates
3.
Actual results:
=======================
(cnv-tests) [cnv-qe-jenkins@c01-db-411-jvnqd-executor cnv-tests]$ kubectl get hco kubevirt-hyperconverged -n openshift-cnv -o json | jq "."
{
"apiVersion": "hco.kubevirt.io/v1beta1",
"kind": "HyperConverged",
"metadata": {
"creationTimestamp": "2022-05-19T22:20:18Z",
"finalizers": [
"kubevirt.io/hyperconverged"
],
"generation": 35,
"labels":
,
"name": "kubevirt-hyperconverged",
"namespace": "openshift-cnv",
"resourceVersion": "2510485",
"uid": "d4b2e923-58ff-47e3-ae3b-4235e7a9ef77"
},
"spec": {
"certConfig": {
"ca":
,
"server":
},
"dataImportCronTemplates": [
{
"metadata": {
"annotations":
,
"name": "centos-stream8-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "centos-stream8",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "my-image-cron1"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "my",
"schedule": "21 4/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
}
],
"featureGates":
,
"infra": {},
"liveMigrationConfig":
,
"uninstallStrategy": "BlockUninstallIfWorkloadsExist",
"workloadUpdateStrategy":
,
"workloads": {}
},
"status": {
"conditions": [
,
,
,
,
{ "lastTransitionTime": "2022-05-20T20:57:19Z", "message": "Reconcile completed successfully", "observedGeneration": 35, "reason": "ReconcileCompleted", "status": "True", "type": "Upgradeable" } ],
"dataImportCronTemplates": [
{
"metadata": {
"annotations":
,
"name": "centos-7-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "centos7",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status":
},
{
"metadata": {
"annotations":
,
"name": "centos-stream9-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "centos-stream9",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status":
},
{
"metadata": {
"annotations":
,
"name": "fedora-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "fedora",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status":
},
{
"metadata": {
"annotations":
,
"name": "my-image-cron1"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "my",
"schedule": "21 4/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status": {}
},
{
"metadata": {
"annotations":
,
"name": "rhel8-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "rhel8",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status":
},
{
"metadata": {
"annotations":
,
"name": "rhel9-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "rhel9",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
},
"status":
}
],
"dataImportSchedule": "30 2/12 * * *",
"observedGeneration": 35,
=======================
(cnv-tests) [cnv-qe-jenkins@c01-db-411-jvnqd-executor cnv-tests]$ kubectl get ssp ssp-kubevirt-hyperconverged -n openshift-cnv -o json | jq "."
{
"apiVersion": "ssp.kubevirt.io/v1beta1",
"kind": "SSP",
"metadata": {
"creationTimestamp": "2022-05-19T22:20:19Z",
"finalizers": [
"ssp.kubevirt.io/finalizer"
],
"generation": 31,
"labels":
,
"name": "ssp-kubevirt-hyperconverged",
"namespace": "openshift-cnv",
"resourceVersion": "2553200",
"uid": "3cad009f-f54e-422e-be77-9da8c4ac1ced"
},
"spec": {
"commonTemplates": {
"dataImportCronTemplates": [
{
"metadata": {
"annotations":
,
"name": "centos-7-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "centos7",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "centos-stream9-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "centos-stream9",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "fedora-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "fedora",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "my-image-cron1"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "my",
"schedule": "21 4/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "rhel8-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "rhel8",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
},
{
"metadata": {
"annotations":
,
"name": "rhel9-image-cron"
},
"spec": {
"garbageCollect": "Outdated",
"managedDataSource": "rhel9",
"schedule": "30 2/12 * * *",
"template": {
"metadata": {},
"spec": {
"source": {
"registry":
},
"storage": {
"resources": {
"requests":
}
}
},
"status": {}
}
}
}
],
"namespace": "openshift"
},
"nodeLabeller": {},
"templateValidator":
},
"status": {
"conditions": [
,
,
{ "lastHeartbeatTime": "2022-05-20T21:20:25Z", "lastTransitionTime": "2022-05-20T21:20:25Z", "message": "No SSP resources are degraded", "reason": "Degraded", "status": "False", "type": "Degraded" } ],
"observedGeneration": 31,
"observedVersion": "4.11.0",
"operatorVersion": "4.11.0",
"phase": "Deployed",
"targetVersion": "4.11.0"
}
}
Expected results:
Validation exists and it prevents from entering invalid values
Additional info: