Ask Your Question
0

Swift Unit Test Failing - Permission denied [closed]

asked 2014-05-07 16:52:18 -0500

shade34321 gravatar image

updated 2014-07-19 22:48:45 -0500

smaffulli gravatar image

I'm installing openstack following these instructions on Ubuntu 14.04 server. I've set it up using root:root as my user, yes I am aware of the security problems but it is mainly for me to test an application. The test is failing at

FAIL: test_os_error (test.unit.common.test_container_sync_realms.TestUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/swift/test/unit/common/test_container_sync_realms.py", line 51, in test_os_error
    "'%s'" % (fpath, fpath)]})
AssertionError: defaultdict(<type 'list'>, {}) != {'error': ["Could not load '/tmp/tmpn6LVrX/container-sync-realms.conf': [Errno 13] Permission denied: '/tmp/tmpn6LVrX/container-sync-realms.conf'"]}

I'm not quite sure why it is not able to access it since it is running as root. I probably missed a step but can't seem to figure out which one. Any suggestions? Thanks!

Below is the full output for the unit tests.

    ======================================================================
    FAIL: test_os_error (test.unit.common.test_container_sync_realms.TestUtils)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/root/swift/test/unit/common/test_container_sync_realms.py", line 51, in test_os_error
        "'%s'" % (fpath, fpath)]})
    AssertionError: defaultdict(<type 'list'>, {}) != {'error': ["Could not load '/tmp/tmpn6LVrX/container-sync-realms.conf': [Errno 13] Permission denied: '/tmp/tmpn6LVrX/container-sync-realms.conf'"]}

    Name                                       Stmts   Miss Branch BrMiss  Cover   Missing
    --------------------------------------------------------------------------------------
    swift                                         14      6      0      0    57%   28-34, 41
    swift.account                                  0      0      0      0   100%
    swift.account.auditor                         72     11     10      4    82%   57-70, 84-89
    swift.account.backend                        163      7     71      8    94%   48, 210, 216, 218, 313, 330, 385
    swift.account.reaper                         234     40     98     32    78%   82-84, 88-90, 94-96, 109-111, 131-132, 152, 156, 160, 164, 168, 243-248, 250-253, 255, 257, 259, 262, 264, 267, 270-273, 279, 352-353
    swift.account.server                         199     21     76      6    90%   120-121, 150, 230-240, 288-292, 301, 309-311
    swift.account.utils                           45      0     20      0   100%
    swift.cli                                      0      0      0      0   100%
    swift.cli.info                               111      1     44      1    99%   177
    swift.cli.recon                              602    483    294    265    17%   27-28, 58, 87, 91, 96, 139, 148, 170-176, 203-224, 241, 250-252, 264-276, 285-308, 317-336, 345-401, 410-456, 465-482, 491-529, 542-547, 556-622, 631-650, 659-678, 687-711, 720-794, 800-941, 945-949, 953
    swift.cli.ringbuilder                        530    316    254    157    40%   51, 74-75, 78-79, 95, 99-100, 108-110, 113-118, 126-128, 138-160, 163-165, 178-181, 184-186, 195-201, 207-208, 219-220, 227, 237-279, 286-315, 327-350, 374-375, 380, 384-387, 405-408, 416-419, 421-427, 452-455, 470-476, 484-505, 516, 519-522, 524-530, 542-545, 564-567, 572-574, 576-582, 586-598, 611-672, 679-680, 690-701, 711-747, 750-752, 762-763, 781-782, 787-790, 793-794, 808, 811-829, 836-837, 844, 847, 851-856, 862
    swift.common                                   0      0      0      0   100%
    swift.common.bufferedhttp                     70     11     20      6    81%   73-79, 120, 151-154
    swift.common.constraints                     108      1     43      0    99%   75
    swift.common.container_sync_realms            96      1     26      4    96%   58
    swift.common.daemon                           48      5     10      3    86%   49-51, 93, 97
    swift.common.db                              394     43    116     28    86%   54-56, 92, 100, 173-174, 279, 306, 336, 339, 365-366, 393-396, 431-437, 512, 533, 540-541, 548-550, 559-561, 569, 609-611, 637, 668-674, 708-711, 745
    swift.common.db_replicator                   413     30    143     23    90%   64, 260, 297-302, 311, 438, 447-448, 452-453, 476-477, 500, 555-564, 611, 614, 621, 631, 637, 646
    swift.common.direct_client                   208     47 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by smaffulli
close date 2014-07-19 22:49:46.352114

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-19 22:49:33 -0500

smaffulli gravatar image

Seems to be an issue while running as root. Changed everything over to use a normal user and ran it as a normal user and it worked fine.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-05-07 16:52:18 -0500

Seen: 376 times

Last updated: Jul 19 '14