Web UI does not work from default install (2.1.0~bzr-2009-0ubuntu1)l

Bug #741661 reported by Jamie Mack
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cobbler (Ubuntu)
Fix Released
Medium
Dustin Kirkland 

Bug Description

Binary package hint: cobbler

On a fresh installation of Natty Alpha 3 then running apt-get install cobbler there are several issues with the default install - the web UI will not work.

There are several broken symlinks and Apache modules which do not get enabled by the default install.

The following steps must be taken in order to obtain a functional web UI at http://myhost/cobbler_web

######################################
Cobbler inital config on natty-alpha3
######################################

apt-get install cobbler
a2enmod proxy_http
cd /etc/apache2/conf.d
ln -s /etc/cobbler/cobbler_web.conf cobbler_web.conf

Edit cobbler_web.conf and comment out line 9 so it reads
 -------------------------------------------------
 #CustomLog logs/access_log combined env=!dontlog
 -------------------------------------------------

cd /var/www
rm cobbler_webui_content
ln -s /usr/share/cobbler/webroot/cobbler_webui_content/ cobbler_webui_content

##################################
Configure cobbler to allow logins
##################################
Edit /etc/cobbler/modules.conf

Change the line which reads
 -----------------
  [authentication]
  module = authn_denyall
 -----------------

So that it actually says

 -----------------
  [authentication]
  module = authn_configfile
 -----------------

###############
Now add a user
###############
htdigest /etc/cobbler/users.digest "Cobbler" myusername

#####################
Restart all services
#####################
service apache2 stop
service cobbler stop
service apache2 start
service apache2 start

If someone can ammend the default package then I'm happy to re-test

Tags: patch

Related branches

Changed in cobbler (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cobbler - 2.1.0-0ubuntu1

---------------
cobbler (2.1.0-0ubuntu1) natty; urgency=low

  * New upstream release.
  * Make it a bit more easier to configure cobbler_web (LP: #741661)
  * Drop java dependencies since cobbler4j is no longer shipped upstream.
 -- Chuck Short <email address hidden> Thu, 31 Mar 2011 08:54:56 -0400

Changed in cobbler (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hmm, there's a bit more work to be done on this bug.

 1) I still had to edit cobbler_web.conf and comment out:
 #CustomLog logs/access_log combined env=!dontlog

 2) The symlinks in cobbler-web.postinst all need to be "ln -sf", or else upgrades of the package will fail.

 3) I still had to edit /etc/cobbler/modules.conf and set:
  module = authn_configfile

 4) I still had to add users to /etc/cobbler/users.digest and restart.

I have a patch that solves most of this.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :
Changed in cobbler (Ubuntu):
status: Fix Released → Triaged
tags: added: patch
Changed in cobbler (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Jamie,

Would you mind giving the latest cobbler packages in this PPA a try, and reporting back? Thanks!!!

https://launchpad.net/~ubuntu-virt/+archive/ppa

Dustin

Revision history for this message
David Dyball (david-dyball) wrote :

Hi Dustin,

Just wanted to report that the issues are resolved in the cobbler package from your PPA, but the one in the PPA also introduces new bugs with viewing kickstart and snippet files ("CX: tainted file location" exceptions):

Fault at /ksfile/edit/var/lib/cobbler/kickstarts/default.ks
<Fault 1: "<class 'cobbler.cexceptions.CX'>:'tainted file location'">
Request Method: GET
Request URL: http://<server>/cobbler_web/ksfile/edit/var/lib/cobbler/kickstarts/default.ks
Django Version: 1.2.5
Exception Type: Fault
Exception Value:
<Fault 1: "<class 'cobbler.cexceptions.CX'>:'tainted file location'">
Exception Location: /usr/lib/python2.7/xmlrpclib.py in close, line 793
Python Executable: /usr/bin/python
Python Version: 2.7.1
Python Path: ['/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/share/cobbler/web', '/usr/share/cobbler/web/cobbler_web']
Server time: Mon, 4 Apr 2011 12:19:54 +0000

Is the plan to move your package into the cobbler tree, or will you just submit a patch to the post-install scripts for the current cobbler-web packages?

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 741661] Re: Web UI does not work from default install (2.1.0~bzr-2009-0ubuntu1)l

Hi David,

Thanks for testing. Do you have any idea what that error/fault means?
 I'm unfamiliar with it.

Also, is this a 'regression' with the new upload? Or just a new issue
in that we're getting further into cobbler functionality now? ie, I
would like to upload what we have now, and continue burning down
issues like this incrementally, assuming that the current upload
hasn't actually *caused* this regression...

I suspect that this might have something to do with file and directory
permissions in /var/lib/cobbler/somewhere. Something probably needs
to be chmod'ed or chown'ed to www-data.

Dustin

Revision history for this message
David Dyball (david-dyball) wrote :

Hi Dustin,

Just in the process of testing on a fresh Natty install. I'll snapshot my VM and try the same process with the ubuntu2 packages from natty and then again with the packages from your PPA and confirm.

Judging from this:

http://<email address hidden>/msg01200.html

I believe it is an issue with the latest upstream source. It appears to have happened around the same time they moved to a form-based Authentication for the login to cobbler_web.

More results to follow.

Cheers,
David.

Revision history for this message
David Dyball (david-dyball) wrote :

Just noted in the cobbler-devel lists this message:

http://<email address hidden>/msg01202.html

