salt.utils.etcd_util emits an EtcdNotFile error (emits not a file to logs) when creating a directory (because it's not a file) #51537
Labels
Bug
broken, incorrect, or confusing behavior
P3
Priority 3
severity-low
4th level, cosemtic problems, work around exists
Milestone
Description of Issue/Question
salt.utils.etcd_util
doesn't properly distinguish between creating directories and files. When creating a directory withetcd.directory
(or anything else),salt.utils.etcd_util
stupidly outputs "$path not a file".Setup
Setup etcd somewhere.
Steps to Reproduce Issue
Simply call etcd.directory on a directory that already exists.
Versions Report
All of them, nobody seems to use
etcd
.Report
The issue is that all writes to etcd have been funnelled into a method off of the
salt.utils.etcd_util.EtcdClient
object. This method, .write(), takes a parameterdir
to distinguish between whether to resetvalue
toNone
or not and is later used to distinguish between the property types.This is fine, but when an exception is raised, the method does not bother to distinguish between the types of exceptions and thus an exception used to distinguish when a key exists (which occurs when applying states) an error gets passed through.
The text was updated successfully, but these errors were encountered: