gnocchi-upgrade fails: value required for option url in group indexer

Bug #1668590 reported by fengchaoyang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gnocchi
Invalid
Undecided
Unassigned

Bug Description

When I run devstack in master branch, got "gnocchi-upgrade" failed, my oslo.config version is 3.22.0,
2017-02-28 11:27:52.452 | mysql: [Warning] Using a password on the command line interface can be insecure.
2017-02-28 11:27:52.510 | ++lib/databases/mysql:recreate_database_mysql:58 mysql -uroot -p123456 -h10.0.2.15 -e 'CREATE DATABASE gnocchi CHARACTER SET utf8;'
2017-02-28 11:27:52.521 | mysql: [Warning] Using a password on the command line interface can be insecure.
2017-02-28 11:27:52.579 | ++/opt/stack/gnocchi/devstack/plugin.sh:init_gnocchi:336 /usr/local/bin/gnocchi-upgrade
2017-02-28 11:28:05.701 | Traceback (most recent call last):
2017-02-28 11:28:05.702 | File "/usr/local/bin/gnocchi-upgrade", line 10, in <module>
2017-02-28 11:28:05.702 | sys.exit(upgrade())
2017-02-28 11:28:05.703 | File "/opt/stack/gnocchi/gnocchi/cli.py", line 62, in upgrade
2017-02-28 11:28:05.713 | conf = service.prepare_service(conf=conf)
2017-02-28 11:28:05.714 | File "/opt/stack/gnocchi/gnocchi/service.py", line 60, in prepare_service
2017-02-28 11:28:05.716 | version=pbr.version.VersionInfo('gnocchi').version_string())
2017-02-28 11:28:05.717 | File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2341, in __call__
2017-02-28 11:28:05.721 | self._check_required_opts()
2017-02-28 11:28:05.723 | File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2944, in _check_required_opts
2017-02-28 11:28:05.727 | raise RequiredOptError(opt.name, group)
2017-02-28 11:28:05.728 | oslo_config.cfg.RequiredOptError: value required for option url in group [indexer]
2017-02-28 11:28:05.941 | +/opt/stack/gnocchi/devstack/plugin.sh:init_gnocchi:1 exit_trap
2017-02-28 11:28:05.976 | +./stack.sh:exit_trap:487 local r=1
2017-02-28 11:28:06.003 | ++./stack.sh:exit_trap:488 jobs -p
2017-02-28 11:28:06.039 | +./stack.sh:exit_trap:488 jobs=
2017-02-28 11:28:06.084 | +./stack.sh:exit_trap:491 [[ -n '' ]]
2017-02-28 11:28:06.121 | +./stack.sh:exit_trap:497 kill_spinner
2017-02-28 11:28:06.160 | +./stack.sh:kill_spinner:383 '[' '!' -z '' ']'
2017-02-28 11:28:06.201 | +./stack.sh:exit_trap:499 [[ 1 -ne 0 ]]
2017-02-28 11:28:06.231 | +./stack.sh:exit_trap:500 echo 'Error on exit'
2017-02-28 11:28:06.232 | Error on exit
2017-02-28 11:28:06.270 | +./stack.sh:exit_trap:501 generate-subunit 1488278529 2757 fail
2017-02-28 11:28:08.206 | +./stack.sh:exit_trap:502 [[ -z /opt/stack/logs ]]
2017-02-28 11:28:08.241 | +./stack.sh:exit_trap:505 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
2017-02-28 11:28:28.991 | +./stack.sh:exit_trap:511 exit 1

$ cat /etc/gnocchi/gnocchi.conf

[DEFAULT]
debug = True

[storage]
file_basepath = /opt/stack/data/gnocchi/
driver = file
coordination_url = redis://localhost:6379

[statsd]
user_id = 831c3baa-1c6b-4ada-9b16-4df042eacaf2
project_id = a2a02741-052a-4192-b2c1-d19c7fd12ce0
resource_id = 617f9437-45ea-44fa-acd1-05c8a39d3fed

[keystone_authtoken]
memcached_servers = 10.0.2.15:11211
signing_dir = /var/cache/gnocchi
cafile = /opt/stack/data/ca-bundle.pem
auth_uri = http://10.0.2.15/identity
project_domain_name = Default
project_name = service
user_domain_name = Default
password = 123456
username = gnocchi
auth_url = http://10.0.2.15/identity_admin
auth_type = password

[api]
auth_mode = keystone

[indexer]
url = mysql+pymysql://root:123456@10.0.2.15/gnocchi?charset=utf8

stack@fe:~/gnocchi/gnocchi$ gnocchi-upgrade
Traceback (most recent call last):
  File "/usr/local/bin/gnocchi-upgrade", line 10, in <module>
    sys.exit(upgrade())
  File "/opt/stack/gnocchi/gnocchi/cli.py", line 62, in upgrade
    conf = service.prepare_service(conf=conf)
  File "/opt/stack/gnocchi/gnocchi/service.py", line 60, in prepare_service
    version=pbr.version.VersionInfo('gnocchi').version_string())
  File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2357, in __call__
    self._check_required_opts()
  File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2960, in _check_required_opts
    raise RequiredOptError(opt.name, group)
oslo_config.cfg.RequiredOptError: value required for option url in group [indexer]

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

This is very odd. The option is set but it cannot see it?

summary: - gnocchi-upgrade fails to run "gnocchi-upgrade"
+ gnocchi-upgrade fails value required for option url in group indexer
summary: - gnocchi-upgrade fails value required for option url in group indexer
+ gnocchi-upgrade fails: value required for option url in group indexer
Changed in gnocchi:
status: New → Incomplete
Revision history for this message
fengchaoyang (fengchaoyang) wrote :

Embarrassing, because i have a /opt/stack/gnocchi.conf file :(

Changed in gnocchi:
status: Incomplete → Invalid
Revision history for this message
pablobrunetti (pablobrunetti) wrote :

This error occurs because this file oslo_config/cfg.py does not get "opt" correctly from function _check_required_opts .

I have corrected this error using:

# chmod 777 /etc/gnocchi/*

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.