Bug 1690086 - CephConfigOverrides is misleading and should have CephAnsibleExtraConfig
Summary: CephConfigOverrides is misleading and should have CephAnsibleExtraConfig
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: ndeevy
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
: 1547534 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-18 18:38 UTC by Scoots Hamilton
Modified: 2020-01-08 10:12 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-08 08:59:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scoots Hamilton 2019-03-18 18:38:10 UTC
Description of problem:

Current documentation for Ceph config overrides fails to be successfully implemented: 

Following instructions here: 

https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/html-single/deploying_an_overcloud_with_containerized_red_hat_ceph/#Configuring_Ceph_Storage_Cluster_Settings

Editing this file: /home/stack/templates/ceph-config.yaml

In the documented manner: 
parameter_defaults:
  CephConfigOverrides:
    KEY: VALUE

Results in the override value to show up in the [global] section of the config file, allowing the default values to overwrite that values in the [osd] section.


Version-Release number of selected component (if applicable):
12

How reproducible: 100%

Steps to Reproduce:
- Edit the file mentioned in the docs: /home/stack/templates/ceph-config.yaml
- Deploy Ceph 

Actual results:

EXAMPLE ceph-config.yml FILE: 

parameter_defaults:
  CephConfigOverrides:
    journal_size: 40960  <====== DESIRED CUSTOM VALUE 
    max_open_files: 262144 <====== CUSTOM VALUE
 

2. Resultant ceph.conf 
[global]
...
journal_size = 40960 <========= THE CUSTOM VALUE 
log file = /dev/null
max_open_files = 262144 <======= CUSTOM VALUE
mon cluster log file = /dev/null
osd_pool_default_pg_num = 128
osd_pool_default_pgp_num = 128
...

[osd]
osd journal size = 5120 <== DEFAULT VALUE WHICH OVERRIDES VALUE IN 
osd mkfs options xfs = -f -i size=2048
osd mkfs type = xfs
osd mount options xfs = noatime,largeio,inode64,swalloc

Expected results:
There is an expectation that following the documented steps will allow the user to specify a custom value in for their Ceph environment and that the value will be populated in correct sections to ensure implementation. 

Any value in the [global] section is second to a values in a service component section ([osd], [mon], [rgw], etc.)

Additional info:

Currently to work around this we modified the /usr/share/ceph-ansible/group_vars/all.yml and removed the default journal size value with the custom one: 

EX: journal_size: 40960 # OSD journal size in MB

This resulted in the desired outcome: 

[osd]
osd journal size = 40960

Comment 2 John Fulton 2019-03-20 13:41:17 UTC
(In reply to Scoots Hamilton from comment #0)
> Description of problem:
> 
> Current documentation for Ceph config overrides fails to be successfully
> implemented: 
> 
> Following instructions here: 
> 
> https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/
> html-single/deploying_an_overcloud_with_containerized_red_hat_ceph/
> #Configuring_Ceph_Storage_Cluster_Settings
> 
> Editing this file: /home/stack/templates/ceph-config.yaml
> 
> In the documented manner: 
> parameter_defaults:
>   CephConfigOverrides:
>     KEY: VALUE
> 
> Results in the override value to show up in the [global] section of the
> config file, allowing the default values to overwrite that values in the
> [osd] section.
> 
> 
> Version-Release number of selected component (if applicable):
> 12
> 
> How reproducible: 100%
> 
> Steps to Reproduce:
> - Edit the file mentioned in the docs: /home/stack/templates/ceph-config.yaml
> - Deploy Ceph 
> 
> Actual results:
> 
> EXAMPLE ceph-config.yml FILE: 
> 
> parameter_defaults:
>   CephConfigOverrides:
>     journal_size: 40960  <====== DESIRED CUSTOM VALUE 
>     max_open_files: 262144 <====== CUSTOM VALUE
>  
> 
> 2. Resultant ceph.conf 
> [global]
> ...
> journal_size = 40960 <========= THE CUSTOM VALUE 
> log file = /dev/null
> max_open_files = 262144 <======= CUSTOM VALUE
> mon cluster log file = /dev/null
> osd_pool_default_pg_num = 128
> osd_pool_default_pgp_num = 128
> ...
> 
> [osd]
> osd journal size = 5120 <== DEFAULT VALUE WHICH OVERRIDES VALUE IN 
> osd mkfs options xfs = -f -i size=2048
> osd mkfs type = xfs
> osd mount options xfs = noatime,largeio,inode64,swalloc
> 
> Expected results:
> There is an expectation that following the documented steps will allow the
> user to specify a custom value in for their Ceph environment and that the
> value will be populated in correct sections to ensure implementation. 
> 
> Any value in the [global] section is second to a values in a service
> component section ([osd], [mon], [rgw], etc.)

I think having the journal_size in this example documentation is misleading and I agree with you that it should be removed. 
The documentation does state:

"""
You can arbitrarily apply global Ceph cluster settings using the following syntax in the parameter_defaults section of your environment file: 

parameter_defaults:
  CephConfigOverrides:
    KEY: VALUE
"""

This is true, but the docs should emphasize that this ONLY applies to the [global] section and should only be used for variables in the global section. Perhaps it should have a warning that variables which would be set in the [osd] section shouldn't be set using this method. It should follow up to say that ceph-ansible has variables to modify other sections, e.g. the [osd] section, which you can override with the CephAnsibleExtraConfig and provide an example of that. I'll give an example below.
 
> Additional info:
> 
> Currently to work around this we modified the
> /usr/share/ceph-ansible/group_vars/all.yml and removed the default journal
> size value with the custom one: 

I see. Going forward, please never modify any values in /usr/share/ceph-ansible/group_vars/all.yml directly. Instead, any ceph-ansible variable that you would write in there can be overridden in a Heat environment file when using Director like this:

"""
parameter_defaults:
  CephAnsibleExtraConfig:
    journal_size: 40960
"""

The documentation didn't state that but it should. I'll request the same update as per this docbug. Thanks for pointing this out. 

> EX: journal_size: 40960 # OSD journal size in MB
> 
> This resulted in the desired outcome: 
> 
> [osd]
> osd journal size = 40960

Comment 5 John Fulton 2019-03-28 12:47:18 UTC
*** Bug 1547534 has been marked as a duplicate of this bug. ***

Comment 9 Giulio Fidente 2020-01-08 10:12:26 UTC
Note that from OSP16 it will be possible to provide custom key/values to use in any section of the Ceph config file [1], the related doc bug is [2]

1. https://bugzilla.redhat.com/show_bug.cgi?id=1666973
2. https://bugzilla.redhat.com/show_bug.cgi?id=1780757


Note You need to log in before you can comment on or make changes to this bug.