Tests fail with "HTTPError: HTTP Error 503: Service Unavailable"

Bug #1044393 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Won't Fix
Low
Unassigned

Bug Description

Workaround: run "http_proxy= make test"

This always seems to fail in my dev environment (A). I've tried recreating my environment from scratch, and it still happens. But I've tried a different environment (B) and it worked without a problem. I also believe that I've seen it work in A once about three weeks ago.

I get the impression it's a race condition with a single root cause. Output of "make test" attached. Any ideas?

In environment A, I'm doing, on a fresh installation of Precise:

wget -qO- http://people.canonical.com/~rbasak/maas/buildout.tar.xz|tar xJ || true
cd maas
sudo apt-get --no-install-recommends install make
make install-dependencies
sudo tee -a /etc/tgt/targets.conf < contrib/tgt.conf
mkdir -p ~/.buildout/cache
cat > ~/.buildout/default.cfg <<EOF
[buildout]
download-cache = $HOME/.buildout/cache
eggs-directory = $HOME/.buildout/eggs
EOF
make test

Tags: tech-debt
Revision history for this message
Robie Basak (racb) wrote :
description: updated
description: updated
Revision history for this message
Julian Edwards (julian-edwards) wrote :

The bulk of them are YUI test problems, which is very odd. Can you try "make check" which cleans the environment out before testing.

I've no idea about the one that returns 503.

Changed in maas:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Robie Basak (racb) wrote :

"make check" still gives me the same errors.

tags: added: tech-debt
Revision history for this message
Gavin Panella (allenap) wrote : Re: [Bug 1044393] Re: Tests fail with "HTTPError: HTTP Error 503: Service Unavailable"

MAAS uses Xvfb (via pyvirtualdisplay) for local headless JavaScript
testing. In a new, ephemeral, LXC container, I get:

  $ Xvfb -br -screen 0 1024x768x24 :1

  Fatal server error:
  Can't read lock file /tmp/.X1-lock

Xvfb accepts a -nolock option:

  $ Xvfb -br -screen 0 1024x768x24 -nolock :1
  Warning: the -nolock option can only be used by root

  Fatal server error:
  Can't read lock file /tmp/.X1-lock

So, via sudo:

  sudo Xvfb -br -screen 0 1024x768x24 -nolock :1
  [dix] Could not init font path element ...

Background it (Ctrl-z, bg) and firefox can be started:

  $ DISPLAY=:1 firefox

I don't know why locking is a problem though. Perhaps
--no-install-recommends is leaving out something that we actually
depend on.

Revision history for this message
Robie Basak (racb) wrote :

I can run "Xvfb -br -screen 0 1024x768x24 :1" and then "DISPLAY=:1 firefox" without a problem on a machine exhibiting this problem. And this bug predates my addition of "--no-install-recommends". So I suppose that this is related to the same problem but perhaps not the root cause?

Revision history for this message
Robie Basak (racb) wrote :

Thanks to Gavin, we've pinned this down to tests failing when http_proxy is set. The tests should disable use of the proxy as necessary.

Robie Basak (racb)
description: updated
Changed in maas:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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