Merge lp:~ltrager/maas/fix_messages into lp:~maas-committers/maas/trunk

Proposed by Lee Trager
Status: Merged
Approved by: LaMont Jones
Approved revision: no longer in the source branch.
Merged at revision: 4513
Proposed branch: lp:~ltrager/maas/fix_messages
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 57 lines (+17/-10)
2 files modified
src/maasserver/models/node.py (+9/-4)
src/maasserver/models/tests/test_node.py (+8/-6)
To merge this branch: bzr merge lp:~ltrager/maas/fix_messages
Reviewer Review Type Date Requested Status
Ricardo Bánffy (community) Approve
Review via email: mp+278090@code.launchpad.net

Commit message

Clean up validate storage error messages

Description of the change

I worked with Carla to come up with some better validate storage error messages.

To post a comment you must log in.
Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Look great. There is a style issue that escaped me on my first contributions.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Oops... It was an approval, provided the strings are broken in a way consistent with the rest of the code.

review: Approve
Revision history for this message
Lee Trager (ltrager) wrote :

Thanks for catching that, I don't know why I did it the other way.

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.4 MiB)

The attempt to merge lp:~ltrager/maas/fix_messages into lp:maas failed. Below is the output from the failed tests.

Hit http://security.ubuntu.com xenial-security InRelease
Get:1 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial InRelease [218 kB]
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates InRelease
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-backports InRelease
Hit http://security.ubuntu.com xenial-security/main Sources
Hit http://security.ubuntu.com xenial-security/restricted Sources
Hit http://security.ubuntu.com xenial-security/universe Sources
Hit http://security.ubuntu.com xenial-security/multiverse Sources
Hit http://security.ubuntu.com xenial-security/main amd64 Packages
Hit http://security.ubuntu.com xenial-security/restricted amd64 Packages
Hit http://security.ubuntu.com xenial-security/universe amd64 Packages
Hit http://security.ubuntu.com xenial-security/multiverse amd64 Packages
Hit http://security.ubuntu.com xenial-security/main Translation-en
Hit http://security.ubuntu.com xenial-security/multiverse Translation-en
Hit http://security.ubuntu.com xenial-security/restricted Translation-en
Hit http://security.ubuntu.com xenial-security/universe Translation-en
Get:2 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Sources [1,118 kB]
Get:3 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Sources [7,228 B]
Get:4 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Sources [7,472 kB]
Get:5 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Sources [178 kB]
Get:6 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main amd64 Packages [1,441 kB]
Get:7 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted amd64 Packages [15.8 kB]
Get:8 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe amd64 Packages [6,971 kB]
Get:9 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse amd64 Packages [138 kB]
Get:10 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Translation-en [842 kB]
Get:11 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Translation-en [107 kB]
Get:12 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Translation-en [4,302 B]
Get:13 http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Translation-en [4,709 kB]
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Translation-en
Hit http://prod...

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.1 MiB)

The attempt to merge lp:~ltrager/maas/fix_messages into lp:maas failed. Below is the output from the failed tests.

Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial InRelease
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates InRelease
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-backports InRelease
Hit http://security.ubuntu.com xenial-security InRelease
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/main Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/multiverse Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/restricted Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial/universe Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Sources
Hit http://security.ubuntu.com xenial-security/main Sources
Hit http://security.ubuntu.com xenial-security/restricted Sources
Hit http://security.ubuntu.com xenial-security/universe Sources
Hit http://security.ubuntu.com xenial-security/multiverse Sources
Hit http://security.ubuntu.com xenial-security/main amd64 Packages
Hit http://security.ubuntu.com xenial-security/restricted amd64 Packages
Hit http://security.ubuntu.com xenial-security/universe amd64 Packages
Hit http://security.ubuntu.com xenial-security/multiverse amd64 Packages
Hit http://security.ubuntu.com xenial-security/main Translation-en
Hit http://security.ubuntu.com xenial-security/multiverse Translation-en
Hit http://security.ubuntu.com xenial-security/restricted Translation-en
Hit http://security.ubuntu.com xenial-security/universe Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse Sources
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/universe amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse amd64 Packages
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/main Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/multiverse Translation-en
Hit http://prodstack-zone-1.clouds.archive.ubuntu.com xenial-updates/restricted ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/models/node.py'
2--- src/maasserver/models/node.py 2015-11-17 23:03:36 +0000
3+++ src/maasserver/models/node.py 2015-11-20 09:16:36 +0000
4@@ -820,12 +820,17 @@
5 boot_mounted = True
6 issues = []
7 if not has_boot:
8- issues.append("Node must have boot disk.")
9+ issues.append(
10+ "Specify a storage device to be able to deploy this node.")
11 if not root_mounted:
12- issues.append("Node must have / mounted.")
13+ issues.append(
14+ "Mount the root '/' filesystem to be able to deploy this "
15+ "node.")
16 if root_mounted and root_on_bcache and not boot_mounted:
17- issues.append("Because / is on a bcache volume you must create "
18- "/boot on a non-bcache volume")
19+ issues.append(
20+ "This node cannot be deployed because it cannot boot from a "
21+ "bcache volume. Mount /boot on a non-bcache device to be "
22+ "able to deploy this node.")
23 return issues
24
25 def on_network(self):
26
27=== modified file 'src/maasserver/models/tests/test_node.py'
28--- src/maasserver/models/tests/test_node.py 2015-11-17 22:36:28 +0000
29+++ src/maasserver/models/tests/test_node.py 2015-11-20 09:16:36 +0000
30@@ -3799,9 +3799,10 @@
31
32 def test_storage_layout_issues_returns_invalid_when_no_disk(self):
33 node = factory.make_Node(with_boot_disk=False)
34- self.assertEquals(["Node must have boot disk.",
35- "Node must have / mounted."],
36- node.storage_layout_issues())
37+ self.assertEquals(
38+ ["Specify a storage device to be able to deploy this node.",
39+ "Mount the root '/' filesystem to be able to deploy this node."],
40+ node.storage_layout_issues())
41
42 def test_storage_layout_issues_returns_invalid_when_root_on_bcache(self):
43 node = factory.make_Node(with_boot_disk=False)
44@@ -3810,9 +3811,10 @@
45 node=node, group_type=FILESYSTEM_GROUP_TYPE.BCACHE)
46 bcache = fs_group.virtual_device
47 factory.make_Filesystem(block_device=bcache, mount_point="/")
48- self.assertEquals(["Because / is on a bcache volume you must create "
49- "/boot on a non-bcache volume"],
50- node.storage_layout_issues())
51+ self.assertEquals(
52+ ["This node cannot be deployed because it cannot boot from a "
53+ "bcache volume. Mount /boot on a non-bcache device to be able to "
54+ "deploy this node."], node.storage_layout_issues())
55
56
57 class TestNode_Stop(MAASServerTestCase):