Several problems due to "Enable YAOOK_BACKUP_SHIFTER_WARM_KEEP_MAX for MySQL"
MR !3327 (merged) seems to have introduced several bugs.
We upgraded to 1.2.0 today and experienced 3 bugs:
- 'dict object' has no attribute 'backupShifterOptions'
kubectl -n yaook get mysqlservice
NAME PHASE REASON MESSAGE
barbican-barbican BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
cinder-cinder BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
designate-designate BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
designate-powerdns-powerdns Updated Success
glance-glance BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
keystone-keystone BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
neutron-ovn-neutron Updated Success
nova-nova-api BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
nova-nova-cell0 BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
nova-nova-cell1 BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
nova-placement BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
octavia-octavia BackingOff ReconcileFailed 'dict object' has no attribute 'backupShifterOptions'
It seems that it is assumed that backupShifterOptions must be always set, even if the default should be used.
- Internal Server Error
.env[name=\"YAOOK_BACKUP_SHIFTER_WARM_KEEP_MAX\"].value: expected string, got \u0026value.valueUnstructured{Value:3}"
setting the variable to a string is not possible because the CRD expects an int. But env vars need to be a string.
- Wrong if condition?
It makes no sense for me that YAOOK_BACKUP_SHIFTER_WARM_KEEP_MAX is only set if targets.s3.filePrefix is set.
{% if crd_spec.backup.targets.s3.filePrefix %}
- name: YAOOK_BACKUP_SHIFTER_S3_FILE_PREFIX
value: {{ crd_spec.backup.targets.s3.filePrefix }}
- name: YAOOK_BACKUP_SHIFTER_WARM_KEEP_MAX
value: {{ crd_spec.backup.backupShifterOptions.warmKeepMax }}
{% endif %}
For me it looks like the if-condition should end two lines earlier..
However, this saved us, because we could just remove the filePrefix from the deployments to fix the issue for now ;)