--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CABBoX7M%2B4YO6v_aBEsyRNE3bpczsK6jq_j04fRYAEXZCxkyAPQ%40mail.gmail.com.
On Wed, 2 Oct 2024 at 10:04, Alice Frosi <afr...@redhat.com> wrote:Hi everyone,I'd like some feedback on an API field in kubevirt.The questionable field is the ManualRecoveryRequired field [1] introduced by the PR [2]. This field is part of the VolumeMigrationState which was added in the VM status in order to persist the migrated volumes information in case the VMI disappeared for any reasons. The ManualRequiredField indicates if the migration failed and the VM is, therefore, in an inconsistent state because it has the new volumes but the copy hasn't finished successfully. For example, if the users try to boot the VM, then could face an unbootable disk.The question raised by Federico and Antonio is why we have a field and not a condition on the VM. Initially, when I designed this was to have everything in the VolumeMigrationState. However, if this sounds like a bad practice, then we can always change it and convert this to a new condition on the VM. Here, the question: do we want to update this? If so, we would like to modify it before the feature freeze, hence, please raise your concerns on time.[1] https://github.com/kubevirt/kubevirt/blob/main/staging/src/kubevirt.io/api/core/v1/types.go#L1705Many thanks,AliceHey Alice,Why not both? My understanding was that conditions provide a higher level state summary derived from the lower level details already captured in the status of an object [1].
That said I'm not entirely sure how to word such a condition and I'm not sold by the use of a bool in the status of the VM to convey that a volume migration has failed in a way that now requires manual intervention.
Hey Alice,I think since https://github.com/kubevirt/kubevirt/pull/12864 is already using this field to prevent a from starting, I'd agree that it would make more sense to have it as a condition.Mainly since this is not just informative anymore.
On the other hand, conditions are also part of the `status`. If no functionality depends on or is waiting for a specific condition, it doesn't matter to me if this field is part of the conditions or in the VolumeMigrationState struct.
Hi Vladik,On Fri, Oct 4, 2024 at 3:45 PM Vladik Romanovsky <vrom...@redhat.com> wrote:Hey Alice,I think since https://github.com/kubevirt/kubevirt/pull/12864 is already using this field to prevent a from starting, I'd agree that it would make more sense to have it as a condition.Mainly since this is not just informative anymore.No, we aren't using it anymore for preventing to start, I replaced it by checking the existence of VirtualMachineInstanceVolumesChange. Right now, this has become an informative field which can be easily modified/replaced.
Hi Alice,On Mon, Oct 7, 2024 at 4:19 AM Alice Frosi <afr...@redhat.com> wrote:Hi Vladik,On Fri, Oct 4, 2024 at 3:45 PM Vladik Romanovsky <vrom...@redhat.com> wrote:Hey Alice,I think since https://github.com/kubevirt/kubevirt/pull/12864 is already using this field to prevent a from starting, I'd agree that it would make more sense to have it as a condition.Mainly since this is not just informative anymore.No, we aren't using it anymore for preventing to start, I replaced it by checking the existence of VirtualMachineInstanceVolumesChange. Right now, this has become an informative field which can be easily modified/replaced.If this field is not being used to control the lifecycle of the VM and no functionality depends on it - I see no reason to turn this into a condition and make any further modifications.