tripleo-image-elements/elements/glance
Victor Lowther b1197b3819 Have all os-refresh-config elements use su instead of sudo
Using sudo -u to change users for a command can fail if sudo thinks it needs
a controlling TTY as part of its authentication.  Since this is the default config,
that means that whenever the command is run in an environment that does not have
a TTY (such as from init(1)), sudo will die.

su does not care or check for a controlling TTY, so it will succeed as long as
it is being run by root (which should be the case for all os-refresh-config elements).

Therefore, instead of using sudo -u <username> -- <command> to run commands as other
users, use su -s /bin/bash -c "<command>" <username>

This will allow things to function in the face of a misconfigured sudo as well as
allow commands to run against an account that has been locked out or has a shell
that otherwise restricts what commands can be run.

Change-Id: I5cc518ce42536a09e9f25c6635e191884aaaef92
2015-05-19 16:47:18 -04:00
..
cleanup.d Remove /opt/stack/{repo} files 2015-02-03 09:50:31 +00:00
environment.d Wire in _EXTRA_INSTALL_OPTS... 2014-04-19 08:08:45 -04:00
install.d Migrates glance element from map-services to svc-map 2014-10-20 14:25:01 -04:00
os-apply-config/etc/glance Check stunnel.connect_host not stunnel.connect_ip 2014-11-13 09:34:31 +00:00
os-refresh-config Have all os-refresh-config elements use su instead of sudo 2015-05-19 16:47:18 -04:00
element-deps Merge "Run migrations from only the bootstrap host" 2014-07-22 13:02:43 +00:00
README.md Properly format markdown code blocks 2014-11-12 10:31:01 +09:00
source-repository-glance Use openstack git repos when possible 2013-11-15 10:48:11 +02:00
svc-map Migrates glance element from map-services to svc-map 2014-10-20 14:25:01 -04:00

Install and configure Glance.

Configuration

glance:
    db: mysql://glance:unset@localhost/glance
      - SQLAlchemy database connection string
    service-password: password
      - The service password for the glance user
    api:
        verbose: False
          - Show more verbose log output (sets INFO log level output)
        debug: False
          - Show debugging output in logs (sets DEBUG log level output)
        backend: swift
          - The backend store to use
        swift-store-user: service:glance
        swift-store-key:  userpassword
          - The credentials to use against swift if using the swift backend.
        workers: 1
          - The number of Glance API server processes to start.
        notifier-strategy: noop
          - Strategy to use for notification queue.
        log-file: ''
          - The path of the file to use for logging messages from Glances API server.
          - The default is unset, which implies stdout.
        default-log-levels:
          - Logging: fine tune default log levels
    registry:
        verbose: False
          - Show more verbose log output (sets INFO log level output)
        debug: False
          - Show debugging output in logs (sets DEBUG log level output)
        log-file: ''
          - The path of the file to use for logging messages from Glances Registry server.
          - The default is unset, which implies stdout.
        default-log-levels:
          - Logging: fine tune default log levels