barbican-worker doesn't have a --help (or other switches)

Bug #1603499 reported by Thomas Bechtold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Wishlist
Unassigned

Bug Description

(with barbican from mitaka version 2.0.1dev1)

When starting "barbican-worker" with i.e. "barbican-worker --help" or "barbican-worker --config-file /tmp/bw.log" barbican just starts but doesn't accept the given configuration values.

# barbican-worker --version
2016-07-15 16:34:35.641 1632 INFO barbican.model.repositories [-] Setting up database engine and session factory
2016-07-15 16:34:36.047 1632 INFO barbican.model.repositories [-] Updating schema to latest version
2016-07-15 16:34:36.064 1632 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2016-07-15 16:34:36.065 1632 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2016-07-15 16:34:36.087 1632 INFO oslo_service.service [-] Starting 2 workers
2016-07-15 16:34:36.096 1642 INFO barbican.queue.server [-] Starting the TaskServer
2016-07-15 16:34:36.107 1643 INFO barbican.queue.server [-] Starting the TaskServer
^C2016-07-15 16:34:36.815 1642 INFO oslo_service.service [-] Caught SIGINT signal, instantaneous exiting
2016-07-15 16:34:36.815 1643 INFO oslo_service.service [-] Caught SIGINT signal, instantaneous

or:

# barbican-worker --help
2016-07-15 16:35:10.824 1692 INFO barbican.model.repositories [-] Setting up database engine and session factory
2016-07-15 16:35:11.216 1692 INFO barbican.model.repositories [-] Updating schema to latest version
2016-07-15 16:35:11.233 1692 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2016-07-15 16:35:11.235 1692 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2016-07-15 16:35:11.259 1692 INFO oslo_service.service [-] Starting 2 workers
2016-07-15 16:35:11.268 1702 INFO barbican.queue.server [-] Starting the TaskServer
2016-07-15 16:35:11.278 1703 INFO barbican.queue.server [-] Starting the TaskServer
^C2016-07-15 16:35:11.720 1703 INFO oslo_service.service [-] Caught SIGINT signal, instantaneous exiting
2016-07-15 16:35:11.723 1702 INFO oslo_service.service [-] Caught SIGINT signal, instantaneous exiting
2016-07-15 16:35:11.727 1692 INFO oslo_service.service [-] Child 1702 exited with status 1
2016-07-15 16:35:11.730 1692 INFO oslo_service.service [-] Child 1703 exited with status 1
2016-07-15 16:35:11.733 1692 INFO oslo_service.service [-] Forking too fast, sleeping

Something seems to be wrong with the configuration handling.

description: updated
Revision history for this message
Jeremy Liu (liujiong) wrote :

Yeah, the CLI should handle this.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

The main problem is that you can't define the log file path or config file path.

Revision history for this message
Jeremy Liu (liujiong) wrote :

Seems like all of barbican's services don't support passing through those params from command line.

Changed in barbican:
status: New → Triaged
importance: Undecided → High
Revision history for this message
John Studarus (g-john-j) wrote :

Is this just for barbican-worker or are there others entry points that should have this functionality as well? Looking through I see main routines in:

db_manage.py
keystone_listener.py
pkcs11_kek_rewrap.py
retry_scheduler.py
worker.py

Do you want this in all of those? Any others?

I have some sample code working that works for --version and --help (using parse_args). I'm browsing through the CONFIG processing code to see how it should be included.

John Studarus (g-john-j)
Changed in barbican:
assignee: nobody → John Studarus (g-john-j)
Revision history for this message
John Studarus (g-john-j) wrote :
Changed in barbican:
status: Triaged → In Progress
Changed in barbican:
assignee: John Studarus (g-john-j) → nobody
status: In Progress → Triaged
importance: High → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/345575
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=efa2f7b0ff4a8786f1a03aa1dc924982243d2a6a
Submitter: Jenkins
Branch: master

commit efa2f7b0ff4a8786f1a03aa1dc924982243d2a6a
Author: Thomas Bechtold <email address hidden>
Date: Thu Jul 21 19:36:58 2016 +0200

    Pass cli options to commands

    When calling barbican-worker, barbican-retry or
    barbican-keystone_listener, the given cli options were not recognized.
    I.e. calling "barbican-worker -h" just tried to start the worker process
    instead of printing the help.

    Change-Id: Iff8ba2d05bbbafe9c4440a5ebfe05085d3f8a90f
    Closes-Bug: #1603499

Changed in barbican:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/barbican 5.0.0.0b1

This issue was fixed in the openstack/barbican 5.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/455681

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (stable/ocata)

Reviewed: https://review.openstack.org/455681
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=209d9c845c573271c6f6d6dd9147d1b865ed4dd8
Submitter: Jenkins
Branch: stable/ocata

commit 209d9c845c573271c6f6d6dd9147d1b865ed4dd8
Author: Thomas Bechtold <email address hidden>
Date: Thu Jul 21 19:36:58 2016 +0200

    Pass cli options to commands

    When calling barbican-worker, barbican-retry or
    barbican-keystone_listener, the given cli options were not recognized.
    I.e. calling "barbican-worker -h" just tried to start the worker process
    instead of printing the help.

    Change-Id: Iff8ba2d05bbbafe9c4440a5ebfe05085d3f8a90f
    Closes-Bug: #1603499
    (cherry picked from commit efa2f7b0ff4a8786f1a03aa1dc924982243d2a6a)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/barbican ocata-eol

This issue was fixed in the openstack/barbican ocata-eol release.

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.