[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle \n as argument
- **status**: review --> fixed - **Comment**: commit 3c660eef1ad1ca264e1b143151b33378c8f677d2 Author: Hans Nordeback Date: Wed Nov 29 14:44:30 2017 +0100 base: Fix opensaf_scale_out script to handle binary arguments [#2703] commit 3d753c5847af88107a9321601263fb03cff6170f Author: Hans Nordeback Date: Wed Nov 29 14:44:30 2017 +0100 base: Fix opensaf_scale_out script to handle binary arguments [#2703] --- ** [tickets:#2703] opensaf_scale_out script could not handle \n as argument** **Status:** fixed **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Tue Nov 28, 2017 01:25 PM UTC **Owner:** Hans Nordebäck The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: //# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle \n as argument
the RS regular expression is perhaps clearer if: node_name=$(echo "$node" | awk -F "$CLM_IFS" 'BEGIN{RS="^$"} {print $2}') --- ** [tickets:#2703] opensaf_scale_out script could not handle \n as argument** **Status:** review **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Mon Nov 27, 2017 03:20 PM UTC **Owner:** Hans Nordebäck The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: //# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle \n as argument
- **status**: accepted --> review --- ** [tickets:#2703] opensaf_scale_out script could not handle \n as argument** **Status:** review **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Mon Nov 27, 2017 10:52 AM UTC **Owner:** Hans Nordebäck The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: //# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle \n as argument
- **status**: unassigned --> accepted - **assigned_to**: Hans Nordebäck --- ** [tickets:#2703] opensaf_scale_out script could not handle \n as argument** **Status:** accepted **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Fri Nov 24, 2017 01:48 PM UTC **Owner:** Hans Nordebäck The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: //# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle \n as argument
- **summary**: opensaf_scale_out script could not handle /n as argument --> opensaf_scale_out script could not handle \n as argument - Description has changed: Diff: --- old +++ new @@ -1,5 +1,5 @@ The problem is the fourth script argument that is the optional user data field. -That field could contain a 254-long string that could include none printable characters as /n. +That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" @@ -12,7 +12,7 @@ Modified code: -# Temporary remove non-printable characters from input argument +//# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) --- ** [tickets:#2703] opensaf_scale_out script could not handle \n as argument** **Status:** unassigned **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Fri Nov 24, 2017 11:46 AM UTC **Owner:** nobody The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as \n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: //# Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets
[tickets] [opensaf:tickets] #2703 opensaf_scale_out script could not handle /n as argument
--- ** [tickets:#2703] opensaf_scale_out script could not handle /n as argument** **Status:** unassigned **Milestone:** 5.18.01 **Created:** Fri Nov 24, 2017 11:46 AM UTC by Per Rodenvall **Last Updated:** Fri Nov 24, 2017 11:46 AM UTC **Owner:** nobody The problem is the fourth script argument that is the optional user data field. That field could contain a 254-long string that could include none printable characters as /n. In the sample code below the script is just interested in the node name that is the second argument. That could not contain any non-printable characters. Therefore none printable characters could be removed for this loop with "tr" Original code: for node in "$@"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done Modified code: # Temporary remove non-printable characters from input argument arg_without_newline=$(printf "%s" "$@" | tr -cd '[:print:]') for node in "$arg_without_newline"; do node_name=$(echo "$node" | cut -d"$CLM_IFS" -f2) echo "$node_name" >> "$nodes_cfg_tmp" done --- Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is subscribed to https://sourceforge.net/p/opensaf/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Opensaf-tickets mailing list Opensaf-tickets@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-tickets