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

vz: remove "basedisk"; rename "diffdisk" #1706

Open
AkihiroSuda opened this issue Aug 1, 2023 · 9 comments
Open

vz: remove "basedisk"; rename "diffdisk" #1706

AkihiroSuda opened this issue Aug 1, 2023 · 9 comments
Labels
component/vz enhancement New feature or request

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Aug 1, 2023

For vz, "basedisk" is not depended by "diffdisk" after qcow2-to-raw conversion, so "basedisk" should be removed and "diffdisk" should be renamed to something else. (Maybe just "disk")

@AkihiroSuda AkihiroSuda added enhancement New feature or request component/vz labels Aug 1, 2023
@AkihiroSuda AkihiroSuda added this to the v1.0 (tentative) milestone Oct 1, 2023
@balajiv113
Copy link
Member

basedisk file still be needed for alpine case right ?

@balajiv113
Copy link
Member

We can remove basedisk if we go ahead with the conversion of basedisk to rawdisk. In other case we will retain basedisk

@jandubois
Copy link
Member

basedisk file still be needed for alpine case right ?

Yes, but the names have always been misleading.

For Alpine basedisk is really iso and diffdisk is disk.

If you are refactoring the code and change names, then fixing it for Alpine might be good too.

The thing I worry about though are updates: we will have to migrate old Lima instances to the new naming scheme when you update Lima. And then you cannot downgrade again without renaming the files back manually (remember when colima was broken with the latest lima and you had to downgrade to get back access to your data?).

And at what point could we drop the migration code to update old instances from the Lima codebase?

So I'm not sure if the benefit of renaming is worth the effort and potential issues.

@AkihiroSuda
Copy link
Member Author

Existing instances will have to use old names, only new instances will use the new layout

@afbjorklund
Copy link
Member

afbjorklund commented Oct 5, 2023

Removing/renaming "basedisk" will break the workaround that I did for nerdctl-full

commit 4efb676

It will need some other workaround or placeholder file, to know if instance is created.

        // Check if the instance has been created (the base disk already exists)
        created := false
        baseDisk := filepath.Join(inst.Dir, filenames.BaseDisk)
        if _, err := os.Stat(baseDisk); err == nil {
                created = true
        }

See also: Hyrum's Law

@afbjorklund
Copy link
Member

afbjorklund commented Oct 5, 2023

Another weird corner case was VirtualBox, that relies on file extensions to work

I used some symlinks as a workaround, in order to keep backwards compatibility...

basedisk -> basedisk.img

basedisk -> basedisk.iso

@AkihiroSuda
Copy link
Member Author

Closing as unplanned, but we may revisit this later (in v2.0)

@AkihiroSuda AkihiroSuda closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
@AkihiroSuda
Copy link
Member Author

Reopening for:

@AkihiroSuda
Copy link
Member Author

Removing/renaming "basedisk" will break the workaround that I did for nerdctl-full

Should we populate "basedisk" with an empty file?
Do we need to populate diffdisk too? (Probably ln -s disk diffdisk)

@AkihiroSuda AkihiroSuda added this to the v1.x milestone Dec 18, 2024
@AkihiroSuda AkihiroSuda modified the milestones: v1.x, v1.1.0 Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/vz enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants