Starting the server in a non-terminal causes a crash

Bug #1243845 reported by Angus Salkeld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Undecided
Angus Salkeld

Bug Description

I tried to install marconi in an instance (using the user_data). The server keeps crashing with the following:

marconi-server &
Traceback (most recent call last):
  File "/usr/bin/marconi-server", line 10, in <module>
    sys.exit(run())
  File "/root/marconi/marconi/common/cli.py", line 67, in _wrapper
    _enable_echo(False)
  File "/root/marconi/marconi/common/cli.py", line 48, in _enable_echo
    new_attr = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/root/marconi/marconi/common/cli.py", line 48, in _enable_echo
    new_attr = termios.tcgetattr(fd)
error: (25, 'Inappropriate ioctl for device')
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/root/marconi/marconi/common/cli.py", line 48, in _enable_echo
    new_attr = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')

Note I can start it fine when I login and have a normal interactive terminal.
I tried disabling the stdout logging, but it did not seem to make a difference (I could be doing it wrong).

Below is the Heat template I am using:

heat_template_version: 2013-05-23
parameters:
  key_name:
    type: String
    default: dropbear-angus
resources:
  config_server:
    type: OS::Nova::Server
    properties:
      image: fedora-19-i386-heat-cfntools
      flavor: m1.small
      key_name: {get_param: key_name}
      admin_user: asalkeld
      user_data: |
        #!/bin/bash -v
        yum -y install mongodb-server git python-pip python-devel
        systemctl start mongod

        cd /root
        git clone https://github.com/openstack/marconi.git
        cd marconi
        mkdir ~/.marconi
        mkdir /var/log/marconi
        cp etc/marconi-queues.conf-sample ~/.marconi/marconi-queues.conf
        sed -i "s|uri.*|uri = mongodb://localhost|" ~/.marconi/marconi-queues.conf
        cp etc/marconi-proxy.conf-sample ~/.marconi/marconi-proxy.conf
        cp etc/logging.conf-sample ~/.marconi/logging.conf
        sed -i "s|keys=production,file,devel|keys=production,file|" ~/.marconi/logging.conf
        pip install -e .

        # requirements fixups
        pip install -U -r requirements.txt
        pip install -U oslo.config
        pip install -U python-keystoneclient

        iptables -F
        marconi-server &

Angus Salkeld (asalkeld)
Changed in marconi:
assignee: nobody → Angus Salkeld (asalkeld)
status: New → In Progress
Revision history for this message
Zhihao Yuan (zyuan) wrote :

I don't regard this a defect. marconi-server is for testing only, not for deployment; try other WSGI containers.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/53415

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/53415
Committed: http://github.com/openstack/marconi/commit/e85fe34a3cbd6bcd76fab159e63c1667bb64585c
Submitter: Jenkins
Branch: master

commit e85fe34a3cbd6bcd76fab159e63c1667bb64585c
Author: Angus Salkeld <email address hidden>
Date: Wed Oct 23 08:28:31 2013 -1000

    Don't enable_echo when we don't have a tty

    The following termios calls will fail (and unnecessarily).

    Change-Id: I261ac4bbb6eac29df02bdd458aa65322ad81f316
    Closes-bug: #1243845

Changed in marconi:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in marconi:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-1 → 2014.1
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.