Updated Branches:
  refs/heads/trunk 41143a6f3 -> 9174d7169

Update default kernel versions which are used when creating a Linode
server.

Reported by Jon Chen, part of LIBCLOUD-424.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9174d716
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9174d716
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9174d716

Branch: refs/heads/trunk
Commit: 9174d71693ca6b70a194fae1435960dc022c3482
Parents: 41143a6
Author: Tomaz Muraus <[email protected]>
Authored: Sat Oct 26 23:44:14 2013 +0200
Committer: Tomaz Muraus <[email protected]>
Committed: Sat Oct 26 23:51:45 2013 +0200

----------------------------------------------------------------------
 CHANGES                                         |  16 ++
 docs/upgrade_notes.rst                          |  38 +++++
 libcloud/compute/drivers/linode.py              |   6 +-
 .../compute/fixtures/linode/_avail_kernels.json | 147 ++++++++++++++++++-
 4 files changed, 204 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9174d716/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d864711..2edb8f2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -22,6 +22,22 @@ Changes with Apache Libcloud in development
     provider. (LIBCLOUD-358)
     [Bernard Kerckenaere]
 
+  - Update default kernel versions which are used when creating a Linode
+    server.
+
+    Old default kernel versions:
+
+    - x86 - 2.6.18.8-x86_64-linode1
+    - x86_64 - 2.6.39.1-linode34
+
+    New default kernel versions:
+
+    - x86 - 3.9.3-x86-linode52
+    - x86_64 - 3.9.3-x86_64-linode33
+
+    (LIBCLOUD-424)
+    [Tomaz Muraus]
+
 Changes with Apache Libcloud 0.14.0-beta2
 
  *) Compute

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9174d716/docs/upgrade_notes.rst
----------------------------------------------------------------------
diff --git a/docs/upgrade_notes.rst b/docs/upgrade_notes.rst
index 7f47c60..6b099f7 100644
--- a/docs/upgrade_notes.rst
+++ b/docs/upgrade_notes.rst
@@ -15,6 +15,44 @@ single class plus ``region`` argument model.
 More information on how this affects existing drivers and your code can be
 found bellow.
 
