Add sudo to non-root account when deploying ceph

Bug #1668823 reported by wangwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Undecided
wangwei

Bug Description

Generally we specify the user is root when deploying ceph, it is no problem.
But if we have the need to use a non-root account, the deployment will fail because the non-root account can't use the mount command.The error is as follows:

"msg": "Error mounting /var/lib/ceph/osd/94744d03-d490-43cb-af08-91a4709c2bf5: mount: only root can mount UUID=94744d03-d490-43cb-af08-91a4709c2bf5 on /var/lib/ceph/osd/94744d03-d490-43cb-af08-91a4709c2bf5\n"

I think it is necessary to add sudo to non-root account, when we can't use the root account to deploy ceph because of security needs, we can use non-root account to deploy ceph.

wangwei (wangwei-david)
Changed in kolla-ansible:
assignee: nobody → wangwei (wangwei-david)
Changed in kolla-ansible:
status: New → In Progress
Revision history for this message
wangwei (wangwei-david) wrote :

I added sudo in ansible/roles/ceph/tasks/start_osds.yml.
This is url:
https://review.openstack.org/439297

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.openstack.org/439297
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=6f825382cad6ddd8a1ea08f6cf0dfa402d00c5fe
Submitter: Jenkins
Branch: master

commit 6f825382cad6ddd8a1ea08f6cf0dfa402d00c5fe
Author: wangwei <email address hidden>
Date: Tue Feb 28 22:06:15 2017 -0500

    Add sudo command for non-root account to mount osd

    Generally we specify the user is root when deploying ceph, it is no
    problem. But if we have the need to use a non-root account, the deployment
    will fail because the non-root account can't use the mount command.
    I think it is necessary to add sudo for non-root account, when we can't use
    the root account to deploy ceph because of security needs, we can use
    non-root account to deploy ceph.

    Change-Id: Iea1f30bcf8edbe15dc65909bbae780b55a669067
    Closes-Bug: #1668823

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 5.0.0.0b2

This issue was fixed in the openstack/kolla-ansible 5.0.0.0b2 development milestone.

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.