[ 
https://issues.apache.org/jira/browse/VCL-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626772#comment-14626772
 ] 

ASF subversion and git services commented on VCL-871:
-----------------------------------------------------

Commit 1691043 from [~arkurth] in branch 'vcl/trunk'
[ https://svn.apache.org/r1691043 ]

VCL-871
Updated OS.pm::create_text_file to create a temporary file on the management 
node and copy it to the computer if the file is large or if the initial echo 
command attempt fails.

Added create_text_file and get_file_contents subroutines to ManagementNode.pm. 
These use Perl's IO methods rather than calling cat or echo on the OS. This 
allows larger file sizes than the echo method.

Added a warning handler to the eval block in run_ssh_command. This should catch 
some errors such as 'Argument list too long'. Also added a check to make sure 
$ssh_output is defined after the eval block executes.

Updated OS.pm::set_text_file_line_endings to retrieve the contents of the file, 
update lines, then recreate the file instead of using sed. The sed command was 
producing inconsistent line endings.


Other
Updated code in OS.pm::execute and utils.pm::run_ssh_command that relates to 
calling execute_new. It will not use execute_new for shutdown and reboot 
commands.

> OS.pm::create_text_file fails if content is too long
> ----------------------------------------------------
>
>                 Key: VCL-871
>                 URL: https://issues.apache.org/jira/browse/VCL-871
>             Project: VCL
>          Issue Type: Improvement
>          Components: vcld (backend)
>    Affects Versions: 2.4.2
>            Reporter: Andy Kurth
>            Assignee: Andy Kurth
>            Priority: Minor
>             Fix For: 2.4.3
>
>
> {{OS.pm::create_text_file}} converts each character of the text content 
> argument to its hex value and creates a string passed to _echo -e_.  This 
> normally works correctly and allows single quote charcters to be added to the 
> file.  However, the command fails if the string becomes too long.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to