"commit 41a92b11969ab9c30b749ab99be70566cd943093
Author: James Cammarata <email address hidden>
Date: Wed Mar 30 16:42:18 2011 -0500

    Fix for snippet/kickstart editing via the web interface, where a
'tainted file path' error was thrown"

Seems to have been a dormant bug that didn't rear it's ugly head until they did some unrelated changes. Apparently patched though, so perhaps you could apply said patch and re-post some packages for testing?

Cheers,
David.

Revision history for this message
David Dyball (david-dyball) wrote :

Just to confirm, this is a regression with the new upload in your PPA, as the ubuntu1 packages (the ones that didn't setup the webUI correctly) did not exhibit this issue.

Seems to be an upstream regression though.

Revision history for this message
David Dyball (david-dyball) wrote :

OK, just to clarify a bunch of stuff:

1) The original cobbler-2.1.0-0ubuntu1 packages worked once you reconfigured the the cobbler_web.conf and re-created the symlinks

2) The cobbler_web.conf is /NOT/ fixed in cobbler-2.1.0-0ubuntu2. With this package I still had to change the authz_configfile setting in modules.conf and `chown www-data:www-data /var/lib/cobbler/webui_sessions` before I could login.

3) Using the package in your PPA (cobbler-2.1.0-0ubuntu3~ppa1) the install completes fine and the web-config is working out of the box.

** BUT **

The new bug concerning "tainted file location" errors now exists in both the PPA:cobbler-2.1.0-0ubuntu3~ppa1 and cobbler-2.1.0-0ubuntu2 (current in Natty).

I'll raise a new bug for the "Tainted File Location". If you merge your changes for the postinst/postrm and config files that should resolve this bug.

There is a patch for the new bug, but that can be discussed separately.

Cheers,
David.

Revision history for this message
David Dyball (david-dyball) wrote :

New bug for the regression raised:
https://bugs.launchpad.net/ubuntu/+source/cobbler/+bug/750402

Once the PPA postinst/postrm stuff is merged from Dustins PPA (https://launchpad.net/~ubuntu-virt/+archive/ppa) package the original bug (#741661) with cobbler-web installs not working out of the box will most likely be resolved.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cobbler - 2.1.0-0ubuntu3

---------------
cobbler (2.1.0-0ubuntu3) natty; urgency=low

  [ Andres Rodriguez ]
  * Really create/install python-koan binary package, LP: #731616
    - debian/control: Add binary package. Depend on python-ethtool.
    - debian/python-koan.install: Install koan python modules.
  * debian/patches/35_fix_hardlink_bin_path.patch:
    - Fix hardlink tool bin path and arguments as hardlink in Ubuntu/Debian
      is a different tool from other distros (Fedora/RHEL).

  [ Dustin Kirkland]
  * debian/cobbler.templates, debian/cobbler.config, debian/cobbler.postinst:
    - add a debconf question for the cobbler user's password
    - update the cobbler/admin user's password in cobbler/settings
  * debian/control:
    - depend on openssl, which we use to update the password in cobbler/settings
  * debian/patches/33_authn_configfile.patch:
    - move from denyall to configfile authentication now that the password
      is debconf-managed; makes cobbler work out of the box, LP: #741661
  * debian/patches/34_fix_apache_wont_start.patch:
    - comment out line that's causing Apache to fail to start, LP: #741661
  * debian/cobbler.postinst, debian/cobbler.postrm:
    - fix installation errors associated with restarting apache2 here
    - a2enmod wsgi
  * debian/cobbler-web.dirs, debian/cobbler-web.postinst:
    - must create/chown web sessions directory to www-data for the web ui
      to be usable, LP: #741661
 -- Dustin Kirkland <email address hidden> Mon, 04 Apr 2011 12:55:44 -0500

Changed in cobbler (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
David Dyball (david-dyball) wrote :

Possible regression with 2.1.0-0ubuntu4. I had to comment out the CustomLog lines in cobbler_web.conf before Apache would start. I will try and confirm, but at this stage my system has had a million different versions of cobbler installed over the past 2 days, so I can't be sure.

Will try on a fresh system and let you know.

Cheers,
David.

Revision history for this message
David Dyball (david-dyball) wrote :

Confirmed that a fresh install of Natty +

apt-get update
apt-get dist-upgrade
apt-get install cobbler cobbler-web

Still has a non-working web config. Apache fails to start with:

"[error] (2)No such file or directory: could not open transfer log file /etc/apache2/logs/access_log"

The fatal line in /etc/cobbler/cobbler_web.conf is:

9:CustomLog logs/access_log combined env=!dontlog

Commenting out this line fixes Apache startup, but i prefer to change the access log to be something more sensible, like:

CustomLog /var/log/cobbler/web_access.log

Revision history for this message
David Dyball (david-dyball) wrote :

Scratch that... the packaged version is still cobbler-2.1.0-0ubuntu2 in the repos. The patches in cobbler-2.1.0-0ubuntu4 source have fixed all of the above issues.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

The new one should land very shortly. It was held up because Andres
introduced a new python-koan binary, and we needed an archive admin to
approve the new binary.

Revision history for this message
Digambar (digambarpatil15) wrote :

not able to see web_ui even after following above stpes in ubuntu 12.04

Revision history for this message
Digambar (digambarpatil15) wrote :

When I run http://<myip>/cobbler_web

error is "Internal Server error"

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.