wsgi_script based ceilometer-api binary does not support the same CLI arguments as console_script version

Bug #1626006 reported by James Page
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Undecided
Unassigned
ceilometer (Ubuntu)
Fix Released
High
Unassigned
python-pbr (Ubuntu)
Fix Released
High
Corey Bryant

Bug Description

For newton rc1, ceilometer switch to providing the ceilometer-api binary using the new pbr wsgi_script stanza; this new binary is not directly compatible with the CLI of the previous console script version.

The daemon fails to start as the only CLI options it recognises are -P port

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: ceilometer-api 1:7.0.0~rc1-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-9136.55-generic 4.4.16
Uname: Linux 4.4.0-9136-generic x86_64
ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
Date: Wed Sep 21 07:51:45 2016
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
SourcePackage: ceilometer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
James Page (james-page) wrote :
Changed in ceilometer (Ubuntu):
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :

Running ceilometer-api from the CLI:

$ ceilometer-api
Traceback (most recent call last):
  File "/usr/bin/ceilometer-api", line 20, in <module>
    server = wss.make_server('', args.port, load_app())
  File "/usr/lib/python2.7/dist-packages/ceilometer/api/app.py", line 85, in load_app
    cfg_file = CONF.find_file(cfg_path)
  File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2580, in find_file
    raise NotInitializedError()
oslo_config.cfg.NotInitializedError: call expression on parser has not been invoked

and from the systemd service:

Sep 21 10:55:02 adapted-tahr ceilometer-api[4932]: usage: ceilometer-api [-h] [--port PORT]
Sep 21 10:55:02 adapted-tahr ceilometer-api[4932]: ceilometer-api: error: unrecognized arguments: --config-file=/etc/ceilometer/ceilometer.conf --log-file=/var/log/ceilometer/ceilometer-api.log

Currently we pass in --config-file and --log-file - the new binary does not support these options.

Revision history for this message
Julien Danjou (jdanjou) wrote :

You can pass them by using --:

ceilometer-api -- --config-file=foobar

Changed in ceilometer:
status: New → Invalid
Revision history for this message
James Page (james-page) wrote :

This change requires a pbr version > 1.8 (current in yakkety development). Upstream is aligned with 1.10.0 in upper-constraints.txt; we should bump to that revision.

As the majority of packages in the archive that depend on pbr are openstack things, this should be low risk, as we are simply aligning version of pbr with upstream openstack.

Changed in ceilometer (Ubuntu):
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

> we are simply aligning version of pbr with upstream openstack.

Sounds good, please go ahead.

James Page (james-page)
Changed in python-pbr (Ubuntu):
importance: Undecided → High
assignee: nobody → Corey Bryant (corey.bryant)
status: New → Triaged
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks Martin. We've uploaded a new version of python-pbr to yakkety and it's in the review queue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceilometer - 1:7.0.0~rc2-0ubuntu1

---------------
ceilometer (1:7.0.0~rc2-0ubuntu1) yakkety; urgency=medium

  * New upstream release candidate for OpenStack Newton.
    - d/p/bug1624873.patch: Drop, included in new RC.
  * Fix issues due to switch to wsgi_script for ceilometer-api (LP: #1626006):
    - d/control: Set minimum version of python-pbr to 1.10.0 to ensure
      that useful wsgi_scripts are generated for ceilometer-api.
    - d/ceilometer-api.{service,init}.in: Switch to direct use of systemd
      unit file instead of relying on openstack-pkg-tools for generation of
      templated versions to ensure that configuration options are passed
      correctly to wsgi_script generated ceilometer-api.

 -- James Page <email address hidden> Fri, 23 Sep 2016 10:46:22 +0100

Changed in ceilometer (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pbr - 1.10.0-0ubuntu3

---------------
python-pbr (1.10.0-0ubuntu3) yakkety; urgency=medium

  * d/control, d/p/stop-gpg-agent.patch: Use psutil to stop gpg agent only
    if it's running.

 -- Corey Bryant <email address hidden> Tue, 04 Oct 2016 16:57:28 -0400

Changed in python-pbr (Ubuntu):
status: Triaged → 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.