init-runonce forces deployer to use sudo(unnecessarily)

Bug #1732963 reported by Ravi Shekhar Jethani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Ravi Shekhar Jethani

Bug Description

After deploying we have an option to use 'init-runonce' tool for doing simple testing of the setup we just deployed. In the script we are switching[1] from current directory to the base directory of the tool(/usr/...) itself.

As a result the cirros test image is being downloaded in /usr/... this although not causing any critical issue but is forcing the deployer to unnecessarily use sudo to run the tool and letting all of the script code to have elevated privileges(not good!!).

Also downloading some temporary stuff in places like /usr/... is not a good practice.

[1]: https://git.openstack.org/cgit/openstack/kolla-ansible/tree/tools/init-runonce#n32

Changed in kolla-ansible:
assignee: nobody → Ravi Shekhar Jethani (ravishekar-jethani)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

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

Changed in kolla-ansible:
status: New → In Progress
Changed in kolla-ansible:
importance: Undecided → Medium
milestone: none → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.openstack.org/521190
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=9c66123c3056bab72830c7c20e66274cb6d58d34
Submitter: Zuul
Branch: master

commit 9c66123c3056bab72830c7c20e66274cb6d58d34
Author: Ravi Shekhar Jethani <email address hidden>
Date: Sat Nov 18 01:47:45 2017 +0530

    Don't change directory while running init-runonce

    Currently init-runonce script changes directory to the
    script's base directory (/usr/...) before doing anything else.
    This unnecessarily _forces_ a non-root user to use sudo for
    running this script thereby raising privileges for code which
    doesn't want it. Also downloading temporary stuff in places like
    /usr... seems not a good choice.

    Hence deleting the said code part and letting the deployer work
    comfortably from any directory.

    Made documentation changes accordingly.

    Change-Id: Ib3c7ed97aa5f53c115b6337aaf572b5fdc7a71f3
    Closes-Bug: #1732963

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 6.0.0.0b2

This issue was fixed in the openstack/kolla-ansible 6.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.