~ubuntu-branches/ubuntu/saucy/cloud-init/saucy

« back to all changes in this revision

Viewing changes to debian/patches/catchup-887.patch

  • Committer: Scott Moser
  • Date: 2013-10-08 00:15:50 UTC
  • Revision ID: smoser@ubuntu.com-20131008001550-98r0dblzlpxfwdth
fix bug where a mount entry of 'ephemeral0' would only consider
the unpartitioned device, not also the first partition (LP: #1236594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
------------------------------------------------------------
 
2
revno: 887 [merge]
 
3
fixes bug: https://launchpad.net/bugs/1236594
 
4
committer: Scott Moser <smoser@ubuntu.com>
 
5
branch nick: trunk
 
6
timestamp: Mon 2013-10-07 20:08:13 -0400
 
7
message:
 
8
  fix bug mounting first partition of a alias'd name.
 
9
  
 
10
  The expected behavior was that 'ephemeral0' in a mount device entry
 
11
  and ephemeral0 mapped to /dev/xvdb that /dev/xvdb1 or /dev/xvdb would
 
12
  be substituted.
 
13
  
 
14
  Explicitly setting 'ephemeral0.0' would mean only xvdb in this case.
 
15
------------------------------------------------------------
 
16
Use --include-merged or -n0 to see merged revisions.
 
17
=== modified file 'ChangeLog'
 
18
 
 
19
=== modified file 'cloudinit/config/cc_mounts.py'
 
20
--- a/cloudinit/config/cc_mounts.py
 
21
+++ b/cloudinit/config/cc_mounts.py
 
22
@@ -222,9 +222,6 @@ def devnode_for_dev_part(device, partiti
 
23
     if not os.path.exists(device):
 
24
         return None
 
25
 
 
26
-    if not partition:
 
27
-        return device
 
28
-
 
29
     short_name = os.path.basename(device)
 
30
     sys_path = "/sys/block/%s" % short_name
 
31
 
 
32
@@ -238,8 +235,7 @@ def devnode_for_dev_part(device, partiti
 
33
         partition = str(partition)
 
34
 
 
35
     if partition is None:
 
36
-        valid_mappings = [sys_long_path + "1",
 
37
-                          sys_long_path + "p1" % partition]
 
38
+        valid_mappings = [sys_long_path + "1", sys_long_path + "p1"]
 
39
     elif partition != "0":
 
40
         valid_mappings = [sys_long_path + "%s" % partition,
 
41
                           sys_long_path + "p%s" % partition]