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
=== modified file 'examples/run_test_cobbler.py'
--- examples/run_test_cobbler.py 2012-12-11 08:41:24 +0000
+++ examples/run_test_cobbler.py 2012-12-11 18:59:29 +0000
@@ -89,20 +89,22 @@
89 exitstatus = 089 exitstatus = 0
90 machine = None90 machine = None
9191
92 for arg in ['arch', 'series', 'type']:
93 if vars(args)[arg] is not None:
94 sys.stderr.write('Automatic image fetch is not yet supported')
95 sys.stderr.write('Please specify an image using the -i option')
96 sys.stderr.write('Local files and http paths are supported')
97 sys.exit(4)
98
99 try:92 try:
100 inventory = ManualBaremetalSQLiteInventory()93 inventory = ManualBaremetalSQLiteInventory()
101 kw = {}94 kw = {}
102 for arg in ['boot', 'image', 'preseed', 'rewrite']:95 for arg in [
96 'arch',
97 'boot',
98 'image',
99 'preseed',
100 'rewrite',
101 'series',
102 ]:
103 value = getattr(args, arg)103 value = getattr(args, arg)
104 if value is not None:104 if value is not None:
105 kw[arg] = value105 kw[arg] = value
106 if getattr(args, 'type') is not None:
107 kw['installtype'] = args.type
106 machine = inventory.request(clean=(not args.no_destroy),108 machine = inventory.request(clean=(not args.no_destroy),
107 debug=args.debug, dlpercentincrement=10,109 debug=args.debug, dlpercentincrement=10,
108 name=args.name, new=True, **kw)110 name=args.name, new=True, **kw)
109111
=== modified file 'utah/provisioning/baremetal/cobbler.py'
--- utah/provisioning/baremetal/cobbler.py 2012-12-11 09:37:12 +0000
+++ utah/provisioning/baremetal/cobbler.py 2012-12-11 18:59:29 +0000
@@ -222,6 +222,8 @@
222 else:222 else:
223 self.logger.error(error_msg)223 self.logger.error(error_msg)
224 raise UTAHBMProvisioningException(error_msg)224 raise UTAHBMProvisioningException(error_msg)
225 else:
226 return retcode
225227
226 def _start(self):228 def _start(self):
227 """229 """
228230
=== modified file 'utah/provisioning/inventory/sqlite.py'
--- utah/provisioning/inventory/sqlite.py 2012-12-11 09:37:12 +0000
+++ utah/provisioning/inventory/sqlite.py 2012-12-11 18:59:29 +0000
@@ -95,13 +95,13 @@
9595
96class ManualBaremetalSQLiteInventory(SQLiteInventory):96class ManualBaremetalSQLiteInventory(SQLiteInventory):
97 """97 """
98 Keep an inventory of manually entered machines for use with cobbler.98 Keep an inventory of manually entered machines.
99 All columns other than machineid, name, and state are assumed to be99 All columns other than machineid, name, and state are assumed to be
100 arguments for cobbler system creation.100 arguments for system creation (i.e., with cobbler).
101 """101 """
102 # TODO: rename this102 # TODO: rename this
103 def __init__(self, db='~/.utah-cobbler-inventory',103 def __init__(self, db='~/.utah-baremetal-inventory',
104 lockfile='~/.utah-cobbler-lock', *args, **kw):104 lockfile='~/.utah-baremetal-lock', *args, **kw):
105 db = os.path.expanduser(db)105 db = os.path.expanduser(db)
106 lockfile = os.path.expanduser(lockfile)106 lockfile = os.path.expanduser(lockfile)
107 if not os.path.isfile(db):107 if not os.path.isfile(db):
@@ -138,7 +138,7 @@
138 try:138 try:
139 if not (psutil.pid_exists(pid) and ('utah' in139 if not (psutil.pid_exists(pid) and ('utah' in
140 ' '.join(psutil.Process(pid).cmdline)140 ' '.join(psutil.Process(pid).cmdline)
141 or 'run_test_cobbler.py' in141 or 'run_test' in
142 ' '.join(psutil.Process(pid).cmdline))):142 ' '.join(psutil.Process(pid).cmdline))):
143 return self._take(machineinfo, *args, **kw)143 return self._take(machineinfo, *args, **kw)
144 except ValueError:144 except ValueError:

Subscribers

People subscribed via source and target branches