Bug 1457338

Summary: Zaqar messages cannot be enqueued
Product: Red Hat OpenStack Reporter: Jason E. Rist <jrist>
Component: openstack-zaqarAssignee: RHOS Maint <rhos-maint>
Status: CLOSED ERRATA QA Contact: Udi Kalifon <ukalifon>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: apevec, beth.white, dtrainor, emacchi, hpokorny, jschluet, jslagle, lhh, mburns, nlevinki, rhel-osp-director-maint, rrasouli, tvignaud
Target Milestone: Upstream M3Keywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-zaqar-5.0.0-0.20170719124338.13b85cc.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 21:29:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason E. Rist 2017-05-31 14:18:33 UTC
Cloned from launchpad bug 1693862.

Description:

Messages cannot be sent to the "tripleo" queue via the Zaqar websocket connection.  After a fresh undercloud install, everything works fine but after some time, messages start to get refused.

Running the script below, here is the error that is returned:

{u'body': {u'message': u'Authentified.'}, u'headers': {u'status': 200}, u'request': {u'action': u'authenticate', u'body': {}, u'api': u'v2', u'headers': {}}}

{u'body': {u'exception': u'Object GET failed: http://192.168.24.1:8080/v1/AUTH_c60dbbb681c74bf78712395ea0829a74/zaqar_subscription%3Atripleo%3Ace2db07affc44072a1054214305a4b93/3147a9dd-0e31-43dd-8cfe-c7fd3894ca6f 404 Not Found  [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.<', u'error': u'Unexpected error.'}, u'headers': {u'status': 500}, u'request': {u'action': u'message_post', u'body': {u'queue_name': u'tripleo', u'messages': [{u'body': {u'timestamp': u'1495805427754', u'message': u'ohai', u'level': u'INFO'}, u'ttl': 300}]}, u'api': u'v2', u'headers': {u'Client-ID': u'4ad8df3d-e13b-4b8c-8fc9-8204207bea40', u'X-Project-ID': u'ce2db07affc44072a1054214305a4b93'}}}

In the first line, you can see that the client is successfully authenticated to the service.  In the second line, you can see that there is an error coming through via Swift.

There is nothing at all about this in /var/log/zaqar/zaqar.log or /var/log/swift.

This has been happening for a while now (weeks?).


Environment: latest undercloud built from master

You can use this quick Python script (that I received from someone on IRC) to enqueue messages via Zaqar's websocket endpoint:

    import websocket
    import uuid
    import json

    project = ""
    token = ""

    client_id = str(uuid.uuid4())

    ws = websocket.create_connection('ws://192.168.24.1:9000/')
    ws.send(json.dumps({
        'action': 'authenticate',
        'headers': {
            'X-Auth-Token': token,
            'Client-ID': client_id,
            'X-Project-ID': project
        }
    }))
    data = json.loads(ws.recv())
    print data

    ws.send(json.dumps({
        "action": "message_post",
        "headers": {
            "Client-ID": client_id,
            "X-Project-ID": project
        },
        "body": {
            "messages": [{
                "body": "Hello",
                "ttl": 300
            }],
            "queue_name": "tripleo"
        }
    }))

    data = json.loads(ws.recv())
    print data

Specification URL (additional information):

https://bugs.launchpad.net/tripleo/+bug/1693862

Comment 4 Dan Trainor 2017-11-06 15:51:29 UTC
Messages are enqueued and can be picked up using this test script which mimics a request.

This happens in at least:

openstack-zaqar-5.0.1-0.20171027110724.4f07aed.el7ost.noarch

Comment 7 errata-xmlrpc 2017-12-13 21:29:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462