Refstack_client: Reports misleading error information when the config file has file permission issues

Bug #1692587 reported by Rama Krishna Bhupathi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
refstack
Fix Released
Undecided
Paul Van Eck

Bug Description

When running Refstack as in

./refstack-client test -c /home/stack/tempest_region1.conf -v -- --regex tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token

and if the file /home/stack/tempest_region1.conf is owned by root or some other user and cannot be opened it for any reason , the refstack client claims that "[identity]" is missing in the file . This is highly misleading .

Instead put a a more accurate message "File cannot be opened" or "File Permission Denied"

Revision history for this message
Paul Van Eck (pvaneck-z) wrote :

Good catch. I will submit a patch to address this.

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

Reviewed: https://review.openstack.org/467432
Committed: https://git.openstack.org/cgit/openstack/refstack-client/commit/?id=770acc77652fe07593e8034f2212c732e319f72b
Submitter: Jenkins
Branch: master

commit 770acc77652fe07593e8034f2212c732e319f72b
Author: Paul Van Eck <email address hidden>
Date: Tue May 23 18:17:38 2017 -0700

    Check conf file permission

    Since SafeConfigParser.read doesn't thrown an exception
    when a file can not be opened, we must explicitly check first.

    Change-Id: Ifa5c58e5c30323956a401beae9396ffb0b97dbd9
    Closes-Bug: #1692587

Changed in refstack:
status: New → Fix Released
Catherine Diep (cdiep)
Changed in refstack:
assignee: nobody → Paul Van Eck (pvaneck-z)
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.