pip.install's log
param should permit a new file to be created
#44722
Labels
Bug
broken, incorrect, or confusing behavior
Core
relates to code central or existential to Salt
Execution-Module
severity-medium
3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description of Issue/Question
When using the
pip.installed
state and specifying alog
parameter the state will fail if the log file does not yet exist. If the log file does not exist and the parent directory is writable thenpip.installed
should create the file.The issue is in the underlying
pip.install
execution module function.Setup / Steps to Reproduce Issue
I'm trying to install Gnocchi via pip:
I want to be able to dynamically create a new log file during each pip install. The above should create a
/opt/gnocchi/pip-install-gnocchi-{{ gnocchi_version }}.log
log file during a highstate, but it does not, and fails with the following error:If I simply touch the log file before highstating then it succeeds:
The problem seems to have been introduced with PR #29470, which added permission checks to
pip.install
. The check verifies write access to an existing file, but does not check if the file exists or not. There should be an additional check to see if the file does not exist and then verify that the parent directory is writable.Versions Report
I'm on
2016.11
but the issue exists indevelop
as well.The text was updated successfully, but these errors were encountered: