Bug 1136369
| Summary: | `foreman-rake bootdisk:generate:host NAME=foobarbaz.katellolabs.org` fails with "undefined method 'empty?' for NilClass::Jail (NilClass)" | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Jan Hutař <jhutar> |
| Component: | Provisioning | Assignee: | Dominic Cleal <dcleal> |
| Status: | CLOSED ERRATA | QA Contact: | Tazim Kolhar <tkolhar> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.3 | CC: | bkearney, cwelton, dcleal, jswensso, lzap, tkolhar |
| Target Milestone: | Unspecified | Keywords: | Reopened, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 05:16:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jan Hutař
2014-09-02 12:47:59 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Jan, this is known behavior. You need to turn off safemode_render value (to false) in main Settings. [root@dell-pe2950-01 tmp]# foreman-rake bootdisk:generate:host NAME=fsdfsdf.katellolabs.org OUTPUT=/tmp/test.iso Size of boot image is 4 sectors -> No emulation Total translation table size: 2048 Total rockridge attributes bytes: 0 Total directory bytes: 0 Path table size(bytes): 10 Max brk space used 0 339 extents written (0 MB) Wrote /tmp/test.iso We should report it maybe better. I'd go for doco only maybe if you like. Created upstream low prio task: http://projects.theforeman.org/issues/7327 Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. Ok I am taking it back, this does work even when safemode is turned on. But I am unable to reproduce, see above. Works for me. Have you edited the template? Looking at the error, I'd suggest it's hitting one of these three tests and failing:
app/views/foreman_bootdisk/host.erb
8:bootdisk_raise(N_('Host has no IP address defined')) if @host.ip.empty?
11:bootdisk_raise(N_('Subnet (%s) has no gateway defined'), @host.subnet) if @host.subnet.gateway.empty?
12:bootdisk_raise(N_('Subnet (%s) has no primary DNS server defined'), @host.subnet) if @host.subnet.dns_primary.empty?
So the issue is that either the IP, subnet's gateway or DNS primary server isn't specified.
That a safemode error is given is a bug, somewhere.
To reproduce, note that either: a) the host must have no IP address given b) the subnet must have no gateway or primary DNS What's more, they must be nil rather than empty strings - probably creating them through the API or CLI, rather than the UI will do this. Yes, that makes sense. But I'm pretty sure I have used webUI to create the host and I have set minimum things I could to make it create new host (e.g. I'm pretty sure I have not fully filled subnet). VERIFIED: # rpm -qa | grep foreman foreman-debug-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch rubygem-hammer_cli_foreman-0.1.4.6-1.el7sat.noarch foreman-ovirt-1.7.2.13-1.el7sat.noarch foreman-proxy-1.7.2.4-1.el7sat.noarch dhcp201-150.englab.pnq.redhat.com-foreman-client-1.0-1.noarch dhcp201-150.englab.pnq.redhat.com-foreman-proxy-1.0-2.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.3-1.el7sat.noarch foreman-compute-1.7.2.13-1.el7sat.noarch foreman-libvirt-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman_docker-1.2.0.6-1.el7sat.noarch ruby193-rubygem-foreman-redhat_access-0.0.9-1.el7sat.noarch foreman-selinux-1.7.2.8-1.el7sat.noarch dhcp201-150.englab.pnq.redhat.com-foreman-proxy-client-1.0-1.noarch foreman-discovery-image-2.1.0-9.el7sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.5-1.el7sat.noarch foreman-vmware-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman-tasks-0.6.12.3-1.el7sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.9-1.el7sat.noarch foreman-gce-1.7.2.13-1.el7sat.noarch foreman-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.8-1.el7sat.noarch foreman-postgresql-1.7.2.13-1.el7sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.3-1.el7sat.noarch I ran in to this when the subnet did not have any DNS servers provided. The error went away after adding at least a primary DNS on the subnet. This bug is slated to be released with Satellite 6.1. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1592 |