Merge lp:~nuclearbob/utah/baremetal-fixes into lp:utah

Proposed by Max Brustkern
Status: Merged
Approved by: Max Brustkern
Approved revision: 790
Merged at revision: 786
Proposed branch: lp:~nuclearbob/utah/baremetal-fixes
Merge into: lp:utah
Diff against target: 78 lines (+17/-13)
3 files modified
examples/run_test_cobbler.py (+10/-8)
utah/provisioning/baremetal/cobbler.py (+2/-0)
utah/provisioning/inventory/sqlite.py (+5/-5)
To merge this branch: bzr merge lp:~nuclearbob/utah/baremetal-fixes
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve
Review via email: mp+139292@code.launchpad.net

Description of the change

I found several minor issues when testing the proposed new stable version on physical hardware. None of these are release blockers, but if we have a chance to approve them today, I can get them tested, and the new stable version will be a little easier to use.

To post a comment you must log in.
lp:~nuclearbob/utah/baremetal-fixes updated
789. By Max Brustkern

Did type->instaltype mapping for arguments

790. By Max Brustkern

Fixed typo

Revision history for this message
Max Brustkern (nuclearbob) wrote :

I tested this on an i386 raring server image, and it worked. I'm testing with an amd64 desktop image now, but none of the changes should have affected things specific to arch or installtype, so I expect this should be okay.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

This works on a quantal amd64 desktop image. I'm testing a raring desktop, but so far it's taking a long time and possible timing out. I'm going to try with something other than the latest daily image in case it's not working correctly.

Revision history for this message
Joe Talbott (joetalbott) wrote :

Looks okay to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/run_test_cobbler.py'
2--- examples/run_test_cobbler.py 2012-12-11 08:41:24 +0000
3+++ examples/run_test_cobbler.py 2012-12-11 18:59:29 +0000
4@@ -89,20 +89,22 @@
5 exitstatus = 0
6 machine = None
7
8- for arg in ['arch', 'series', 'type']:
9- if vars(args)[arg] is not None:
10- sys.stderr.write('Automatic image fetch is not yet supported')
11- sys.stderr.write('Please specify an image using the -i option')
12- sys.stderr.write('Local files and http paths are supported')
13- sys.exit(4)
14-
15 try:
16 inventory = ManualBaremetalSQLiteInventory()
17 kw = {}
18- for arg in ['boot', 'image', 'preseed', 'rewrite']:
19+ for arg in [
20+ 'arch',
21+ 'boot',
22+ 'image',
23+ 'preseed',
24+ 'rewrite',
25+ 'series',
26+ ]:
27 value = getattr(args, arg)
28 if value is not None:
29 kw[arg] = value
30+ if getattr(args, 'type') is not None:
31+ kw['installtype'] = args.type
32 machine = inventory.request(clean=(not args.no_destroy),
33 debug=args.debug, dlpercentincrement=10,
34 name=args.name, new=True, **kw)
35
36=== modified file 'utah/provisioning/baremetal/cobbler.py'
37--- utah/provisioning/baremetal/cobbler.py 2012-12-11 09:37:12 +0000
38+++ utah/provisioning/baremetal/cobbler.py 2012-12-11 18:59:29 +0000
39@@ -222,6 +222,8 @@
40 else:
41 self.logger.error(error_msg)
42 raise UTAHBMProvisioningException(error_msg)
43+ else:
44+ return retcode
45
46 def _start(self):
47 """
48
49=== modified file 'utah/provisioning/inventory/sqlite.py'
50--- utah/provisioning/inventory/sqlite.py 2012-12-11 09:37:12 +0000
51+++ utah/provisioning/inventory/sqlite.py 2012-12-11 18:59:29 +0000
52@@ -95,13 +95,13 @@
53
54 class ManualBaremetalSQLiteInventory(SQLiteInventory):
55 """
56- Keep an inventory of manually entered machines for use with cobbler.
57+ Keep an inventory of manually entered machines.
58 All columns other than machineid, name, and state are assumed to be
59- arguments for cobbler system creation.
60+ arguments for system creation (i.e., with cobbler).
61 """
62 # TODO: rename this
63- def __init__(self, db='~/.utah-cobbler-inventory',
64- lockfile='~/.utah-cobbler-lock', *args, **kw):
65+ def __init__(self, db='~/.utah-baremetal-inventory',
66+ lockfile='~/.utah-baremetal-lock', *args, **kw):
67 db = os.path.expanduser(db)
68 lockfile = os.path.expanduser(lockfile)
69 if not os.path.isfile(db):
70@@ -138,7 +138,7 @@
71 try:
72 if not (psutil.pid_exists(pid) and ('utah' in
73 ' '.join(psutil.Process(pid).cmdline)
74- or 'run_test_cobbler.py' in
75+ or 'run_test' in
76 ' '.join(psutil.Process(pid).cmdline))):
77 return self._take(machineinfo, *args, **kw)
78 except ValueError:

Subscribers

People subscribed via source and target branches