cobbler kickstart metadata dont affect ubuntu preseed

Bug #827496 reported by Ronen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cobbler (Ubuntu)
Invalid
High
Andres Rodriguez
Oneiric
Invalid
High
Andres Rodriguez

Bug Description

In cobbler I can specificity kickstart metadata parameters which are evaluated in the when the kickstart file is applied, when using such parameters in seed files they have not effect and they are evaluated as empty strings (see the $user in this case):

d-i base-installer/kernel/image string linux-generic
d-i passwd/root-login boolean false
d-i passwd/make-user boolean true
d-i passwd/user-fullname string $user

Dave Walker (davewalker)
Changed in cobbler (Ubuntu):
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect BUGNUMBER
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in cobbler (Ubuntu):
status: New → Incomplete
Dave Walker (davewalker)
tags: added: server-o-rs
Changed in cobbler (Ubuntu):
assignee: nobody → Andres Rodriguez (andreserl)
Dave Walker (davewalker)
Changed in cobbler (Ubuntu):
milestone: none → ubuntu-11.10
tags: added: rls-mgr-o-tracking
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Ronen,

Thank you for taking the time to report this bug and trying to make Ubuntu better. I work with kickstart meta-data various times a day and I have not been able to reproduce your bug report.

Can you please give me a little bit of more information to be able to reproduce it as I was unable to? Information such as:
- Are you using profiles or systems?
- Are you modifying correctly the preseed to use the kickstart meta-data?
- are you viewing the preseed by directly opening the file, or by viewing it through cobbler?

I have to tried to reproduce this but without success by doing the following:

sudo cobbler profile edit --name oneiric-i386 --ksmeta="user=testing"

Then I did the lines you list above to the preseed, and executed the following command to see the preseed that the machine that PXe's will use:

sudo cobbler profile getks --name oneiric-i386

and the result was the following:

ubuntu@cobbler:~$ sudo cobbler profile getks --name oneiric-4-i386
d-i base-installer/kernel/image string linux-generic
d-i passwd/root-login boolean false
d-i passwd/make-user boolean true
d-i passwd/user-fullname string testing

Which means the kickstart meta-data has been evaluated correctly. The same happens when doing this on systems instead of profiles.

This actually would invalidate this bug report. Please, it would be helpful if you would be able to provide the requested information.

Thank you again for taking the time to report this bug.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Marking this bug report as Invalid. If you think you've experienced this error again please feel free to re-open the bug or file a new one.

Changed in cobbler (Ubuntu Oneiric):
status: Incomplete → Invalid
Revision history for this message
Ronen (narkisr) wrote :

Hey Andres, after digging a bit further into the issue I think iv found the cause, iv got a system that inherits from a profile, the parent profile specifies the following kernel options:

priority=critical locale=en_US

In the inheriting system iv specified:

priority=critical locale=en_US hostname=ubu2

Iv found that cobbler generates a file under:

/var/lib/tftpboot/grub/MAC_ADDRESS

This file contains the hostname:

title developer-desktop
    root (nd)
    kernel /images/ubuntu-alternate-x86_64/linux locale= locale=en_US text hostname=ubu2 priority=critical auto url=http://192.168.4.18/cblr/svc/op/ks/system/ubu2 hostname= domain=local.lan suite=natty
    initrd /images/ubuntu-alternate-x86_64/initrd.gz

Notice that the hostname entry is duplicated with one entry empty, then when ill try to install a machine the installer will indeed complain about an empty hostname value, no matter what I specify in my kickstart meta data (looks like kernel options take precedence)

The only solution is to set the hostname in the systems kernel options (leaving it out will also result with an empty value passed to the installer no matter what).

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Ronen,

Yes, kernel options take precedence to the ones on the preseed file.

I do agree that the duplicated hostname= might be a bug,m however, the way how cobbler handles this is done differently. I'd suggest you remove the kopts for hostname=ubu2 and set the system's hostname so that it gest filled automatically. You do that as follows:

sudo cobbler system edit --name <name-of-system> --hostname ubu2

By setting the hostname on the system, then the PXE file generated above, will contain the following:

title developer-desktop
    root (nd)
    kernel /images/ubuntu-alternate-x86_64/linux locale= locale=en_US text priority=critical auto url=http://192.168.4.18/cblr/svc/op/ks/system/ubu2 hostname=ubu2 domain=local.lan suite=natty
    initrd /images/ubuntu-alternate-x86_64/initrd.gz

If you set the hostname to be fqnd, then the domain should also be filled. Example:

sudo cobbler system edit --name <name-of-system> --hostname ubu2.testing.com

The PXE file will be:

title developer-desktop
    root (nd)
    kernel /images/ubuntu-alternate-x86_64/linux locale= locale=en_US text priority=critical auto url=http://192.168.4.18/cblr/svc/op/ks/system/ubu2 hostname=ubu2 domain=testing.com suite=natty
    initrd /images/ubuntu-alternate-x86_64/initrd.gz

Hope this information helps.

Revision history for this message
Ronen (narkisr) wrote :

BTW the:

/var/lib/tftpboot/pxelinux.cfg/MAC

file has also parameters,

Id suggest reproducing all this using virtualbox (youll need to use AM79 network card)

Revision history for this message
Ronen (narkisr) wrote :

I could put that in the system but since id like to have multiple profiles inherit from it, the only workaround I can see is to patch the pxe and tft files before the installation for each system, I think that the reason I thought the user had no effect was because I set it up in the system

Revision history for this message
Ronen (narkisr) wrote :

Should I create another bug for the host issue? the current work around is really messy

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.