GNOME Bugzilla – Bug 665254
New way to handle live and unknown media
Last modified: 2016-03-31 13:58:44 UTC
For live (pure or otherwise) and unknown media: * Create a transient domain (but do allocate storage). * On shutdown: if anything was installed on storage, create a parmanent domain for the media in question and set it to boot from hard-disk. * Skip the 'review' page on wizard, not just 'setup'. For known media without live-mode support: * Create a parmanent domain with storage. * On shutdown: if anything was installed on storage, modify the config to make it boot from hard-disk.
Created attachment 202489 [details] [review] Allocate storage to pure live media We use qcow2 so it doesn't really matter if storage goes unused but we should do this just in case our knowledge/assumption about inavailability of installer is wrong.
Created attachment 202490 [details] [review] Only apply post-install config when installation is done For domains we create ourselves, we now check for signs of OS installation after (every) shutdown. If we find any, only then we apply the post-install configuration (boot installed OS). For pure live media, this additionally implies that its domain is destroyed automatically on first shutdown, unless it installed an OS.
Created attachment 202491 [details] [review] Reboot should destroy (shutdown) VM on first boot We manually start the domain after the shutdown but we need to have this shutdown in between for our post-install setup to be able to kick-in.
Created attachment 202492 [details] [review] wizard: Skip 'review' for pure live media Previously we only skipped 'setup' page for pure live media. The idea is to launch an initially transient box as quickly as possible w/o asking any questions when user inserts a transient box.
Created attachment 202493 [details] [review] Handle non-pure live & unknown media like pure live Handle live+installer and unknown media just like pure live media.
Review of attachment 202489 [details] [review]: ack
Review of attachment 202489 [details] [review]: how/when is the image deleted if it's pure live-media? is that covered by following patches?
Review of attachment 202490 [details] [review]: ::: src/os-database.vala @@ +81,3 @@ } + public Resources? get_minimum_resources_for_os (Os os) { it could take string[] prefs as argument, just like get_prefered_resources() @@ +83,3 @@ + public Resources? get_minimum_resources_for_os (Os os) { + // Prefer x86_64 resources + string[] prefs = {"x86_64", "i686", "i386", ARCHITECTURE_ALL}; you could make that static private data?
Review of attachment 202492 [details] [review]: ack (we need to be careful of steps/pages with side effects that we skip. I thought initially that the skip_page() would be done after step methods are called, but here you really jump over it, that's fine here)
(In reply to comment #7) > Review of attachment 202489 [details] [review]: > > how/when is the image deleted if it's pure live-media? is that covered by > following patches? No, just like other domains we are *not* deleting the associated storage yet. Perhaps in case of live, we should do that since domains are automatically deleted w/o user's consent?
(In reply to comment #10) > (In reply to comment #7) > > Review of attachment 202489 [details] [review] [details]: > > > > how/when is the image deleted if it's pure live-media? is that covered by > > following patches? > > No, just like other domains we are *not* deleting the associated storage yet. > Perhaps in case of live, we should do that since domains are automatically > deleted w/o user's consent? I think so too.
(In reply to comment #8) > Review of attachment 202490 [details] [review]: > > ::: src/os-database.vala > @@ +81,3 @@ > } > > + public Resources? get_minimum_resources_for_os (Os os) { > > it could take string[] prefs as argument, just like get_prefered_resources() prefs are private to OsDatabase class and I don't see any need to expose other classes to that detail. This function is more like get_resources_for_os() rather. > @@ +83,3 @@ > + public Resources? get_minimum_resources_for_os (Os os) { > + // Prefer x86_64 resources > + string[] prefs = {"x86_64", "i686", "i386", ARCHITECTURE_ALL}; > > you could make that static private data? Yeah!
Created attachment 202617 [details] [review] Only apply post-install config when installation is done For domains we create ourselves, we now check for signs of OS installation after (every) shutdown. If we find any, only then we apply the post-install configuration (boot installed OS). For pure live media, this additionally implies that its domain is destroyed automatically on first shutdown, unless it installed an OS.
Created attachment 202623 [details] [review] Only apply post-install config when installation is done For domains we create ourselves, we now check for signs of OS installation after (every) shutdown. If we find any, only then we apply the post-install configuration (boot installed OS). For pure live media, this additionally implies that its domain is destroyed automatically on first shutdown, unless it installed an OS.
Created attachment 202668 [details] [review] Allocate storage to pure live media We use qcow2 so it doesn't really matter if storage goes unused but we should do this just in case our knowledge/assumption about inavailability of installer is wrong.
Created attachment 202669 [details] [review] Only apply post-install config when installation is done For domains we create ourselves, we now check for signs of OS installation after (every) shutdown. If we find any, only then we apply the post-install configuration (boot installed OS). For pure live media, this additionally implies that its domain is destroyed automatically on first shutdown, unless it installed an OS.
Created attachment 202670 [details] [review] Reboot should destroy (shutdown) VM on first boot We manually start the domain after the shutdown but we need to have this shutdown in between for our post-install setup to be able to kick-in.
Created attachment 202671 [details] [review] wizard: Skip 'review' for pure live media Previously we only skipped 'setup' page for pure live media. The idea is to launch an initially transient box as quickly as possible w/o asking any questions when user inserts a transient box.
Created attachment 202672 [details] [review] Handle non-pure live & unknown media like pure live Handle live+installer and unknown media just like pure live media.
Created attachment 202673 [details] [review] Delete associated volume after transient domain is destroyed
(In reply to comment #20) > Created an attachment (id=202673) [details] [review] > Delete associated volume after transient domain is destroyed This one requires a libvirt-glib patch from me that is pending-review.
Created attachment 202977 [details] [review] Only apply post-install config when installation is done For domains we create ourselves, we now check for signs of OS installation after (every) shutdown. If we find any, only then we apply the post-install configuration (boot installed OS). For pure live media, this additionally implies that its domain is destroyed automatically on first shutdown, unless it installed an OS.
Created attachment 202978 [details] [review] Handle non-pure live & unknown media like pure live Handle live+installer and unknown media just like pure live media.
Review of attachment 202668 [details] [review]: ack
Review of attachment 202670 [details] [review]: ack
Review of attachment 202671 [details] [review]: are you sure you can't remove the idle at the same time?
Review of attachment 202673 [details] [review]: ack
Review of attachment 202977 [details] [review]: ack
Review of attachment 202978 [details] [review]: ack
Attachment 202668 [details] pushed as 94f45c8 - Allocate storage to pure live media Attachment 202670 [details] pushed as b05bc13 - Reboot should destroy (shutdown) VM on first boot Attachment 202671 [details] pushed as 8cd0a52 - wizard: Skip 'review' for pure live media Attachment 202673 [details] pushed as 77ee7bf - Delete associated volume after transient domain is destroyed Attachment 202977 [details] pushed as d6abb9b - Only apply post-install config when installation is done Attachment 202978 [details] pushed as 6180358 - Handle non-pure live & unknown media like pure live