Bug 847629 - Failed to provision: ValueError: list.index(x): x not in list
Failed to provision: ValueError: list.index(x): x not in list
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.9.3
: ---
Assigned To: Dan Callaghan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-13 03:48 EDT by Dan Callaghan
Modified: 2012-09-06 00:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-06 00:39:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2012-08-13 03:48:04 EDT
Version-Release number of selected component (if applicable):
0.9.2

Steps to Reproduce:
1. Add a distro tree URL whose scheme is not nfs:// http:// or ftp:// (for example, nfs+iso://)
2. Provision the distro tree without specifying method in ksmeta
  
Actual results:
2012-08-13 16:41:45,875 beakerd ERROR Failed to provision recipeid 80
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/tools/beakerd.py", line 454, in scheduled_recipes
    recipe.provision()
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 4971, in provision
    recipe=self, ks_appends=ks_appends)
  File "/usr/lib/python2.6/site-packages/bkr/server/kickstart.py", line 158, in generate_kickstart
    result = template.render(context)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.6/site-packages/bkr/server/kickstarts/Fedora", line 7, in top-level template code
    {{ snippet('install_method') }}
  File "/usr/lib64/python2.6/site-packages/jinja2/sandbox.py", line 251, in call
    return __context.call(__obj, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/server/kickstart.py", line 145, in snippet
    return template.render(context)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.6/site-packages/bkr/server/snippets/install_method", line 1, in top-level template code
    {% set url = distro_tree.url_in_lab(system.lab_controller, scheme=method|default(None), required=True) %}
  File "/usr/lib64/python2.6/site-packages/jinja2/sandbox.py", line 251, in call
    return __context.call(__obj, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 3012, in url_in_lab
    return sorted(urls, key=lambda url: scheme_order.index(urlparse.urlparse(url).scheme))[0]
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 3012, in <lambda>
    return sorted(urls, key=lambda url: scheme_order.index(urlparse.urlparse(url).scheme))[0]
ValueError: list.index(x): x not in list

Expected results:
No breakage
Comment 1 Dan Callaghan 2012-08-13 06:01:54 EDT
On Gerrit: http://gerrit.beaker-project.org/1291
Comment 3 Raymond Mancy 2012-08-26 23:57:31 EDT
Verified, https://beaker-stage.app.eng.bos.redhat.com/jobs/16571
Comment 4 Dan Callaghan 2012-09-06 00:39:11 EDT
Beaker 0.9.3 has been released.

Note You need to log in before you can comment on or make changes to this bug.