worlddump.py not run with appropriate privileges

Bug #2037397 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
In Progress
Low
Unassigned

Bug Description

In the event of failure, recording the failure may currently also fail:
+ lib/neutron_plugins/services/l3:_neutron_configure_router_v4:1 : exit_trap
+ ./stack.sh:exit_trap:545 : local r=1
++ ./stack.sh:exit_trap:546 : jobs -p
+ ./stack.sh:exit_trap:546 : jobs=146679
+ ./stack.sh:exit_trap:549 : [[ -n 146679 ]]
+ ./stack.sh:exit_trap:549 : [[ -n /opt/stack/logs/devstacklog.txt.2023-09-26-091252 ]]
+ ./stack.sh:exit_trap:549 : [[ True == \T\r\u\e ]]
+ ./stack.sh:exit_trap:550 : echo 'exit_trap: cleaning up child processes'
exit_trap: cleaning up child processes
+ ./stack.sh:exit_trap:551 : kill 146679
+ ./stack.sh:exit_trap:555 : '[' -f /tmp/tmp.RxcW45T4cH ']'
+ ./stack.sh:exit_trap:556 : rm /tmp/tmp.RxcW45T4cH
+ ./stack.sh:exit_trap:560 : kill_spinner
+ ./stack.sh:kill_spinner:455 : '[' '!' -z '' ']'
+ ./stack.sh:exit_trap:562 : [[ 1 -ne 0 ]]
+ ./stack.sh:exit_trap:563 : echo 'Error on exit'
Error on exit
+ ./stack.sh:exit_trap:565 : type -p generate-subunit
+ ./stack.sh:exit_trap:566 : generate-subunit 1695719569 339 fail
+ ./stack.sh:exit_trap:568 : [[ -z /opt/stack/logs ]]
+ ./stack.sh:exit_trap:571 : /opt/stack/data/venv/bin/python3 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
Traceback (most recent call last):
  File "/opt/stack/devstack/tools/worlddump.py", line 271, in <module>
    sys.exit(main())
  File "/opt/stack/devstack/tools/worlddump.py", line 248, in main
    with io.open(fname, 'w') as f:
PermissionError: [Errno 13] Permission denied: '/opt/stack/logs/worlddump-2023-09-26-091828.txt'

$ ls -ld /opt/stack/logs
drwxr-xr-x 3 root root 4096 Sep 26 09:33 /opt/stack/logs

Frode Nordahl (fnordahl)
summary: - worlddump.py not run with appropriate permissions
+ worlddump.py not run with appropriate privileges
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/devstack/+/896502

Changed in devstack:
status: New → In Progress
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

the log directory should be writeable be the stack user, it seems that somehow the permissions get mangled while devstack is running

Changed in devstack:
importance: Undecided → Low
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.