Ask Your Question

Revision history [back]

I managed to "work around" the issue with the help from the redhat documentation on deploying openstack, which tells us to use sudo openstack-db --init --service keystone --password PASSWORD

I had to run sudo /usr/bin/openstack-db --drop --service keystone first, then run sudo openstack-db --init --service keystone --password KEYSTONE_USER_PASSWORD

which then resulted in the following error output:

Verified connectivity to MySQL.
Creating 'keystone' database.
Updating 'keystone' database password in /etc/keystone/keystone.conf
Initializing the keystone database, please wait...
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 51, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 189, in main
    config.setup_logging()
  File "/usr/lib/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
    log.setup('keystone')
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 525, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(logpath)
  File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
    stream = open(self.baseFilename, self.mode)

It looked like it was having accessing the logs, so i ran: sudo chmod 777 /var/log/keystone/keystone.log

before running the previous two commands again (drop and init) and it worked.

This feels very "wrong" and would love to not have to be editing the permissions of the log file, and be able to run these commands in a script in which I pass the relevant passwords, rather than having an interactive prompt asking the user to enter the root password a few times.

I managed to "work around" the issue with the help from the redhat documentation on deploying openstack, which tells us to use sudo openstack-db --init --service keystone --password PASSWORD

I had to run sudo /usr/bin/openstack-db --drop --service keystone first, then run sudo openstack-db --init --service keystone --password KEYSTONE_USER_PASSWORD

which then resulted in the following error output:

Verified connectivity to MySQL.
Creating 'keystone' database.
Updating 'keystone' database password in /etc/keystone/keystone.conf
Initializing the keystone database, please wait...
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 51, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 189, in main
    config.setup_logging()
  File "/usr/lib/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
    log.setup('keystone')
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 525, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(logpath)
  File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
    stream = open(self.baseFilename, self.mode)

It looked like it was having accessing the logs, so i ran: sudo chmod 777 /var/log/keystone/keystone.log

before running the previous two commands again (drop and init) and it worked.

This feels very "wrong" and would love to not have to be editing the permissions of the log file, and be able to run these commands in a script in which I pass the relevant passwords, rather than having an interactive prompt asking the user to enter the root password a few times.

times. I am guessing that the fact that I am not going through the installation as the root user is throwing a spanner in the works?

I managed to "work around" the issue with the help from the redhat documentation on deploying openstack, which tells us to use sudo openstack-db --init --service keystone --password PASSWORD

I had to run sudo /usr/bin/openstack-db --drop --service keystone first, then run sudo openstack-db --init --service keystone --password KEYSTONE_USER_PASSWORD

which then resulted in the following error output:

Verified connectivity to MySQL.
Creating 'keystone' database.
Updating 'keystone' database password in /etc/keystone/keystone.conf
Initializing the keystone database, please wait...
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 51, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 189, in main
    config.setup_logging()
  File "/usr/lib/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
    log.setup('keystone')
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 525, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(logpath)
  File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
    stream = open(self.baseFilename, self.mode)

It looked like it was having accessing the logs, so i ran: sudo chmod 777 /var/log/keystone/keystone.log

before running the previous two commands again (drop and init) and it worked.

This feels very "wrong" and would love to not have to be wrong with editing the permissions of the log file, and be able to run these commands in would rather find a script in which I pass the relevant passwords, rather than having an interactive prompt asking the user to enter the root password a few times. I am guessing that the fact that I am not going through the installation as the root user is throwing a spanner in the works?

solution to get the original command in the icehouse documentation working.