+New default kernel versions used when creating Linode servers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Kernel versions which are used by default when creating Linode servers have 
been
+updated.
+
+Old default kernel versions:
+
+* x86 (no paravirt-ops) - ``2.6.18.8-x86_64-linode1`` (#60)
+* x86 (paravirt-ops) - ``2.6.18.8-x86_64-linode1`` (#110)
+* x86_64 (no paravirt-ops) - ``2.6.39.1-linode34`` (#107)
+* x86 (paravirt-ops)64 - ``2.6.18.8-x86_64-linode1`` (#111)
+
+New default kernel versions:
+
+* x86 - ``3.9.3-x86-linode52`` (#137)
+* x86_64 - ``3.9.3-x86_64-linode33`` (#138)
+
+Those new kernel versions now come with paravirt-ops by default.
+
+If you want to preserve the old behavior, you can pass ``ex_kernel`` argument 
to
+the ``create_node`` method.
+
+Keep in mind that using old kernels is strongly discouraged since they contain
+known security holes.
+
+For example:
+
+.. sourcecode:: python
+
+    from libcloud.compute.types import Provider
+    from libcloud.compute.providers import get_driver
+
+    cls = get_driver(Provider.LINODE)
+
+    driver = cls('username', 'api_key')
+    driver.create_node(..., ex_kernel=110)
+
 Addition of new "STOPPED" node state
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9174d716/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py 
b/libcloud/compute/drivers/linode.py
index 393aa1f..c25e363 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -270,9 +270,11 @@ class LinodeNodeDriver(NodeDriver):
             kernel = kwargs["ex_kernel"]
         else:
             if image.extra['64bit']:
-                kernel = 111 if image.extra['pvops'] else 107
+                # For a list of available kernel ids, see
+                # https://www.linode.com/kernels/
+                kernel = 138
             else:
-                kernel = 110 if image.extra['pvops'] else 60
+                kernel = 137
         params = {"api_action": "avail.kernels"}
         kernels = self.connection.request(API_ROOT, params=params).objects[0]
         if kernel not in [z["KERNELID"] for z in kernels]:

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9174d716/libcloud/test/compute/fixtures/linode/_avail_kernels.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/linode/_avail_kernels.json 
b/libcloud/test/compute/fixtures/linode/_avail_kernels.json
index 457bb55..9d0ad8d 100644
--- a/libcloud/test/compute/fixtures/linode/_avail_kernels.json
+++ b/libcloud/test/compute/fixtures/linode/_avail_kernels.json
@@ -1 +1,146 @@
-{"ERRORARRAY":[],"ACTION":"avail.kernels","DATA":[{"LABEL":"Latest 2.6 Stable 
(2.6.18.8-linode19)","ISXEN":1,"KERNELID":60},{"LABEL":"2.6.18.8-linode19","ISXEN":1,"KERNELID":103},{"LABEL":"2.6.30.5-linode20","ISXEN":1,"KERNELID":105},{"LABEL":"Latest
 2.6 Stable 
(2.6.18.8-x86_64-linode7)","ISXEN":1,"KERNELID":107},{"LABEL":"2.6.18.8-x86_64-linode7","ISXEN":1,"KERNELID":104},{"LABEL":"2.6.30.5-x86_64-linode8","ISXEN":1,"KERNELID":106},{"LABEL":"pv-grub-x86_32","ISXEN":1,"KERNELID":92},{"LABEL":"pv-grub-x86_64","ISXEN":1,"KERNELID":95},{"LABEL":"Recovery
 - Finnix 
(kernel)","ISXEN":1,"KERNELID":61},{"LABEL":"2.6.18.8-domU-linode7","ISXEN":1,"KERNELID":81},{"LABEL":"2.6.18.8-linode10","ISXEN":1,"KERNELID":89},{"LABEL":"2.6.18.8-linode16","ISXEN":1,"KERNELID":98},{"LABEL":"2.6.24.4-linode8","ISXEN":1,"KERNELID":84},{"LABEL":"2.6.25-linode9","ISXEN":1,"KERNELID":88},{"LABEL":"2.6.25.10-linode12","ISXEN":1,"KERNELID":90},{"LABEL":"2.6.26-linode13","ISXEN":1,"KERNELID":91},{"LABEL":"2.6.27.4
 
-linode14","ISXEN":1,"KERNELID":93},{"LABEL":"2.6.28-linode15","ISXEN":1,"KERNELID":96},{"LABEL":"2.6.28.3-linode17","ISXEN":1,"KERNELID":99},{"LABEL":"2.6.29-linode18","ISXEN":1,"KERNELID":101},{"LABEL":"2.6.16.38-x86_64-linode2","ISXEN":1,"KERNELID":85},{"LABEL":"2.6.18.8-x86_64-linode1","ISXEN":1,"KERNELID":86},{"LABEL":"2.6.27.4-x86_64-linode3","ISXEN":1,"KERNELID":94},{"LABEL":"2.6.28-x86_64-linode4","ISXEN":1,"KERNELID":97},{"LABEL":"2.6.28.3-x86_64-linode5","ISXEN":1,"KERNELID":100},{"LABEL":"2.6.29-x86_64-linode6","ISXEN":1,"KERNELID":102}]}
+{
+    "ERRORARRAY": [],
+    "ACTION": "avail.kernels",
+    "DATA": [
+        {
+            "LABEL": "Latest 2.6 Stable (2.6.18.8-linode19)",
+            "ISXEN": 1,
+            "KERNELID": 60
+        },
+        {
+            "LABEL": "2.6.18.8-linode19",
+            "ISXEN": 1,
+            "KERNELID": 103
+        },
+        {
+            "LABEL": "2.6.30.5-linode20",
+            "ISXEN": 1,
+            "KERNELID": 105
+        },
+        {
+            "LABEL": "Latest 2.6 Stable (2.6.18.8-x86_64-linode7)",
+            "ISXEN": 1,
+            "KERNELID": 107
+        },
+        {
+            "LABEL": "2.6.18.8-x86_64-linode7",
+            "ISXEN": 1,
+            "KERNELID": 104
+        },
+        {
+            "LABEL": "2.6.30.5-x86_64-linode8",
+            "ISXEN": 1,
+            "KERNELID": 106
+        },
+        {
+            "LABEL": "pv-grub-x86_32",
+            "ISXEN": 1,
+            "KERNELID": 92
+        },
+        {
+            "LABEL": "pv-grub-x86_64",
+            "ISXEN": 1,
+            "KERNELID": 95
+        },
+        {
+            "LABEL": "Recovery - Finnix (kernel)",
+            "ISXEN": 1,
+            "KERNELID": 61
+        },
+        {
+            "LABEL": "2.6.18.8-domU-linode7",
+            "ISXEN": 1,
+            "KERNELID": 81
+        },
+        {
+            "LABEL": "2.6.18.8-linode10",
+            "ISXEN": 1,
+            "KERNELID": 89
+        },
+        {
+            "LABEL": "2.6.18.8-linode16",
+            "ISXEN": 1,
+            "KERNELID": 98
+        },
+        {
+            "LABEL": "2.6.24.4-linode8",
+            "ISXEN": 1,
+            "KERNELID": 84
+        },
+        {
+            "LABEL": "2.6.25-linode9",
+            "ISXEN": 1,
+            "KERNELID": 88
+        },
+        {
+            "LABEL": "2.6.25.10-linode12",
+            "ISXEN": 1,
+            "KERNELID": 90
+        },
+        {
+            "LABEL": "2.6.26-linode13",
+            "ISXEN": 1,
+            "KERNELID": 91
+        },
+        {
+            "LABEL": "2.6.27.4-linode14",
+            "ISXEN": 1,
+            "KERNELID": 93
+        },
+        {
+            "LABEL": "2.6.28-linode15",
+            "ISXEN": 1,
+            "KERNELID": 96
+        },
+        {
+            "LABEL": "2.6.28.3-linode17",
+            "ISXEN": 1,
+            "KERNELID": 99
+        },
+        {
+            "LABEL": "2.6.29-linode18",
+            "ISXEN": 1,
+            "KERNELID": 101
+        },
+        {
+            "LABEL": "2.6.16.38-x86_64-linode2",
+            "ISXEN": 1,
+            "KERNELID": 85
+        },
+        {
+            "LABEL": "2.6.18.8-x86_64-linode1",
+            "ISXEN": 1,
+            "KERNELID": 86
+        },
+        {
+            "LABEL": "2.6.27.4-x86_64-linode3",
+            "ISXEN": 1,
+            "KERNELID": 94
+        },
+        {
+            "LABEL": "2.6.28-x86_64-linode4",
+            "ISXEN": 1,
+            "KERNELID": 97
+        },
+        {
+            "LABEL": "2.6.28.3-x86_64-linode5",
+            "ISXEN": 1,
+            "KERNELID": 100
+        },
+        {
+            "LABEL": "2.6.29-x86_64-linode6",
+            "ISXEN": 1,
+            "KERNELID": 102
+        },
+        {
+            "LABEL": "3.9.3-x86-linode52",
+            "ISXEN": 1,
+            "KERNELID": 137
+        },
+        {
+            "LABEL": "3.9.3-x86_64-linode33",
+            "ISXEN": 1,
+            "KERNELID": 138
+        }
+    ]
+}

Reply via email to