| Summary: | Variant doesn't get passed to test cases | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Alexander Todorov <atodorov> |
| Component: | lab controller | Assignee: | Bill Peck <bpeck> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 0.6 | CC: | bpeck, dcallagh, jlaska, mcsontos, rmancy |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-10 05:21:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Hello,
I'm trying to understand how this could have worked and is now broken.
snake_args["ksmeta"]["arch"] = arch
# Create Base Recipe
recipeTemplate = BeakerRecipe()
# get kickstart and add it to recipes
kickstart = snake_server.kickstart.generate(snakeTemplate, snake_args)
recipeTemplate.addKickstart(kickstart)
Looking through the code I don't see anywhere where we put variant into snake_args.
Am I right in assuming if the following code was in place this would work?
snake_args["variant"] = kwargs.get("variant","")
Hmm, I'm not sure about this but it could have been the older snake-workflow command which put the variant into snake_args. If this is not the case then please consider this as RFE. Fixed in git. This is now available from the beaker-stage repo. yum --enablerepo=beaker-stage upgrade beaker-redhat |
Description of problem: Information about variant doesn't get passed down to test cases using SNAKE templates. This results in broken test cases which rely on this information. See below: The everything-package-set template is supposed to generate: %packages * -@conflicts-<variant> The template looks like this: $ cat everything-package-set.py from pykickstart.version import FC6, RHEL6 from installdefaults import InstallKs # minimal install, procedural style def ks(**context): '''Package set / Everything''' ks=InstallKs() if ks.version <= FC6: ks.packages.add(['@everything']) else: ks.packages.add(['*']) conflicts = "@conflicts" variant = "" if (ks.version >= RHEL6): if context.has_key('variant'): variant = context['variant'] elif context.has_key('VARIANT'): variant = context['VARIANT'] if len(variant) > 0: conflicts = "@conflicts-%s" % variant.lower() ks.packages.add(['-%s' % conflicts]) return ks When scheduled with: bkr workflow-snake --arch x86_64 --variant Workstation --distro RHEL6-6.0 --snakeserver=snake.devel.redhat.com --template everything-package-set --task=/distribution/reservesys The generated ks.cfg contains only -@conflicts which is wrong. This results in file conflicts in the transaction. I'm marking this as regression because it was working previously, we've used it during RHEL6.0.