Bug 963441

Summary: powertop2tuned: crash if there is a file with the same name as the new profile
Product: [Fedora] Fedora Reporter: Jaroslav Škarvada <jskarvad>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jkaluza, jskarvad, jv+fedora, rvokal, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 10:12:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jaroslav Škarvada 2013-05-15 19:47:25 UTC
Description of problem:
powertop2tuned: crash if there is a file with the same name as the new profile

Version-Release number of selected component (if applicable):
tuned-2.2.2-1.1.fc19.noarch

How reproducible:
Always

Steps to Reproduce:
1. touch /etc/tuned/test-profile
2. powertop2tuned --force test-profile
  
Actual results:
powertop2tuned --force test-profile
Running PowerTOP, please wait...
Generating shell script /etc/tuned/test-profile/script.sh
Traceback (most recent call last):
  File "/bin/powertop2tuned", line 321, in <module>
    sys.exit(p.generate(args['new_profile'], args['merge_profile'], args['enable']))
  File "/bin/powertop2tuned", line 283, in generate
    if not self.generateShellScript(data):
  File "/bin/powertop2tuned", line 229, in generateShellScript
    f = codecs.open(os.path.join(self.output, "script.sh"), "w", "utf-8")
  File "/usr/lib64/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 20] Not a directory: u'/etc/tuned/test-profile/script.sh'


Expected results:
No crash.

Additional info:

Comment 1 Fedora End Of Life 2013-09-16 13:56:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 2 Jaroslav Škarvada 2013-11-06 17:26:32 UTC
Moving to rawhide.

Comment 3 Jaroslav Škarvada 2013-11-06 17:45:36 UTC
Fixed by upstream commit:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=c55e4385c324a834806a3cb42735e242176d23da

Comment 4 Jaroslav Reznik 2015-03-03 17:07:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 5 Mike McCune 2016-03-28 22:49:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 Fedora End Of Life 2016-07-19 10:12:21 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.