Bug 1408848 - [RFE] Alert user to set $CEPH_CONF var if cluster name is non-default
Summary: [RFE] Alert user to set $CEPH_CONF var if cluster name is non-default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: ceph-ansible
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 2
Assignee: Sébastien Han
QA Contact: Vidushi Mishra
Erin Donnelly
URL:
Whiteboard:
Depends On:
Blocks: 1437916
TreeView+ depends on / blocked
 
Reported: 2016-12-27 17:26 UTC by Kyle Squizzato
Modified: 2020-02-14 18:23 UTC (History)
10 users (show)

Fixed In Version: ceph-ansible-2.2.1-1.el7scon
Doc Type: Enhancement
Doc Text:
.Use CEPH_ARGS to ensure all commands work for clusters with unique names In Red Hat Ceph Storage, the `cluster` variable `in group_vars/all` determines the name of the cluster. Changing the default value to something else means that all the command line calls need to be changed as well. For example, if the cluster name is `foo`, then `ceph health` becomes `ceph --cluster foo health`. An easier way to handle this is to use the environment variable `CEPH_ARGS`. In this case, run `export CEPH_ARGS="--cluster foo"`. With that, you can run all command line calls normally.
Clone Of:
Environment:
Last Closed: 2017-06-19 13:16:21 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2837311 0 None None None 2016-12-27 17:50:53 UTC
Red Hat Product Errata RHBA-2017:1496 0 normal SHIPPED_LIVE ceph-installer, ceph-ansible, and ceph-iscsi-ansible update 2017-06-19 17:14:02 UTC

Description Kyle Squizzato 2016-12-27 17:26:42 UTC
Description of problem:
If the user decides to change the cluster name to a non-default other than 'ceph' and is unfamiliar with the $CEPH_CONF environmental variable, all of the ceph commands in the cluster refuse to work as they're looking for a ceph config under /etc/ceph/ceph.conf, while the ceph-ansible playbook appropriately names the config after the cluster name.

Version-Release number of selected component (if applicable):
ceph-ansible-1.0.5-46.el7scon.noarch 

How reproducible:
Always

Steps to Reproduce:
1. Change the 'cluster:' line from 'ceph' to something else in group_vars/all
2. Run the ceph-ansible playbook 

Actual results:
ceph commands do not work on cluster creation, stating no config found; users new to ceph may not understand what's occurring and may believe they're clusters are broken.  

Expected results:
Alert users to utilize $CEPH_CONF var 

Additional info:
While it'd be nice to set the env variable for users automatically, we'd probably only be able to set it for the root/ceph users and future users that are created would all need the variable to be added to their shell profiles in order to function.

I feel the better way to handle this is to alert the user of the option on playbook completion, or if they're using RHSC within the web UI that a 'non-default' cluster name was used and point them at the documentation containing the $CEPH_CONF var.

Comment 1 Kyle Squizzato 2016-12-27 17:41:52 UTC
(In reply to Kyle Squizzato from comment #0)
> Additional info:
> While it'd be nice to set the env variable for users automatically, we'd
> probably only be able to set it for the root/ceph users and future users
> that are created would all need the variable to be added to their shell
> profiles in order to function.

It's worth noting we could use /etc/profile here as well, but I'm a bigger fan of the "let the user handle it" approach.

Comment 2 seb 2017-01-02 08:07:38 UTC
Even so what you're saying is right this is difficult to achieve in Ansible. We cannot write an "info" message at the end of the play but only during the execution. This means the "info" message will be drowned by all the others messages. The only thing we can do is to write a doc section about this and put a comment in the code right after "cluster" in group_vars/all.yml.

What do you think Kyle?

Comment 4 Andrew Schoen 2017-03-03 17:25:06 UTC
This should be in the next release after the 2.1 series.

Comment 5 Andrew Schoen 2017-03-03 17:27:36 UTC
This should be in the next release after the 2.1 series.

Comment 9 seb 2017-06-15 16:28:13 UTC
Added doc text, let me know if that works for you.

Comment 11 seb 2017-06-16 08:14:47 UTC
LGTM :)

Comment 13 errata-xmlrpc 2017-06-19 13:16:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1496


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