ampq_config.py is created 0600 by root and can't be read by the upstart job running as nobody/nogroup

Bug #1290320 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CI Engine
Fix Released
Critical
Vincent Ladeuil
Ubuntu CI Services
Fix Released
Critical
Vincent Ladeuil

Bug Description

root@juju-hp-machine-2:/etc/init# more bsb_worker.conf

#--------------------------------------------------------------
# This file is managed by the rabbitmq-worker Juju charm
#--------------------------------------------------------------
description "starts a rabbitmq worker"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!12345]

# use sigint so python code just needs to catch KeyboardInterrupt
kill signal SIGINT

# If the process quits unexpectadly trigger respawn it, unless it
# fails 15 times within 5 seconds
respawn
respawn limit 15 5

setuid nobody
setgid nogroup
chdir /srv/bsb_worker

exec ./run-python ./branch-source-builder/bsbuilder/run_worker.py

root@juju-hp-machine-2:/srv/bsb_worker# ls -l
total 112
-rw------- 1 root root 196 Mar 10 09:49 amqp_config.py

Tags: airline

Related branches

Vincent Ladeuil (vila)
Changed in ubuntu-ci-services-itself:
importance: Undecided → Critical
Revision history for this message
Vincent Ladeuil (vila) wrote :

Fix in progress but a new bug surfaces:

Traceback (most recent call last):
  File "./branch-source-builder/bsbuilder/run_worker.py", line 91, in <module>
    amqp_utils.process_queue(config, 'bsbuilder', on_message)
  File "/srv/bsb_worker/ci-utils/ci_utils/amqp_utils.py", line 101, in process_queue
    conn = connection(config)
  File "/srv/bsb_worker/ci-utils/ci_utils/amqp_utils.py", line 48, in connection
    password=rabbit_config.AMQP_PASSWORD
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/connection.py", line 144, in __init__
    (10, 30), # tune
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 95, in wait
    self.channel_id, allowed_methods)
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/connection.py", line 202, in _wait_method
    self.method_reader.read_method()
  File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/method_framing.py", line 221, in read_method
    raise m
IOError: Socket closed

Revision history for this message
Vincent Ladeuil (vila) wrote :

With the fix in progress the amqp_config.py is created with 0644 and its content seems fine to me:

# DO NOT EDIT. Generated by restish charm hook
AMQP_USER = "xxx"
AMQP_VHOST = "/"
AMQP_HOST = "10.0.0.243"
AMQP_PASSWORD = "xxx"

or is it an issue with the IP address ?

But again, why would this causes an issue *now* and not earlier ?

Revision history for this message
Vincent Ladeuil (vila) wrote :

Slipt the new bug into bug #1290386

Changed in ubuntu-ci-services-itself:
status: In Progress → Fix Committed
Andy Doan (doanac)
Changed in ubuntu-ci-services-itself:
status: Fix Committed → Fix Released
Changed in ubuntu-ci-services-itself:
status: Fix Released → Fix Committed
Changed in ubuntu-ci-services-itself:
status: Fix Committed → Fix Released
Ursula Junque (ursinha)
Changed in uci-engine:
assignee: nobody → Vincent Ladeuil (vila)
importance: Undecided → Critical
milestone: none → phase-0
status: New → Fix Released
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.