[Lucid] Backport generic detection of Xen kernels for EC2

Bug #1176159 reported by Stefan Bader
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

In order to try transitioning from the specially patched EC2 kernels for Lucid, we are aiming to have the virtual(server/generic-pae) kernels have the required Xen drivers built-in. At some point the ec2 meta-package could pull people over to the other kernels.
For that update-grub on EC2 PVM would need to detect the normal kernels to be usable. This is already done for later releases where this does not depend on the filename of kernels but on the config options in the config file shipped with them.
To prepare for this, can we have that change backported to Lucid? Probably preferring ec2 kernels before others of the same version.

Tags: patch
Revision history for this message
Scott Moser (smoser) wrote :

Stefan,
  Sorry for being so delinquent in seeing this.
  Ubuntu's update-grub-legacy-ec2, which is provided by grub-legacy-ec2, a binary package created from cloud-init does not consider config of the kernel at all.

  The logic only considers kernel name and version.

  we can surely patch this to cover the updated kernel, and yeah, we need to do that.

Revision history for this message
Stefan Bader (smb) wrote :

Ah, I probably confused that with the mechanism used to find dom0 usable kernel. In the end this does not need to be overly clever at all. I suppose it should be enough just to sort kernels by version and name. Preferring the ec2 kernel name if there are multiple kernels with the same version. That way, as long as there is one, it will end up in position 0.

Robie Basak (racb)
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Stefan Bader (smb) wrote :

Scott, what would you think about this. This isn't really a backport but would seem to do what I was thinking about inside a Xen domU. That should get verified against a cloud-init deployment somewhere else (which uses grub-legacy-ec2, if this exists). The one part that could affect other places is basically the change of not having a separation between xen-kernel or not (because actually xen supported does not mean it is not usable elsewhere).

Revision history for this message
Scott Moser (smoser) wrote :

Stefan,
  Is there a reason to do this differently than in raring?
  Basically, in raring we just added something like this:
+ *-generic)
+ # Starting with 12.10, -virtual was merged into -generic
+ dpkg --compare-versions ${ver_flavor%-generic} ge 3.4.0-3 && return 0;;

to the is_xen code.

That code is dumber (and less flexible) than it could be by design. Originally, the list of "xen kernels" was created based on presense of CONFIG_XEN_PRIVILEGED_GUEST=y in the boot config.

However, there were kernels (the -server in lucid, for example) that had that setting, but did not actually support booting on EC2.

Revision history for this message
Stefan Bader (smb) wrote :

Yeah, the problem, I realised, is that in Lucid we got the linux-ec2 packages installed right now. The plan is to change the dependency of the meta-package to change from linux-image-*-ec2 to linux-image-*-virtual (which is a generic-pae or server in fact). The problem is that ec2 kernels have a high abi number (started with 300). So looking at the versions only, the previous ec2 kernels would always be at the head (until completely removed).

tags: added: patch
Revision history for this message
James Falcon (falcojr) wrote :

Lucid is EOL

Changed in cloud-init (Ubuntu):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.