Project

General

Profile

Actions

Support #22283

closed

Bootdisk generates empty iso

Added by michele pezzi about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

HI,

i try to create an iso image in this way :

[ public]# foreman-rake bootdisk:generate:host NAME=host.foo.it OUTPUT=/var/lib/foreman/public/host --trace
  • Invoke bootdisk:generate:host (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute bootdisk:generate:host
    I: -input-charset not specified, using utf-8 (detected in locale settings)
    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
    328 extents written (0 MB)
    Wrote /var/lib/foreman/public/host

But the iso is empty.

what is my error?

Actions #1

Updated by Lukas Zapletal about 6 years ago

  • Project changed from Foreman to Boot disk
  • Subject changed from bootdisk - empty iso to Bootdisk generates empty iso
  • Category deleted (Rake tasks)
  • Priority changed from High to Normal

Hey, we don't know what is your error. Check production.log there you have it.

Actions #2

Updated by michele pezzi about 6 years ago

  • Priority changed from Normal to High

i see that :

2018-01-16 14:54:23 [app] [I] Current user: foreman_admin (administrator)
2018-01-16 14:54:23 [app] [I] Current user: foreman_admin (administrator)
2018-01-16 14:54:24 [app] [I] Current user: foreman_admin (administrator)
2018-01-16 14:54:24 [templates] [I] Rendering template 'Unnamed'
2018-01-16 14:54:24 [dynflow] [I] start terminating throttle_limiter...
2018-01-16 14:54:24 [dynflow] [I] start terminating client dispatcher...
2018-01-16 14:54:24 [dynflow] [I] stop listening for new events...
2018-01-16 14:54:24 [dynflow] [I] start terminating clock...

Actions #3

Updated by Lukas Zapletal about 6 years ago

  • Priority changed from High to Normal

Ensure the host host.foo.it exists. Ensure the directory is writeable by foreman user. Add missing ISO extension:

foreman-rake bootdisk:generate:host NAME=host.foo.it OUTPUT=/tmp/test.iso
Actions #4

Updated by michele pezzi about 6 years ago

Hi,
The directory /var/lib/foreman /var/lib/foreman/public are both writeable by foreman user and the host.foo.it exist (i create and i see it on the web interface).

The production log and the command output are the same as in the previous message.

[root@foreman_server public]# foreman-rake bootdisk:generate:host NAME=host.foo.it OUTPUT=/var/lib/foreman/public/host.foo.it --trace
  • Invoke bootdisk:generate:host (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute bootdisk:generate:host
    I: -input-charset not specified, using utf-8 (detected in locale settings)
    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
    328 extents written (0 MB)
    Wrote /var/lib/foreman/public/host.foo.it

2018-01-17 11:07:29 3ebf011c [app] [I] Completed 200 OK in 3ms (Views: 0.1ms | ActiveRecord: 0.3ms)
2018-01-17 11:07:30 [app] [I] Current user: foreman_admin (administrator)
2018-01-17 11:07:30 [app] [I] Current user: foreman_admin (administrator)
2018-01-17 11:07:31 [app] [I] Current user: foreman_admin (administrator)
2018-01-17 11:07:32 [templates] [I] Rendering template 'Unnamed'
drwxr-xr-x 5 foreman foreman 41 Jan 15 13:09 foreman
drwxr-xr-x 5 foreman foreman 148 Jan 16 14:54 public

Actions #5

Updated by Lukas Zapletal about 6 years ago

I don't know what is wrong in your case, but this is the command that fails:

https://github.com/theforeman/foreman_bootdisk/blob/master/app/services/foreman_bootdisk/iso_generator.rb#L78

Locate that line, add some print debug (Rails.logger.info "XXX") and print whole command, block tempdir from being deleted and then issue that command manually and try to find what is wrong.

This works out of box without problems.

Actions #6

Updated by michele pezzi about 6 years ago

The command

foreman-rake bootdisk:generate:host NAME=host.foo.it OUTPUT=/var/lib/foreman/public/host.foo.it --trace

should work only if the host is in "build mode" ? because if the host isn't in "build mode" the output is the same.

Actions #7

Updated by Lukas Zapletal about 6 years ago

Yes must be in build mode. By the way, when you download the same disk from UI, does it work? If it does, workaround might be to use API/hammer CLI to get the ISO.

Actions #8

Updated by michele pezzi about 6 years ago

it doesn't work. The host reach installation media, and then download the vmlinuz etc.., but then it doesn't go through the installation process.

Actions #9

Updated by michele pezzi about 6 years ago

  • Status changed from New to Resolved

hi,

i found the problem and i fix it.

The database was corrupted during the import after a new foreman server installation.

thank you for the support

Actions

Also available in: Atom PDF