Fuel CLI can not be run by non-root user

Bug #1355876 reported by Alexander Maretskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Dmitry Pyzhov

Bug Description

api: '1.0'
astute_sha: b52910642d6de941444901b0f20e95ebbcb2b2e9
auth_required: true
build_id: 2014-08-12_10-52-56
build_number: '425'
feature_groups:
- mirantis
fuellib_sha: 54d834afccf1f8a97e4a82d7d081e7d1a1e068a1
fuelmain_sha: 9d4463400b4924159c978af43855e48bcf2a84b2
nailgun_sha: c7e00e5a00499d9f8dec608541dad1d745a8dd2e
ostf_sha: d2a894d228c1f3c22595a77f04b1e00d09d8e463
production: docker
release: '5.1'

Steps to reproduce:
  * having fuel node installed
  * add new non-root user and make login
  * run "fuel" CLI with arbitrary option (let it be "fuel env")

Expected:
  * output without errors

Actual:
$ fuel env
Traceback (most recent call last):
  File "/usr/bin/fuel", line 9, in <module>
    load_entry_point('fuelclient==0.2', 'console_scripts', 'fuel')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/parser.py", line 18, in <module>
    from fuelclient.cli.actions import actions
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/__init__.py", line 19, in <module>
    from fuelclient.cli.actions.deploy import DeployChangesAction
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/deploy.py", line 16, in <module>
    from fuelclient.cli.actions.base import Action
  File "/usr/lib/python2.6/site-packages/fuelclient/cli/actions/base.py", line 22, in <module>
    from fuelclient.client import APIClient
  File "/usr/lib/python2.6/site-packages/fuelclient/client.py", line 190, in <module>
    APIClient = Client()
  File "/usr/lib/python2.6/site-packages/fuelclient/client.py", line 48, in __init__
    with open(path_to_config, "r") as fh:
IOError: [Errno 13] Permission denied: '/etc/fuel/client/config.yaml'

NOTE:
  1) this is just a permission issue, the "chmod 644 /etc/fuel/client/config.yaml" solves the problem
  2) this problem is critical for auto-testing, when we deploy iso, then install and run some testing scripts (e.g. rally and tempest) - we also need to run fuel cli to obtain some data

Changed in fuel:
importance: Undecided → Medium
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 6.0
Dima Shulyak (dshulyak)
Changed in fuel:
status: New → Confirmed
tags: added: release-notes
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Dmitry Pyzhov (dpyzhov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/135039
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=5c9e53737c1b21e03ab9b272ff9796694a4787ff
Submitter: Jenkins
Branch: master

commit 5c9e53737c1b21e03ab9b272ff9796694a4787ff
Author: Dmitry Pyzhov <email address hidden>
Date: Mon Nov 17 20:54:52 2014 +0300

    Do not fail if client config file is not readable

    Also make environment variables to have higher priority then config
    file.

    DocImpact
    Change-Id: Ib4a395794bf08cda1307008005f6064198e36be8
    Closes-Bug: #1355876
    Closes-Bug: #1393750

Changed in fuel:
status: In Progress → Fix Committed
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.