1

I am using spacewalk 2.6 on a CentOS7 machine. I am trying to kickstart machine from the spacewalk server.

For troubleshooting purposes, i have

  • disabled SElinux
  • no iptabled/firewalld

I have tried creating an installable tree during the syncing of channel/repo of a CentOS7. After the distribution is added in spacewalk, is set the installer generation to Red Hat Linux 7. I have also mounted an iso of a netinstall iso of SL, and copied its content to the spcewalk server to create a distribution in Spacewalk

I create a kickstart in the GUI of spacewalk, all fine and well.

When i kickstart a machine, it fails because it cannot find LiveOS/squashfs.img. The file is there on the server, but the httpd gives an 404. I tried to widen the permission on the LiveOS folder in the kickstart tree but no dice.

10.10.70.8 - - [15/Jan/2017:12:39:00 +0100] "POST /cobbler_api HTTP/1.1" 200 143 "-" "Java/1.8.0_111"
10.10.70.8 - - [15/Jan/2017:12:39:00 +0100] "POST /cobbler_api HTTP/1.1" 200 129 "-" "Java/1.8.0_111"
10.10.10.6 - - [15/Jan/2017:12:39:00 +0100] "GET /var/satellite/rhn/kickstart/sl_netinst/.treeinfo HTTP/1.1" 404 4715 "-" "curl/7.29.0"
10.10.10.6 - - [15/Jan/2017:12:39:00 +0100] "GET /var/satellite/rhn/kickstart/sl_netinst/LiveOS/squashfs.img HTTP/1.1" 404 4715 "-" "curl/7.29.0"
-rw-r-xr-x. 1 777 root 282337280 Jan 13 23:48 /var/satellite/rhn/kickstart/sl_netinst/LiveOS/squashfs.img

Can someone help me troublshoot this?

AdminBee
  • 21,637
  • 21
  • 47
  • 71
Arch
  • 11
  • 3

2 Answers2

0

EDIT: I think the below won't actually work, it keeps throwing an annaconda transaction error when installing packages. To actuall fix my issue I set my media_path to the following:

/ks/dist/org/1/CentOS-7.3-Base

The media_path variable in the "kickstart distribution" and the actual kickstart file were different.

Kickstart Distribution --> Variables: media_path=/ks/dist/org/1/CentOS-7.3-Base

Kickstart Profiles --> Variables: media_path=/var/satellite/rhn/kickstart/1/CentOS-7.3-Base


I solved this by doing the following (its actually quite easy)

  1. Create a symlink under /var/www/html which points to your media directory. (I just called my symlink centos7 here, and your symlink will point to /var/satellite/rhn/kickstart/sl_netinst/)

    ln -s /var/satellite/rhn/kickstart/1/CentOS-7.3-Base /var/www/html/centos7

  2. You then need to update your media_path variable in your kickstart. You can do this via the Spacewalk WebUI.

    Kickstart Details -> Variables

    and change media_path to centos7 (or name of your symlink)

spacewalk webui

  1. Save your kickstart and boot again

  2. You can also test that it works by trying to pull the squashfs.img.

    curl -o squashfs.img <spacewalk_server>/centos7/LiveOS/squashfs.img

Why this works

If you look at the default apache spacewalk configuration /etc/httpd/conf.d/zz-spacewalk-www.conf. It has this config:

<Directory "/var/www/html/*">
    Options Indexes FollowSymLinks

So basically follow any symlinks under /var/www/html/ which is openly accessible by default.

Patrick McMahon
  • 790
  • 1
  • 5
  • 9
0

Thank you Patrick.

the reason why this happenned in the first place is because i made a channel and kickstartable tree against the rolling CentoS 7 release. The kickstartable tree showed an invalid sign afterwards

When i choose to create a channel and kickstartable tree against CentOS7.3 All worked instantly

Arch
  • 11
  • 3