MANOPD-84031 Input files encoding rework and non-ASCII upload #346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are many places in KubeMarine where there can be an attempt to upload non-ASCII characters. This does not work because of issue paramiko/paramiko#1133
The problem is especially relevant for custom template plugins.
Fixes #342
Solution
NodeGroup.put
now uploads data only as stream of bytes, not characters.config
files for plugins withdo_render=False
.binary
parameter for thirdparties as uploading from filesystem is not supported for external thirdparties.services.packages.package_manager.repositories
: now it allows input as path to file for both apt and yum package managers.Breaking changes
If
services.packages.package_manager.repositories
for Debian-based cluster was passed as string, it will stop working as the string is now considered as path to file. No longer working configuration:New working configuration:
where files/predefined.list contains the repositories.
Test Cases
See #342
Checklist
Unit tests
test_demo.py and demo.py to adopt to new upload behaviour.