tools/config/generate_sample.sh has no effect on OS X

Bug #1324610 reported by Dolph Mathews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Dolph Mathews
oslo-incubator
Won't Fix
Wishlist
Unassigned

Bug Description

Running tools/config/generate_sample.sh doesn't produce a sample conf for me, no matter how I execute it (with or without tox, with a fresh tox env, etc).

(os)keystone $ rm etc/keystone.conf.sample
(os)keystone $ tox -esample_config
sample_config develop-inst-nodeps: /Users/dolph/Projects/keystone
sample_config runtests: commands[0] | /Users/dolph/Projects/keystone/tools/config/generate_sample.sh
___________________________________________________________________________________________ summary ___________________________________________________________________________________________
  sample_config: commands succeeded
  congratulations :)
(os)keystone $ ls -l etc/
total 144
-rw-r--r-- 1 dolph staff 1540 Apr 21 07:14 default_catalog.templates
drwxr-xr-x 4 dolph staff 136 May 29 10:17 keystone
-rw-r--r-- 1 dolph staff 3635 Apr 21 07:14 keystone-paste.ini
-rw-r--r-- 1 dolph staff 38278 Apr 29 10:21 keystone.conf
-rw-r--r-- 1 dolph staff 1046 Apr 21 07:14 logging.conf.sample
-rw-r--r-- 1 dolph staff 6397 Apr 21 07:14 policy.json
-rw-r--r-- 1 dolph staff 9032 Apr 21 07:14 policy.v3cloudsample.json
(os)keystone $

Note the lack of any keystone.conf.sample!

This is on OS X 10.9.3 with:

$ bash --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

We don't really support using this tool on OS X. It should be possible to make it work, but as that's not a platform we use for OpenStack development it hasn't been a priority.

Changed in oslo:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Weird,

seems to work for me

dims@dims-mac:~/openstack/keystone$ rm etc/keystone.conf.sample
dims@dims-mac:~/openstack/keystone$ tox -esample_config
sample_config create: /Users/dims/openstack/keystone/.tox/venv
sample_config installdeps: -r/Users/dims/openstack/keystone/requirements.txt, -r/Users/dims/openstack/keystone/test-requirements.txt
sample_config develop-inst: /Users/dims/openstack/keystone
sample_config runtests: PYTHONHASHSEED='3507724222'
sample_config runtests: commands[0] | /Users/dims/openstack/keystone/tools/config/generate_sample.sh
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
  sample_config: commands succeeded
  congratulations :)
dims@dims-mac:~/openstack/keystone$ ls -l etc/
total 144
-rw-r--r-- 1 dims staff 1540 May 5 09:42 default_catalog.templates
-rw-r--r-- 1 dims staff 3635 May 5 09:42 keystone-paste.ini
-rw-r--r-- 1 dims staff 38276 May 30 12:52 keystone.conf.sample
-rw-r--r-- 1 dims staff 1046 May 5 09:42 logging.conf.sample
-rw-r--r-- 1 dims staff 6397 May 5 09:42 policy.json
-rw-r--r-- 1 dims staff 9032 May 5 09:42 policy.v3cloudsample.json
dims@dims-mac:~/openstack/keystone$ bash --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The version of the config generator in oslo.config should work as long as the modules can be imported, so I'm going to close this wontfix.

Changed in oslo:
status: Triaged → Won't Fix
Revision history for this message
Dolph Mathews (dolph) wrote :

Adding keystone here then, so we can switch from the shell version (which does not work on OS X) to the python version (which does work on OS X).

Changed in keystone:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/113905

Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
status: Triaged → In Progress
Changed in keystone:
assignee: Dolph Mathews (dolph) → Brant Knudson (blk-u)
Revision history for this message
Dolph Mathews (dolph) wrote :

The fix above is effectively blocked by a fix for https://bugs.launchpad.net/oslo.config/+bug/1356591

Changed in keystone:
assignee: Brant Knudson (blk-u) → Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Brant Knudson (blk-u)
Brant Knudson (blk-u)
Changed in keystone:
assignee: Brant Knudson (blk-u) → Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → Brant Knudson (blk-u)
Brant Knudson (blk-u)
Changed in keystone:
assignee: Brant Knudson (blk-u) → Dolph Mathews (dolph)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/113905
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=083d1cd5223067ec616e715b7d7cdd213fdb8cb4
Submitter: Jenkins
Branch: master

commit 083d1cd5223067ec616e715b7d7cdd213fdb8cb4
Author: Dolph Mathews <email address hidden>
Date: Wed Aug 13 09:13:04 2014 -0500

    switch from sample_config.sh to oslo-config-generator

    This switches keystone to use oslo-config-generator, where the contents
    of our sample configuration file are configured using a configuration
    file in config-generators/, because the only way to have tox create
    files is to have configuration files for your configuration files
    (seriously, it chokes when redirects are included in the command for a
    test environment).

    This also takes advantage of oslo-config-generator's ability to set the
    line wrap width, which is done at 79 chars here to match the rest of our
    code.

    Also update the actual sample file under etc/

    Change-Id: I9f9a157c7802c56a2c7484f6f4adec4aeb4071b8
    Closes-Bug: 1324610

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → kilo-2
importance: Low → Wishlist
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-2 → 2015.1.0
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.