-
Notifications
You must be signed in to change notification settings - Fork 41
SEP 23: Create salt-file-protocol-file-listing-details.md #31
SEP 23: Create salt-file-protocol-file-listing-details.md #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good idea, but checksumming every file is going to have a performance impact, and caching it will just move the problem elsewhere.
``` | ||
cp.list_master detail=True directories_only=False path=/ | ||
'.': | ||
Time: seconds since 1970 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is supposed to be last modification time? Not creation or last access.
I also assume this is Unix epoch time, in which case the precise specification is since 1970-01-01T00:00:00.000+00 excluding leap seconds.
Time: seconds since 1970 | ||
ETag: string/checksum | ||
Size: int | ||
Type: f(ile) or d(irectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about all the other types (b, c, l, p, s, D, J)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I am aware salt does not support other types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is cp.list_master_symlinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just because they are not currently supported doesn't mean the information shouldn't be collected
'file1': | ||
Time: seconds since 1970 | ||
ETag: string/checksum | ||
Size: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Python int
, not a C int
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to reflect a 64bit int.
|
||
# Drawbacks | ||
[drawbacks]: #drawbacks | ||
Their maybe compatibility issues between different versions of salt when introduced. As the salt:// protocol is not version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*There
*may be
*versioned
Type: d | ||
'file1': | ||
Time: seconds since 1970 | ||
ETag: string/checksum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of checksum?
If there's a security concern (e.g. compromised minion has file replaced by one with a different function but same checksum) then a SHA-2 or similar is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the doco, its not important to the minion, it does not need to calculated it.
I don't understand how this solves anything. The fileserver already maintains checksums of each served file, so that it can prevent transmitting unmodified files. |
Agreeing with terminalmage - do you have an example of the failures of the current process(es)? Also, this will be SEP 23, please update your filename/contents 👍 |
windows I am sure other items rsync ish operation with delete would benefit. e.g. |
This seems like an argument for improving
I don't know what you mean by "does not support with delete". But again, |
If I break down state file.recursive:
A lot of calls to the master, when this code could be simplified if more information was return in one hit, and less on going load for the Master. Minion could also cache the information. The master already cache the checksum results, minion does not, and could which would save cpu on the minion. That's what eTag, which is the standard use for HTTP. The browser keeps record of the eTag it has no idea what it is, other than the file has changed if the eTag does not match. |
I think there's probably an argument that we can create a new fileclient call that returns most of what the minion needs for a |
ETags work because the files can only change on the server. |
Your write to an extend, /var/cache/salt/minion/ manged by the minion like a browser manages its own cache, files outside of this could be altered by a person/batch/script. cp.cache_file uses /var/cache/salt/minion/ only. The files /var/cache/salt/minion/ are check against the target files on the system. Looking at the code all files go via /var/cache/salt/minion/ and not direct to their final location. As minion owns /var/cache/salt/minion/ and manages it, eTag is approach is fine. People/tasks/jobs do not change the files within /var/cache/salt/minion/ |
@damon-atkins we are moving this into the |
I do not believe that there is a coherently-communicated need here, so I would vote "no" on this. |
The point of putting this up was to, have discussion to resolve the issues:
I am happy for salt team to update the proposal if their is a better solution. |
Looking for rough consensus and details of implementation can be hammered out in a planning session |
Has this proposal been accepted or rejected? This is not clear from any of the approvals or responses from the salt team. |
I think we need 1 more approval from a member of the core team before it can be accepted. |
There doesn't seem to have been a lot of discussion in this issue on why it has been accepted by the core team, only a lot of community involvement. When specifically asked about for information about if it should be accepted, one former core team member who has offered compelling reasons not to do this. Can the anyone provide any information about why it is being accepted? |
Also a current core team member who appears to agree with that former core team members assessment that this isn't a great idea to implement. #31 (comment) |
People are approving in general the master needs to provide more information in one hit (if requested too), so the client can be smarter and hence reduce the number of requests required to perform a recursive rsync. More requests against the master results in more load against the master. The current code on the master tries to cache the list of files for short period time, a better method of caching could also be used for providing the extra information on each file. |
Hey @damon-atkins - we just discussed this again in a team meeting and I
To fully accept this SEP, I think that:
|
@waynew It should not be rushed, it shoud be well thought out. I will try and cover off the items you mention. |
Hi all, sorry for the hiatus - we're renewing our SEP focus to get these open ones through the process To summarize the current discussion: The discussion has been split about whether or not this SEP has any effect, or if it's just an alternate form of the existing behavior. While at one point I was convinced that the SEP was useful, that discussion and information wasn't captured here in this SEP. Assuming that past-me had better information than past-past-me, and made a more informed decision, that information should be captured within this SEP, as mentioned in my last comment. If progress is made, we can go ahead and approve the SEP, otherwise we'll go ahead and mark it as abandoned until someone would like to pick it back up. |
So, I still remember that something convinced me that this was a good idea. But we also lack that information here in the SEP. For now we're going to close this SEP as Abandoned. To re-open or if someone recreates this as a new SEP, some discussion points that were unresolved:
This SEP is Abandoned - feel free to either pick it back up yourself, or if anyone else is interested they can address these points in the SEP and open a new PR 👍 |
Adding SEP for proposed for having more information returned about files within salt:// so copies/sync from the master can be completed in a more efficient way.